Skip to content

Commit

Permalink
update to remove support for python 3.5, update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
aschleg committed Jun 30, 2020
1 parent 5ac7306 commit 330e548
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 5 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
language: python
python:
- "3.5"
- "3.6"
- "3.7"
install:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ The following are longer usage examples and tutorials that have been posted to e

## Requirements

* Python >= 3.4
* Python >= 3.6
* [requests](http://docs.python-requests.org/en/master/) >= 2.18.4
* Although not strictly required to use `petpy`, the [pandas](https://pandas.pydata.org/) library is needed
for returning the results as a DataFrame.
Expand Down
Binary file modified docs/build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/build/doctrees/index.doctree
Binary file not shown.
8 changes: 8 additions & 0 deletions docs/build/html/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ installed using the :code:`setup.py` script per the following:
cd petpy
python setup.py install
Requirements
============

- Python >= 3.6
- `requests <http://docs.python-requests.org/en/master/>`_ >= 2.18.4
- Although not strictly required to use :code:`petpy`, the `pandas <https://pandas.pydata.org/>`_ library (>=0.22.0)
is needed for returning the results as a DataFrame.

Contents
========

Expand Down
9 changes: 9 additions & 0 deletions docs/build/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,15 @@ <h1>Installation<a class="headerlink" href="#installation" title="Permalink to t
</div>
</div></blockquote>
</div>
<div class="section" id="requirements">
<h1>Requirements<a class="headerlink" href="#requirements" title="Permalink to this headline"></a></h1>
<ul class="simple">
<li><p>Python &gt;= 3.6</p></li>
<li><p><a class="reference external" href="http://docs.python-requests.org/en/master/">requests</a> &gt;= 2.18.4</p></li>
<li><p>Although not strictly required to use <code class="code docutils literal notranslate"><span class="pre">petpy</span></code>, the <a class="reference external" href="https://pandas.pydata.org/">pandas</a> library (&gt;=0.22.0)
is needed for returning the results as a DataFrame.</p></li>
</ul>
</div>
<div class="section" id="contents">
<h1>Contents<a class="headerlink" href="#contents" title="Permalink to this headline"></a></h1>
<div class="toctree-wrapper compound">
Expand Down
2 changes: 1 addition & 1 deletion docs/build/html/searchindex.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ installed using the :code:`setup.py` script per the following:
cd petpy
python setup.py install
Requirements
============

- Python >= 3.6
- `requests <http://docs.python-requests.org/en/master/>`_ >= 2.18.4
- Although not strictly required to use :code:`petpy`, the `pandas <https://pandas.pydata.org/>`_ library (>=0.22.0)
is needed for returning the results as a DataFrame.

Contents
========

Expand Down
4 changes: 2 additions & 2 deletions petpy/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,15 +425,15 @@ def animals(self, animal_id=None, animal_type=None, breed=None, size=None, gende
before_date = datetime.datetime.strptime(before_date, '%Y-%m-%d %H:%M:%S')
except ValueError:
before_date = datetime.datetime.strptime(before_date, '%Y-%m-%d')
before_date = before_date.replace(tzinfo=datetime.datetime.now().astimezone().tzinfo).replace(microsecond=0).isoformat()
before_date = before_date.astimezone().replace(microsecond=0).isoformat()

if after_date is not None:
if isinstance(after_date, str):
try:
after_date = datetime.datetime.strptime(after_date, '%Y-%m-%d %H:%M:%S')
except ValueError:
after_date = datetime.datetime.strptime(after_date, '%Y-%m-%d')
after_date = after_date.replace(tzinfo=datetime.datetime.now().astimezone().tzinfo).replace(microsecond=0).isoformat()
after_date = after_date.astimezone().replace(microsecond=0).isoformat()

if after_date is not None and before_date is not None:
if before_date < after_date:
Expand Down

0 comments on commit 330e548

Please sign in to comment.