Skip to content

Commit 929370e

Browse files
authored
Merge branch 'main' into readme-clean-up
2 parents bbc0619 + 008a4bb commit 929370e

File tree

109 files changed

+3648
-3992
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+3648
-3992
lines changed

.github/workflows/python-package.yml

Lines changed: 8 additions & 6 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,19 +24,21 @@ 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: |
3736
make run-jupyter-pysus
37+
# make test-jupyter-pysus ## takes too long
3838
39-
- name: Test with pytest
39+
- name: Linting & Tests
4040
run: |
41+
export CI=1
4142
poetry install
43+
pre-commit run --all-files
4244
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:

.idea/PySUS.iml

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

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.pre-commit-config.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
default_stages: [commit, push]
2+
13
repos:
24
- repo: https://github.com/pre-commit/pre-commit-hooks
35
rev: v4.1.0
@@ -16,8 +18,6 @@ repos:
1618
files: ""
1719
language: system
1820
pass_filenames: true
19-
stages:
20-
- commit
2121
types:
2222
- python
2323
- file
@@ -30,8 +30,6 @@ repos:
3030
language: python
3131
name: flake8
3232
pass_filenames: true
33-
stages:
34-
- commit
3533
types:
3634
- python
3735

@@ -42,7 +40,5 @@ repos:
4240
language: python
4341
name: isort
4442
pass_filenames: true
45-
stages:
46-
- commit
4743
types:
4844
- python

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
Release Notes
22
---
33

