Skip to content

Commit 1f91197

Browse files
authored
⬆️ Upgrade python version and dependencies
1 parent 4bf25e5 commit 1f91197

26 files changed

+801
-826
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
strategy:
2121
matrix:
2222
os: [ubuntu-latest, macos-latest, windows-latest]
23-
python-version: ['3.8', '3.9', '3.10']
23+
python-version: ['3.10', '3.11', '3.12']
2424

2525
steps:
2626
- uses: actions/checkout@v2

.pylintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ max-attributes=9
1919

2020
# we're going to support as many arguments as the API calls have
2121
disable=too-many-arguments,
22+
too-many-positional-arguments,
2223
# unfortunately this has to be disabled because of similar
2324
# import statements across different methods (which are
2425
# separated by different files by design)

poetry.lock

Lines changed: 762 additions & 797 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,20 @@ packages = [
2727
]
2828

2929
[tool.poetry.dependencies]
30-
python = "^3.8"
30+
python = "^3.10"
3131
requests = "^2.20"
3232
semantic-version = "^2.8.5"
33-
pandas = {version = "^1.3.4", optional = true}
33+
pandas = {version = "^2.0.0", optional = true}
3434

3535
[tool.poetry.extras]
3636
data_science = ["pandas"]
3737

3838
[tool.poetry.group.dev.dependencies]
39-
pytest = "^6.2.5"
39+
pytest = "^7.0.0"
4040
pytest-cov = "^3.0.0"
4141
pytest-black = "^0.3.12"
4242
pytest-mypy = "^0.10.3"
43-
pytest-pylint = "^0.18.0"
43+
pytest-pylint = "^0.20.0"
4444
responses = "^0.14.0"
4545
pytest-mock = "^3.6.1"
4646
types-requests = "^2.26.1"

redcap/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
I don't think this is the ideal workflow, but it's the best I
44
could come up with for having great, tested, examples
55
"""
6+
67
from pathlib import Path
78

89
import pytest

redcap/methods/arms.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""REDCap API methods for Project arms"""
2+
23
from typing import TYPE_CHECKING, Any, Dict, List, Literal, Optional, Union, cast
34

45
from redcap.methods.base import Base, Json
@@ -15,7 +16,6 @@ def export_arms(
1516
format_type: Literal["json", "csv", "xml", "df"] = "json",
1617
arms: Optional[List[str]] = None,
1718
):
18-
# pylint: disable=line-too-long
1919
"""
2020
Export the Arms of the Project
2121
@@ -36,7 +36,6 @@ def export_arms(
3636
>>> proj.export_arms()
3737
[{'arm_num': 1, 'name': 'Arm 1'}]
3838
"""
39-
# pylint:enable=line-too-long
4039
payload = self._initialize_payload(content="arm", format_type=format_type)
4140
if arms:
4241
# Turn list of arms into dict, and append to payload

redcap/methods/base.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""The Base class for all REDCap methods"""
2+
23
from __future__ import annotations
34

45
import json
@@ -227,12 +228,10 @@ def _filter_metadata(
227228
self,
228229
key: str,
229230
field_name: None = None,
230-
) -> list:
231-
...
231+
) -> list: ...
232232

233233
@overload
234-
def _filter_metadata(self, key: str, field_name: str) -> str:
235-
...
234+
def _filter_metadata(self, key: str, field_name: str) -> str: ...
236235

237236
def _filter_metadata(self, key: str, field_name: Optional[str] = None):
238237
"""Safely filter project metadata based off requested column and field_name"""

redcap/methods/data_access_groups.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""REDCap API methods for Project data access groups"""
2+
23
from typing import TYPE_CHECKING, Any, Dict, List, Literal, Optional, Union, cast
34

45
from redcap.methods.base import Base, Json

redcap/methods/events.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""REDCap API methods for Project events"""
2+
23
from typing import TYPE_CHECKING, Any, Dict, List, Literal, Optional, Union, cast
34

45
from redcap.methods.base import Base, Json
@@ -15,7 +16,6 @@ def export_events(
1516
format_type: Literal["json", "csv", "xml", "df"] = "json",
1617
arms: Optional[List[str]] = None,
1718
):
18-
# pylint: disable=line-too-long
1919
"""
2020
Export the Events of the Project
2121
@@ -37,7 +37,6 @@ def export_events(
3737
[{'event_name': 'Event 1', 'arm_num': 1, 'unique_event_name': 'event_1_arm_1',
3838
'custom_event_label': '', 'event_id': ...}, {'event_name': 'Event 2', ...}]
3939
"""
40-
# pylint:enable=line-too-long
4140
payload = self._initialize_payload(content="event", format_type=format_type)
4241
if arms:
4342
# Turn list of arms into dict, and append to payload

redcap/methods/field_names.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""REDCap API methods for Project field names"""
2+
23
from typing import TYPE_CHECKING, Any, Dict, Literal, Optional, Union, cast
34

45
from redcap.methods.base import Base, Json

0 commit comments

Comments
 (0)