diff --git a/pyproject.toml b/pyproject.toml index 15581fdbaa801a334ca6a0ffbb982908b994a642..acbc24cafb6096d2c177f77c8ed267cec1cdad13 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["flit_core>=3.2"] build-backend = "flit_core.buildapi" [project] -name = "import-resources-example" +name = "import_resources_example" version = "0.0.1" authors = [ { name="Françoise CONIL", email="francoise.conil@cnrs.fr" }, diff --git a/src/import-resources-example/__init__.py b/src/import_resources_example/__init__.py similarity index 100% rename from src/import-resources-example/__init__.py rename to src/import_resources_example/__init__.py diff --git a/src/import-resources-example/data/__init__.py b/src/import_resources_example/data/__init__.py similarity index 100% rename from src/import-resources-example/data/__init__.py rename to src/import_resources_example/data/__init__.py diff --git a/src/import-resources-example/get_oms_data.py b/src/import_resources_example/get_oms_data.py similarity index 94% rename from src/import-resources-example/get_oms_data.py rename to src/import_resources_example/get_oms_data.py index c46e0e71ad335af97927f2631ca975e36f67d9c7..babc80f6466f7f1e27190c813efa16a71bdf0a6f 100644 --- a/src/import-resources-example/get_oms_data.py +++ b/src/import_resources_example/get_oms_data.py @@ -47,7 +47,7 @@ def get_oms_data(): """ studies = [] - with resources.open_text("example_package_import.data", "COVID19-web.27-07-2022.csv") as f: + with resources.open_text("import_resources_example.data", "COVID19-web.27-07-2022.csv") as f: rows = csv.DictReader(f) for row in rows: diff --git a/src/import-resources-example/get_population_info.py b/src/import_resources_example/get_population_info.py similarity index 84% rename from src/import-resources-example/get_population_info.py rename to src/import_resources_example/get_population_info.py index cf2d05713e0433fdbcbffa65a1b555a8c7f8eea2..c1e6bdb9dad6bbe00197041844b6527380628459 100644 --- a/src/import-resources-example/get_population_info.py +++ b/src/import_resources_example/get_population_info.py @@ -7,7 +7,7 @@ def extract_population_general_info(): locations = set() - with resources.open_text("example_package_import.data", "WPP2022_TotalPopulationBySex.csv") as f: + with resources.open_text("import_resources_example.data", "WPP2022_TotalPopulationBySex.csv") as f: rows = csv.DictReader(f) for row in rows: