Skip to content

Commit ae4e709

Browse files
authored
feat!(v1): python 3.13 release; remove cffi (gcc) dep; update readme; release v1? (#222)
* deps!(v1): python 3.13 release; remove cffi (gcc) dep; update readme; release v1? * debug * fix(test): test_vaccine imunizacao url is forbidden to be fetched on CI * replace numpy dep pin by version range * replace fastparquet dep pin by version range
1 parent 54f7800 commit ae4e709

File tree

12 files changed

+449
-193
lines changed

12 files changed

+449
-193
lines changed

.github/workflows/python-package.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414
strategy:
1515
matrix:
16-
python_version: ["3.10", "3.11"]
16+
python_version: ["3.10", "3.11", "3.12", "3.13"]
1717

1818
concurrency:
1919
group: ci-tests-${{ matrix.python_version }}-${{ github.ref }}
@@ -24,13 +24,12 @@ jobs:
2424

2525
- uses: conda-incubator/setup-miniconda@v3
2626
with:
27-
miniconda-version: "latest"
28-
mamba-version: "*"
27+
miniforge-version: latest
2928
environment-file: conda/dev.yaml
3029
channels: conda-forge,nodefaults
3130
activate-environment: pysus
32-
use-mamba: true
33-
miniforge-variant: Mambaforge
31+
auto-update-conda: true
32+
conda-solver: libmamba
3433

3534
- name: Run jupyterlab with PySUS
3635
run: |
@@ -39,6 +38,7 @@ jobs:
3938
4039
- name: Linting & Tests
4140
run: |
41+
export CI=1
4242
poetry install
4343
pre-commit run --all-files
4444
make test-pysus

.github/workflows/release.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,12 @@ jobs:
2020

2121
- uses: conda-incubator/setup-miniconda@v3
2222
with:
23-
miniconda-version: "latest"
24-
mamba-version: "*"
23+
miniforge-version: latest
2524
environment-file: conda/dev.yaml
2625
channels: conda-forge,nodefaults
2726
activate-environment: pysus
28-
use-mamba: true
29-
miniforge-variant: Mambaforge
27+
auto-update-conda: true
28+
conda-solver: libmamba
3029

3130
- uses: actions/setup-node@v3
3231
with:

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ test-jupyter-pysus: ## run pytest for notebooks inside jupyter container
5252

5353
.PHONY: test-pysus
5454
test-pysus: ## run tests quickly with the default Python
55-
poetry run pytest -vv pysus/tests/
55+
poetry run pytest -vv pysus/tests/ --retries 3 --retry-delay 15
5656

5757
# RELEASE
5858
# =======

README.md

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -138,26 +138,6 @@ datetime.date(2016, 4, 1)
138138

139139
```
140140

141-
**Reading `.dbc` file:**
142-
143-
```python
144-
>>> from pysus.utilities.readdbc import read_dbc
145-
146-
>>> df = read_dbc(filename, encoding='iso-8859-1')
147-
>>> df.info()
148-
<class 'pandas.core.frame.DataFrame'>
149-
RangeIndex: 1239 entries, 0 to 1238
150-
Data columns (total 58 columns):
151-
AP_MVM 1239 non-null object
152-
AP_CONDIC 1239 non-null object
153-
AP_GESTAO 1239 non-null object
154-
AP_CODUNI 1239 non-null object
155-
AP_AUTORIZ 1239 non-null object
156-
AP_CMP 1239 non-null object
157-
AP_PRIPAL 1239 non-null object
158-
AP_VL_AP 1239 non-null float64
159-
...
160-
```
161141
Downloading and reading SINASC data:
162142

163143
```python

conda/dev.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,8 @@ channels:
44
- defaults
55
dependencies:
66
- docker-compose
7-
- python >=3.10,<3.12
8-
- numpy>=1.26.2
9-
- cffi
10-
- gcc
7+
- python>=3.10,<3.14
118
- jupyter
129
- make
13-
- poetry>=1.3.2
10+
- poetry
1411
- pip

docker/docker-compose.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ services:
99
privileged: true
1010
environment:
1111
- DISPLAY=:0
12+
- CI=${CI:-0}
1213
volumes:
1314
- /tmp/.X11-unix:/tmp/.X11-unix
1415
entrypoint: ["/entrypoint.sh"]

poetry.lock

Lines changed: 427 additions & 144 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
@@ -8,12 +8,11 @@ license = "GPL"
88
packages = [{include='pysus'}]
99

1010
[tool.poetry.dependencies]
11-
python = ">=3.10,<3.13"
11+
python = ">=3.10,<3.14"
1212
python-dateutil = "2.8.2"
13-
cffi = "1.15.1"
1413
dbfread = "2.0.7"
15-
fastparquet = ">=2023.10.1"
16-
numpy = "1.26.2"
14+
fastparquet = ">=2023.10.1,<=2024.11.0"
15+
numpy = ">1,<3"
1716
pyarrow = ">=11.0.0"
1817
pycparser = "2.21"
1918
pyreaddbc = ">=1.1.0"
@@ -39,6 +38,7 @@ isort = "^5.10.1"
3938
pre-commit = "^2.20.0"
4039
pytest-timeout = "^2.1.0"
4140
nbsphinx = "^0.9.3"
41+
pytest-retry = "1.7.0"
4242

4343
[tool.poetry.group.docs.dependencies]
4444
sphinx = "^5.1.1"

pysus/online_data/vaccine.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,6 @@ def elasticsearch_fetch(uri, auth, json_body={}):
107107
print(resp)
108108
total += len(resp["hits"]["hits"])
109109
print(f"Downloaded {total} records\r", end="")
110-
# print(resp)
111-
# print(uri)
112110
yield [h["_source"] for h in resp["hits"]["hits"]]
113111
if "_scroll_id" in resp:
114112
scroll_id = resp["_scroll_id"]

pysus/tests/test_data/test_vaccine.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
import unittest
23

34
import pandas as pd
@@ -6,10 +7,9 @@
67

78

89
class VaccineTestCase(unittest.TestCase):
9-
pytest.mark.timeout(5)
10-
10+
@pytest.mark.timeout(15)
11+
@unittest.skipIf(os.getenv("CI"), "Forbidden on CI")
1112
def test_Download(self):
12-
"""Careful! this download can take a long time"""
1313
df = download_covid("BA", only_header=True)
1414
self.assertIsInstance(df, pd.DataFrame)
1515
self.assertEqual(df.shape, (10000, 42))

0 commit comments

Comments
 (0)