Skip to content

Commit b8b4c4d

Browse files
committed
deps!(v1): python 3.13 release; remove cffi (gcc) dep; update readme; release v1?
1 parent 54f7800 commit b8b4c4d

File tree

8 files changed

+301
-147
lines changed

8 files changed

+301
-147
lines changed

.github/workflows/python-package.yml

Lines changed: 4 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: |

.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:

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

poetry.lock

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

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ 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"
1514
fastparquet = ">=2023.10.1"
1615
numpy = "1.26.2"

pysus/tests/test_ftp.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,8 @@ def _test_database(testcase: unittest.TestCase, database: Database):
3333
set(["description", "long_name", "source"]) == set(database.metadata)
3434
)
3535

36-
downloaded_file = (
37-
database.download(database.files[0])
38-
if database.files[0].extension != ".zip"
39-
else database.download(database.files[-1])
36+
downloaded_file = database.download(
37+
[f for f in database.files if ".zip" not in f.basename][0]
4038
)
4139
testcase.assertTrue(isinstance(downloaded_file, ParquetSet))
4240
testcase.assertTrue(Path(downloaded_file.path).exists())

pysus/tests/test_ibge.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ def test_localidades_por_agregado(self):
1919
self.assertGreater(df.size, 0)
2020

2121
@pytest.mark.timeout(120)
22-
@pytest.mark.skip(reason="Failing?")
2322
def test_lista_periodos(self):
2423
df = IBGE.lista_periodos(475)
2524
self.assertIsInstance(df, pd.DataFrame)
@@ -64,7 +63,7 @@ def test_get_population(self):
6463
self.assertEqual(len(l1), 5570)
6564
l2 = IBGE.get_population(year=2012, source="projpop")
6665
self.assertEqual(type(l2), pd.DataFrame)
67-
self.assertEqual(len(l2), 182)
66+
self.assertEqual(len(l2), 4914)
6867

6968

7069
if __name__ == "__main__":

0 commit comments

Comments
 (0)