Skip to content

Commit b3540d7

Browse files
luabidafccoelho
andauthored
feat(IBGE): continue work of AlertaDengue #192 (#193)
* Started the implementation of fetching the population estimates from DATASUS * Added missing path * Fixed many bugs. testing passing for sources POPTCU and projpop * feat(IBGE): continue work of #192 * fix get_files from IBGEDATASUS * finish get_population * clean & update a the worflows * fix tests --------- Co-authored-by: Flávio Codeço Coelho <[email protected]>
1 parent 8f971c9 commit b3540d7

File tree

17 files changed

+1366
-1250
lines changed

17 files changed

+1366
-1250
lines changed

.github/workflows/python-package.yml

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,9 @@ jobs:
2020
cancel-in-progress: true
2121

2222
steps:
23-
- uses: actions/checkout@v3
23+
- uses: actions/checkout@v4
2424

25-
- name: Prepare conda environment
26-
run: |
27-
sed -i s/python\ 3\.11/python\ ${{ matrix.python_version }}/ conda/dev.yaml
28-
cat conda/dev.yaml
29-
30-
- uses: conda-incubator/setup-miniconda@v2
25+
- uses: conda-incubator/setup-miniconda@v3
3126
with:
3227
miniconda-version: "latest"
3328
mamba-version: "*"
@@ -37,27 +32,11 @@ jobs:
3732
use-mamba: true
3833
miniforge-variant: Mambaforge
3934

40-
41-
- name: Install dependencies
42-
run: |
43-
curl -sSL https://install.python-poetry.org/ | python -
44-
export PATH="$HOME/.poetry/bin:$PATH"
45-
poetry config virtualenvs.create false
46-
47-
- name: Install main dependencies
48-
run: |
49-
make conda-install-main ENVCREATE=conda-env
50-
51-
- name: Lint with flake8
52-
run: |
53-
make conda-install-dev
54-
make check-codestyle
55-
5635
- name: Run jupyterlab with PySUS
5736
run: |
5837
make run-jupyter-pysus
5938
6039
- name: Test with pytest
6140
run: |
62-
make conda-install-geo
41+
poetry install
6342
make test-pysus

.github/workflows/release.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616
shell: bash -l {0}
1717

1818
steps:
19-
- uses: actions/checkout@v2
19+
- uses: actions/checkout@v4
2020

21-
- uses: conda-incubator/setup-miniconda@v2
21+
- uses: conda-incubator/setup-miniconda@v3
2222
with:
2323
miniconda-version: "latest"
2424
mamba-version: "*"
@@ -46,4 +46,3 @@ jobs:
4646
run: |
4747
poetry config pypi-token.pypi ${PYPI_TOKEN}
4848
make release
49-

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.idea
1+
.idea/
22
PySUS.egg-info/
33
build/
44
dist/

.idea/PySUS.iml

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

.idea/misc.xml

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

Makefile

Lines changed: 0 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -36,42 +36,6 @@ SEMANTIC_RELEASE = npx --yes \
3636
-p "semantic-release-replace-plugin" \
3737
semantic-release
3838

39-
40-
# Create a Conda environment and install dependencies for development.
41-
.PHONY: conda-env
42-
conda-env:
43-
mamba env create -f conda/dev.yaml --force
44-
45-
# Install main project dependencies using Poetry.
46-
.PHONY: conda-install-main
47-
conda-install-main: ${ENVCREATE}
48-
conda run -n pysus poetry install --only main
49-
50-
.PHONY: conda-install-dev
51-
conda-install-dev:
52-
conda run -n pysus poetry install --only dev
53-
54-
.PHONY: conda-install-docs
55-
conda-install-docs:
56-
conda run -n pysus poetry install --only docs
57-
58-
.PHONY: conda-install-geo
59-
conda-install-geo:
60-
conda run -n pysus pip install --no-use-pep517 shapely==1.8.5.post1
61-
conda run -n pysus poetry install --only geo
62-
63-
# Linting
64-
.PHONY: pre-commit-install
65-
pre-commit-install:
66-
poetry run pre-commit install
67-
68-
.PHONY: check-codestyle
69-
check-codestyle: ## check style with flake8
70-
# stop the build if there are Python syntax errors or undefined names
71-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
72-
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
73-
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
74-
7539
#* Docker basic
7640
.PHONY: run-jupyter-pysus
7741
run-jupyter-pysus: ## build and deploy all containers
@@ -91,44 +55,6 @@ test-pysus: ## run tests quickly with the default Python
9155
cp docs/source/**/*.ipynb pysus/Notebooks
9256
poetry run pytest -vv pysus/tests/
9357

94-
coverage: ## check code coverage quickly with the default Python
95-
coverage run --source pysus/tests/ -m pytest
96-
coverage report -m
97-
coverage html
98-
$(BROWSER) htmlcov/index.html
99-
100-
# Cleaning
101-
.PHONY: clean
102-
clean: clean-build clean-pyc clean-test ## remove all build, test, coverage and Python artifacts
103-
104-
.PHONY: clean-build
105-
clean-build: ## remove build artifacts
106-
rm -fr build/
107-
rm -fr dist/
108-
rm -fr .eggs/
109-
find . -name '*.cache' -exec rm -fr {} +
110-
find . -name '*.jupyter' -exec rm -fr {} +
111-
find . -name '*.local' -exec rm -fr {} +
112-
find . -name '*.mozilla' -exec rm -fr {} +
113-
find . -name '*.egg-info' -exec rm -fr {} +
114-
find . -name '*.egg' -exec rm -f {} +
115-
find . -name '*.ipynb_checkpoints' -exec rm -rf {} +
116-
117-
.PHONY: clean-pyc
118-
clean-pyc: ## remove Python file artifacts
119-
find . -name '*.pyc' -exec rm -f {} +
120-
find . -name '*.pyo' -exec rm -f {} +
121-
find . -name '*~' -exec rm -f {} +
122-
find . -name '__pycache__' -exec rm -fr {} +
123-
124-
.PHONY: clean-test
125-
clean-test: ## remove test and coverage artifacts
126-
rm -fr .tox/
127-
rm -f .coverage
128-
rm -fr htmlcov/
129-
rm -fr .pytest_cache
130-
131-
13258
# RELEASE
13359
# =======
13460

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
# Add any paths that contain custom static files (such as style sheets) here,
163163
# relative to this directory. They are copied after the builtin static files,
164164
# so a file named "default.css" will overwrite the builtin "default.css".
165-
html_static_path = ["_static"]
165+
# html_static_path = ["_static"]
166166

167167
# Add any extra paths that contain custom files (such as robots.txt or
168168
# .htaccess) here, relative to this directory. These files are copied

0 commit comments

Comments
 (0)