diff --git a/data/__init__.py b/data/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/cities.py b/data/cities.py similarity index 100% rename from cities.py rename to data/cities.py diff --git a/countries.py b/data/countries.py similarity index 100% rename from countries.py rename to data/countries.py diff --git a/departments.py b/data/departments.py similarity index 100% rename from departments.py rename to data/departments.py diff --git a/import/__init__.py b/import/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/convert_cities.py b/import/convert_cities.py similarity index 94% rename from convert_cities.py rename to import/convert_cities.py index e3fe0c0..c9ec2a9 100644 --- a/convert_cities.py +++ b/import/convert_cities.py @@ -24,6 +24,6 @@ with open("correspondance-code-insee-code-postal.json", "r") as f: failed.append(base_item) import pprint - with open("cities.py", "w") as writef: + with open("../data/cities.py", "w") as writef: writef.write(pprint.pformat(mapping, indent=4, compact=True)) writef.flush() diff --git a/main.py b/main.py index 4745ba8..ffcb433 100644 --- a/main.py +++ b/main.py @@ -2,9 +2,9 @@ import calendar import datetime import pprint -from departments import DEPARTMENTS -from cities import CITIES -from countries import COUNTRIES, CONTINENTS +from data.departments import DEPARTMENTS +from data.cities import CITIES +from data.countries import COUNTRIES, CONTINENTS class InseeData: