Skip to content

Commit

Permalink
fix migrate taxref data_dir and setup.py sql files
Browse files Browse the repository at this point in the history
  • Loading branch information
joelclems committed Sep 4, 2023
1 parent 182f314 commit a864190
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
4 changes: 1 addition & 3 deletions apptax/taxonomie/commands/migrate_taxref/commands_v16.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,7 @@ def import_data_taxref_v16():
db.session.execute(query)
db.session.commit()

with open_remote_file(
base_url, "TAXREF_v16_2022.zip", open_fct=ZipFile, data_dir="tmp"
) as archive:
with open_remote_file(base_url, "TAXREF_v16_2022.zip", open_fct=ZipFile) as archive:
with archive.open("TAXREFv16.txt") as f:
logger.info("Insert TAXREFv16 into taxonomie.import_taxref table…")
copy_from_csv(
Expand Down
9 changes: 9 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
1.12.1 (unreleased)
===================

**🐛 Corrections**

* [migration taxref]: ajout de script sql manquants dans le fichier `setup.py`
* [migration taxref]: ne pas spécificer de repertoire de fichier de données dans la fonction `open_remote_file(...,"TAXREF_v16_2022.zip", ...)` afin de pouvoir utiliser la variable d'environnement `DATA_PATH`.


1.12.0 (2023-07-11)
===================

Expand Down
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@
version=version,
packages=setuptools.find_packages(where=".", include=["apptax*"]),
package_data={
"apptax": ["templates/*.html"],
"apptax": [
"templates/*.html",
],
"apptax.migrations": ["alembic.ini", "script.py.mako", "data/*.sql"],
"apptax.taxonomie.commands.migrate_taxref": ["data/*.sql"],
"apptax.taxonomie.commands.migrate_taxref": ["data/*.sql", "data/*/*.sql"],
},
install_requires=(
list(open("requirements-common.in", "r")) + list(open("requirements-dependencies.in", "r"))
Expand Down

0 comments on commit a864190

Please sign in to comment.