4+
## [1.0.0](https://github.com/AlertaDengue/PySUS/compare/0.15.0...1.0.0) (2025-06-11)
5+
6+
### ⚠ BREAKING CHANGES
7+
8+
* **package:** release for py3.13 (#223)
9+
10+
### Features
11+
12+
* **package:** release for py3.13 ([#223](https://github.com/AlertaDengue/PySUS/issues/223)) ([c6008f4](https://github.com/AlertaDengue/PySUS/commit/c6008f41b55bc65e98b45adcbb6e8f304732928e))
13+
14+
## [0.15.0](https://github.com/AlertaDengue/PySUS/compare/0.14.3...0.15.0) (2024-12-03)
15+
16+
### Features
17+
18+
* **package:** bump version to 0.15.0 ([#216](https://github.com/AlertaDengue/PySUS/issues/216)) ([8ed64be](https://github.com/AlertaDengue/PySUS/commit/8ed64be381531306152edf0aa7c57711fff4b293))
19+
420
## [0.14.3](https://github.com/AlertaDengue/PySUS/compare/0.14.2...0.14.3) (2024-07-31)
521

622
### Bug Fixes

Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export PRINT_HELP_PYSCRIPT
2222
help:
2323
@python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)
2424

25-
DOCKER = docker-compose -p pysus -f docker/docker-compose.yaml
25+
DOCKER = docker compose -p pysus -f docker/docker-compose.yaml
2626
SERVICE :=
2727
SEMANTIC_RELEASE = npx --yes \
2828
-p semantic-release \
@@ -48,12 +48,11 @@ down-jupyter-pysus: ## stop and remove containers for all services
4848
#* Tests
4949
.PHONY: test-jupyter-pysus
5050
test-jupyter-pysus: ## run pytest for notebooks inside jupyter container
51-
$(DOCKER) exec -T jupyter bash /test_notebooks.sh
51+
$(DOCKER) exec -T jupyter pytest -vv --nbmake
5252

5353
.PHONY: test-pysus
5454
test-pysus: ## run tests quickly with the default Python
55-
cp docs/source/**/*.ipynb pysus/Notebooks
56-
poetry run pytest -vv pysus/tests/
55+
poetry run pytest -vv pysus/tests/ --retries 3 --retry-delay 15
5756

5857
# RELEASE
5958
# =======

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ First, clone the Pysus repository:
5555
```bash
5656
git clone https://github.com/AlertaDengue/PySUS.git
5757
```
58+
5859
then from within the PySUS directory build the container
5960

6061
```bash
@@ -71,7 +72,7 @@ Point your browser to [http://127.0.0.1:8888](http://127.0.0.1:8888) and have fu
7172
Once you are done, you can stop the container with a simple `ctrl-c` from the terminal you started it or use the following command:
7273
```bash
7374
# to find the container ID
74-
docker ps
75+
docker ps
7576
docker stop <CONTAINER ID>
7677
```
7778
### Mounting your working directory in the container
@@ -104,7 +105,7 @@ setx PYSUS_CACHEPATH "C:\Users\Me\desired\path\.pysus"
104105
In Docker, just add an extra parameter `-e PYSUS_CACHEPATH="/home/me/desired/path/.pysus"` when starting the container:
105106

106107
```bash
107-
docker run -p 8888:8888 -e PYSUS_CACHEPATH="/home/me/desired/path/.pysus" pysus:latest
108+
docker run -p 8888:8888 -e PYSUS_CACHEPATH="/home/me/desired/path/.pysus" pysus:latest
108109
```
109110

110111
## Examples
@@ -143,7 +144,7 @@ Downloading and reading SINASC data:
143144
In[1]: from pysus.online_data.SINASC import download
144145
In[2]: df = download('SE', 2015)
145146
In[3]: df.head()
146-
Out[3]:
147+
Out[3]:
147148
NUMERODN CODINST ORIGEM ... TPROBSON PARIDADE KOTELCHUCK
148149
0 19533794 MSE2805100001 1 ... 11 1 9
149150
1 52927108 MSE2802700001 1 ... 11 1 9
@@ -159,7 +160,7 @@ Dowloading and reading SIM data:
159160
In[1]: from pysus.online_data.SIM import download
160161
In[2]: df = download('ba', 2007)
161162
In[3]: df.head()
162-
Out[3]:
163+
Out[3]:
163164
NUMERODO TIPOBITO DTOBITO ... UFINFORM CODINST CB_PRE
164165
0 01499664 2 30072007 ... 29 RBA2914800001 C229
165166
1 09798190 2 04072007 ... 29 RBA2914800001 R98
@@ -175,7 +176,7 @@ Dowloading and reading CIHA data:
175176
In[1]: from pysus.online_data.CIHA import download
176177
In[2]: df = download('mg', 2009, 7)
177178
In[3]: df.head()
178-
Out[3]:
179+
Out[3]:
179180
ANO_CMPT MES_CMPT ESPEC CGC_HOSP ... CAR_INT HOMONIMO CNES FONTE
180181
0 2009 07 16505851000126 ... 2126796 1
181182
1 2009 07 16505851000126 ... 2126796 2
@@ -191,7 +192,7 @@ Dowloading and reading SIA data:
191192
In[1]: from pysus.online_data.SIA import download
192193
In[2]: bi, ps = download('AC', 2020, 3, group=["BI", "PS"])
193194
In[3]: bi.head()
194-
Out[3]:
195+
Out[3]:
195196
CODUNI GESTAO CONDIC UFMUN TPUPS ... VL_APROV UFDIF MNDIF ETNIA NAT_JUR
196197
0 2000733 120000 EP 120040 07 ... 24.2 0 0 1023
197198
1 2001063 120000 EP 120040 36 ... 7.3 0 0 1023
@@ -208,4 +209,3 @@ Out[4]:
208209
3 2002094 120000 EP 120040 ... 0 0 1023
209210
4 2002094 120000 EP 120040 ... 0 0 1023
210211
[5 rows x 45 columns]
211-
```

conda/dev.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@ channels:
33
- conda-forge
44
- defaults
55
dependencies:
6-
- python >=3.10,<3.12
7-
- numpy>=1.26.2
8-
- cffi
9-
- gcc
6+
- docker-compose
7+
- python>=3.10,<3.14
108
- jupyter
119
- make
12-
- poetry>=1.3.2
10+
- poetry
1311
- pip

condarecipe/pysus/meta.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ about:
4747
home: "https://github.com/fccoelho/PySUS"
4848
license: gpl-v3
4949
license_family: GPL3
50-
license_file:
50+
license_file:
5151
summary: "Tools for dealing with Brazil's Public health data"
52-
doc_url:
53-
dev_url:
52+
doc_url:
53+
dev_url:
5454

5555
extra:
5656
recipe-maintainers:

0 commit comments

Comments
 (0)