Skip to content

Commit 833e259

Browse files
authored
✨ Release Version 1.1.2 (#132)
* 🌏 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
1 parent 7303cc0 commit 833e259

19 files changed

Lines changed: 1184 additions & 827 deletions

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,6 @@ _site/
1313
*.swp
1414
.vscode/
1515
ve/
16+
.venv
17+
.coverage
1618
.noseids

.pylintrc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[MASTER]
2+
ignore=docs,setup.py
3+
4+
[MESSAGES CONTROL]
5+
6+
# Disable the message, report, category or checker with the given id(s). You
7+
# can either give multiple identifiers separated by comma (,) or put this
8+
# option multiple times (only on the command line, not in the configuration
9+
# file where it should appear only once).You can also use "--disable=all" to
10+
# disable everything first and then reenable specific checks. For example, if
11+
# you want to run only the similarities checker, you can use "--disable=all
12+
# --enable=similarities". If you want to run only the classes checker, but have
13+
# no Warning level messages displayed, use"--disable=all --enable=classes
14+
# --disable=W"
15+
16+
# disabled as long as we support python 2
17+
disable=useless-object-inheritance

.travis.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
language: python
22
python:
3-
- 2.7
43
- 3.6
4+
- 3.7
5+
- 3.8
6+
- 3.9
57
# Enable 3.7 without globally enabling sudo and dist: xenial for other build jobs
68
matrix:
79
include:
@@ -10,12 +12,11 @@ matrix:
1012
sudo: true
1113
# command to install dependencies
1214
install:
13-
# install numpy and pandas for full-suite testing
14-
- pip install numpy
15-
- pip install pandas
15+
# install all dependencies for full-suite testing
1616
- pip install -r requirements.txt
17+
- pip install -r dev-requirements.txt
1718
# install pycap
1819
- pip install -e .
1920
script:
20-
- "nosetests -w test/ -v"
21+
- "pytest"
2122
- "cd docs && make html"

HISTORY.rst

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
11
HISTORY
22
-------
33

4+
1.1.2 (2020-11-05)
5+
+++++++++++++++++++
6+
7+
* API Support
8+
- Add support for ``exportFieldNames`` call (#125 @chgreer)
9+
- Add ``dateRangeBegin`` and ``dateRangeEnd`` parameters to ``Project.export_records`` (#124 @chgreer)
10+
11+
* Package Improvements
12+
- Use ``pytest`` for full test suite (#131)
13+
- Enforce ``black`` and ``pylint`` style and formatting on project (#131)
14+
- Deprecate support for Python 2 (#131)
15+
- Add ``pandas`` as an ``extra_requires`` (#131)
16+
17+
* Documentation
18+
- Update README with new community support model and how to contribute (#131)
19+
20+
421
1.1.1 (2020-08-18)
522
+++++++++++++++++++
623

@@ -11,15 +28,15 @@ HISTORY
1128
+++++++++++++++++++
1229

1330
* API Support
14-
- Add `rec_type` support in `import_records()` (#40 @dckc)
15-
- Add `export_checkbox_labels` keyword arg to `export_records()` (#48 Tyler Rivera)
31+
- Add ``rec_type`` support in ``import_records()`` (#40 @dckc)
32+
- Add ``export_checkbox_labels`` keyword arg to ``export_records()`` (#48 Tyler Rivera)
1633
- Properly backfill requested fields for >6.X servers (#55)
1734
- Add Export Survey Participant List method (#71)
18-
- Add `filter_logic` to export_records (#85 @erikh360)
19-
- Add `forceAutoNumber` parameter to `import_records()` (#86 @CarlosBorroto)
35+
- Add ``filter_logic`` to export_records (#85 @erikh360)
36+
- Add ``forceAutoNumber`` parameter to ``import_records()`` (#86 @CarlosBorroto)
2037
- Add Export Project Information (#106 @martinburchell)
2138
- Add Generate Next Record Name (#107 @martinburchell)
22-
- Add `repeat_instance` parameter to `imp_file` request (#104 @martinburchell)
39+
- Add ``repeat_instance`` parameter to ``imp_file`` request (#104 @martinburchell)
2340
- Add Delete Record (#77 @damonms)
2441
- Add Export Reports (#91 @mcarmack)
2542

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

3451
* Bug Fixes
3552
- Allow later versions of semantic-version (#108 @martinburchell)

README.rst

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
**I am no longer actively developing this code base. Please continue to submit bugs and I'll do my best to tackle them.**
1+
**This project is community maintained. Please continue to submit bugs and feature requests, though it's the community's responsibility to address them.**
22

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

9999
Installation
100100
------------
101+
102+
Install with :code:`pip`
103+
::
104+
105+
$ pip install PyCap
106+
107+
Install extra requirements, which allows returning project data as a :code:`pandas.DataFrame`
108+
::
109+
110+
$ pip install PyCap[pandas]
111+
112+
Install from GitHub
101113
::
102114

103115
$ git clone git://github.com/sburns/PyCap.git PyCap
104116
$ cd PyCap
105117
$ python setup.py install
106118

107-
OR
108119

109-
$ pip install PyCap
120+
Contributing
121+
------------
122+
123+
1. Create a virtual environment and activate it
124+
::
125+
126+
$ python -m venv .venv
127+
$ source .venv/Scripts/activate
128+
129+
2. Install `pip-tools <https://github.com/jazzband/pip-tools/blob/master/README.rst>`_.
130+
::
131+
132+
$ pip install pip-tools
133+
134+
3. Install all project dependencies
135+
::
136+
137+
$ pip-sync requirements.txt dev-requirements.txt
138+
139+
4. Install the package, with a link to the source code. This ensures any changes you
140+
make are immendiate available to test.
141+
::
142+
143+
$ python setup.py develop
144+
145+
5. Add your changes and make sure your changes pass all tests
146+
::
147+
148+
$ pytest
149+
150+
Finally, start a pull request!
110151

111152
Citing
112153
------

dev-requirements.in

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Constrain dev requirements against production requirements
2+
-c requirements.txt
3+
pandas
4+
pytest
5+
pytest-cov
6+
pytest-black
7+
pytest-pylint
8+
Sphinx
9+
numpydoc
10+
wheel
11+
responses
12+
twine

dev-requirements.txt

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
#
2+
# This file is autogenerated by pip-compile
3+
# To update, run:
4+
#
5+
# pip-compile '.\dev-requirements.in'
6+
#
7+
alabaster==0.7.12 # via sphinx
8+
appdirs==1.4.4 # via black
9+
astroid==2.4.2 # via pylint
10+
atomicwrites==1.4.0 # via pytest
11+
attrs==20.2.0 # via pytest
12+
babel==2.8.0 # via sphinx
13+
black==20.8b1 # via pytest-black
14+
bleach==3.2.1 # via readme-renderer
15+
certifi==2020.6.20 # via -c .\requirements.txt, requests
16+
chardet==3.0.4 # via -c .\requirements.txt, requests
17+
click==7.1.2 # via black
18+
colorama==0.4.4 # via pylint, pytest, sphinx, twine
19+
coverage==5.3 # via pytest-cov
20+
docutils==0.16 # via readme-renderer, sphinx
21+
idna==2.10 # via -c .\requirements.txt, requests
22+
imagesize==1.2.0 # via sphinx
23+
iniconfig==1.1.1 # via pytest
24+
isort==5.6.4 # via pylint
25+
jinja2==2.11.2 # via numpydoc, sphinx
26+
keyring==21.4.0 # via twine
27+
lazy-object-proxy==1.4.3 # via astroid
28+
markupsafe==1.1.1 # via jinja2
29+
mccabe==0.6.1 # via pylint
30+
mypy-extensions==0.4.3 # via black
31+
numpy==1.19.4 # via pandas
32+
numpydoc==1.1.0 # via -r .\dev-requirements.in
33+
packaging==20.4 # via bleach, pytest, sphinx
34+
pandas==1.1.4 # via -r .\dev-requirements.in
35+
pathspec==0.8.0 # via black
36+
pkginfo==1.6.1 # via twine
37+
pluggy==0.13.1 # via pytest
38+
py==1.9.0 # via pytest
39+
pygments==2.7.2 # via readme-renderer, sphinx
40+
pylint==2.6.0 # via pytest-pylint
41+
pyparsing==2.4.7 # via packaging
42+
pytest-black==0.3.12 # via -r .\dev-requirements.in
43+
pytest-cov==2.10.1 # via -r .\dev-requirements.in
44+
pytest-pylint==0.17.0 # via -r .\dev-requirements.in
45+
pytest==6.1.2 # via -r .\dev-requirements.in, pytest-black, pytest-cov, pytest-pylint
46+
python-dateutil==2.8.1 # via pandas
47+
pytz==2020.4 # via babel, pandas
48+
pywin32-ctypes==0.2.0 # via keyring
49+
readme-renderer==28.0 # via twine
50+
regex==2020.10.28 # via black
51+
requests-toolbelt==0.9.1 # via twine
52+
requests==2.24.0 # via -c .\requirements.txt, requests-toolbelt, responses, sphinx, twine
53+
responses==0.12.0 # via -r .\dev-requirements.in
54+
rfc3986==1.4.0 # via twine
55+
six==1.15.0 # via astroid, bleach, packaging, python-dateutil, readme-renderer, responses
56+
snowballstemmer==2.0.0 # via sphinx
57+
sphinx==3.3.0 # via -r .\dev-requirements.in, numpydoc
58+
sphinxcontrib-applehelp==1.0.2 # via sphinx
59+
sphinxcontrib-devhelp==1.0.2 # via sphinx
60+
sphinxcontrib-htmlhelp==1.0.3 # via sphinx
61+
sphinxcontrib-jsmath==1.0.1 # via sphinx
62+
sphinxcontrib-qthelp==1.0.3 # via sphinx
63+
sphinxcontrib-serializinghtml==1.1.4 # via sphinx
64+
toml==0.10.2 # via black, pylint, pytest, pytest-black, pytest-pylint
65+
tqdm==4.51.0 # via twine
66+
twine==3.2.0 # via -r .\dev-requirements.in
67+
typed-ast==1.4.1 # via black
68+
typing-extensions==3.7.4.3 # via black
69+
urllib3==1.25.11 # via -c .\requirements.txt, requests, responses
70+
webencodings==0.5.1 # via bleach
71+
wheel==0.35.1 # via -r .\dev-requirements.in
72+
wrapt==1.12.1 # via astroid
73+
74+
# The following packages are considered to be unsafe in a requirements file:
75+
# setuptools

0 commit comments

Comments
 (0)