Skip to content

Commit

Permalink
✨ Release Version 1.1.2 (#132)
Browse files Browse the repository at this point in the history
* 🌏 Add community maintenance message

* 💄 Format and lint package

* 💄 Style and lint test modules

* 💄 Style docs

* ❌ Deprecate support for Python 2

* ➕ Add pandas as extras_require

* 💄 Style setup.py

* 🏗️ Upgrade project infrastructure

* Add pytest
* Add pylint
* Use pip-tools for dependency management
* Update travis CI versions/commands

* ✏️ Fix formatting for HISTORY.rst

* 📰 Add release notes for 1.1.2

* 🤝 Add Contributing section to README

* ✏️ Add long_description_content_type to setup.py
  • Loading branch information
pwildenhain authored Nov 5, 2020
1 parent 7303cc0 commit 833e259
Show file tree
Hide file tree
Showing 19 changed files with 1,184 additions and 827 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ _site/
*.swp
.vscode/
ve/
.venv
.coverage
.noseids
17 changes: 17 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[MASTER]
ignore=docs,setup.py

[MESSAGES CONTROL]

# Disable the message, report, category or checker with the given id(s). You
# can either give multiple identifiers separated by comma (,) or put this
# option multiple times (only on the command line, not in the configuration
# file where it should appear only once).You can also use "--disable=all" to
# disable everything first and then reenable specific checks. For example, if
# you want to run only the similarities checker, you can use "--disable=all
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"

# disabled as long as we support python 2
disable=useless-object-inheritance
11 changes: 6 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
language: python
python:
- 2.7
- 3.6
- 3.7
- 3.8
- 3.9
# Enable 3.7 without globally enabling sudo and dist: xenial for other build jobs
matrix:
include:
Expand All @@ -10,12 +12,11 @@ matrix:
sudo: true
# command to install dependencies
install:
# install numpy and pandas for full-suite testing
- pip install numpy
- pip install pandas
# install all dependencies for full-suite testing
- pip install -r requirements.txt
- pip install -r dev-requirements.txt
# install pycap
- pip install -e .
script:
- "nosetests -w test/ -v"
- "pytest"
- "cd docs && make html"
29 changes: 23 additions & 6 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
HISTORY
-------

1.1.2 (2020-11-05)
+++++++++++++++++++

* API Support
- Add support for ``exportFieldNames`` call (#125 @chgreer)
- Add ``dateRangeBegin`` and ``dateRangeEnd`` parameters to ``Project.export_records`` (#124 @chgreer)

* Package Improvements
- Use ``pytest`` for full test suite (#131)
- Enforce ``black`` and ``pylint`` style and formatting on project (#131)
- Deprecate support for Python 2 (#131)
- Add ``pandas`` as an ``extra_requires`` (#131)

* Documentation
- Update README with new community support model and how to contribute (#131)


1.1.1 (2020-08-18)
+++++++++++++++++++

Expand All @@ -11,15 +28,15 @@ HISTORY
+++++++++++++++++++

* API Support
- Add `rec_type` support in `import_records()` (#40 @dckc)
- Add `export_checkbox_labels` keyword arg to `export_records()` (#48 Tyler Rivera)
- Add ``rec_type`` support in ``import_records()`` (#40 @dckc)
- Add ``export_checkbox_labels`` keyword arg to ``export_records()`` (#48 Tyler Rivera)
- Properly backfill requested fields for >6.X servers (#55)
- Add Export Survey Participant List method (#71)
- Add `filter_logic` to export_records (#85 @erikh360)
- Add `forceAutoNumber` parameter to `import_records()` (#86 @CarlosBorroto)
- Add ``filter_logic`` to export_records (#85 @erikh360)
- Add ``forceAutoNumber`` parameter to ``import_records()`` (#86 @CarlosBorroto)
- Add Export Project Information (#106 @martinburchell)
- Add Generate Next Record Name (#107 @martinburchell)
- Add `repeat_instance` parameter to `imp_file` request (#104 @martinburchell)
- Add ``repeat_instance`` parameter to ``imp_file`` request (#104 @martinburchell)
- Add Delete Record (#77 @damonms)
- Add Export Reports (#91 @mcarmack)

Expand All @@ -29,7 +46,7 @@ HISTORY
- Add Python 3 support (#67, #92 @jmillxyz, @fonnesbeck)
- Remove obsolete Project.filter() (#105 @martinburchell)
- Change API parameters from comma-separated to arrays (#110 @martinburchell)
- Use single `requests.Session()` for connections (#120 @KarthikMasi)
- Use single ``requests.Session()`` for connections (#120 @KarthikMasi)

* Bug Fixes
- Allow later versions of semantic-version (#108 @martinburchell)
Expand Down
47 changes: 44 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**I am no longer actively developing this code base. Please continue to submit bugs and I'll do my best to tackle them.**
**This project is community maintained. Please continue to submit bugs and feature requests, though it's the community's responsibility to address them.**

.. image:: https://travis-ci.org/redcap-tools/PyCap.svg?branch=master
:target: https://travis-ci.org/redcap-tools/PyCap
Expand Down Expand Up @@ -98,15 +98,56 @@ Usage

Installation
------------

Install with :code:`pip`
::

$ pip install PyCap

Install extra requirements, which allows returning project data as a :code:`pandas.DataFrame`
::

$ pip install PyCap[pandas]

Install from GitHub
::

$ git clone git://github.com/sburns/PyCap.git PyCap
$ cd PyCap
$ python setup.py install

OR

$ pip install PyCap
Contributing
------------

1. Create a virtual environment and activate it
::

$ python -m venv .venv
$ source .venv/Scripts/activate

2. Install `pip-tools <https://github.com/jazzband/pip-tools/blob/master/README.rst>`_.
::

$ pip install pip-tools

3. Install all project dependencies
::

$ pip-sync requirements.txt dev-requirements.txt

4. Install the package, with a link to the source code. This ensures any changes you
make are immendiate available to test.
::

$ python setup.py develop

5. Add your changes and make sure your changes pass all tests
::

$ pytest

Finally, start a pull request!

Citing
------
Expand Down
12 changes: 12 additions & 0 deletions dev-requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Constrain dev requirements against production requirements
-c requirements.txt
pandas
pytest
pytest-cov
pytest-black
pytest-pylint
Sphinx
numpydoc
wheel
responses
twine
75 changes: 75 additions & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile '.\dev-requirements.in'
#
alabaster==0.7.12 # via sphinx
appdirs==1.4.4 # via black
astroid==2.4.2 # via pylint
atomicwrites==1.4.0 # via pytest
attrs==20.2.0 # via pytest
babel==2.8.0 # via sphinx
black==20.8b1 # via pytest-black
bleach==3.2.1 # via readme-renderer
certifi==2020.6.20 # via -c .\requirements.txt, requests
chardet==3.0.4 # via -c .\requirements.txt, requests
click==7.1.2 # via black
colorama==0.4.4 # via pylint, pytest, sphinx, twine
coverage==5.3 # via pytest-cov
docutils==0.16 # via readme-renderer, sphinx
idna==2.10 # via -c .\requirements.txt, requests
imagesize==1.2.0 # via sphinx
iniconfig==1.1.1 # via pytest
isort==5.6.4 # via pylint
jinja2==2.11.2 # via numpydoc, sphinx
keyring==21.4.0 # via twine
lazy-object-proxy==1.4.3 # via astroid
markupsafe==1.1.1 # via jinja2
mccabe==0.6.1 # via pylint
mypy-extensions==0.4.3 # via black
numpy==1.19.4 # via pandas
numpydoc==1.1.0 # via -r .\dev-requirements.in
packaging==20.4 # via bleach, pytest, sphinx
pandas==1.1.4 # via -r .\dev-requirements.in
pathspec==0.8.0 # via black
pkginfo==1.6.1 # via twine
pluggy==0.13.1 # via pytest
py==1.9.0 # via pytest
pygments==2.7.2 # via readme-renderer, sphinx
pylint==2.6.0 # via pytest-pylint
pyparsing==2.4.7 # via packaging
pytest-black==0.3.12 # via -r .\dev-requirements.in
pytest-cov==2.10.1 # via -r .\dev-requirements.in
pytest-pylint==0.17.0 # via -r .\dev-requirements.in
pytest==6.1.2 # via -r .\dev-requirements.in, pytest-black, pytest-cov, pytest-pylint
python-dateutil==2.8.1 # via pandas
pytz==2020.4 # via babel, pandas
pywin32-ctypes==0.2.0 # via keyring
readme-renderer==28.0 # via twine
regex==2020.10.28 # via black
requests-toolbelt==0.9.1 # via twine
requests==2.24.0 # via -c .\requirements.txt, requests-toolbelt, responses, sphinx, twine
responses==0.12.0 # via -r .\dev-requirements.in
rfc3986==1.4.0 # via twine
six==1.15.0 # via astroid, bleach, packaging, python-dateutil, readme-renderer, responses
snowballstemmer==2.0.0 # via sphinx
sphinx==3.3.0 # via -r .\dev-requirements.in, numpydoc
sphinxcontrib-applehelp==1.0.2 # via sphinx
sphinxcontrib-devhelp==1.0.2 # via sphinx
sphinxcontrib-htmlhelp==1.0.3 # via sphinx
sphinxcontrib-jsmath==1.0.1 # via sphinx
sphinxcontrib-qthelp==1.0.3 # via sphinx
sphinxcontrib-serializinghtml==1.1.4 # via sphinx
toml==0.10.2 # via black, pylint, pytest, pytest-black, pytest-pylint
tqdm==4.51.0 # via twine
twine==3.2.0 # via -r .\dev-requirements.in
typed-ast==1.4.1 # via black
typing-extensions==3.7.4.3 # via black
urllib3==1.25.11 # via -c .\requirements.txt, requests, responses
webencodings==0.5.1 # via bleach
wheel==0.35.1 # via -r .\dev-requirements.in
wrapt==1.12.1 # via astroid

# The following packages are considered to be unsafe in a requirements file:
# setuptools
Loading

0 comments on commit 833e259

Please sign in to comment.