From 334653ebb15904af30cb77d8ae70361301a66adf Mon Sep 17 00:00:00 2001 From: Marcel Loose <loose@astron.nl> Date: Wed, 23 Nov 2022 17:07:21 +0100 Subject: [PATCH] Rename source directory Renamed source directory, so that it matches with the package name. Otherwise setuptools won't be able to automatically find the source files. --- .gitignore | 2 +- {map => my_awesome_app}/__init__.py | 0 {map => my_awesome_app}/cool_module.py | 0 pyproject.toml | 2 +- tests/test_cool_module.py | 2 +- tox.ini | 4 ++-- 6 files changed, 5 insertions(+), 5 deletions(-) rename {map => my_awesome_app}/__init__.py (100%) rename {map => my_awesome_app}/cool_module.py (100%) diff --git a/.gitignore b/.gitignore index ac8dd20..f886c6f 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,7 @@ coverage.xml htmlcov/* # Setuptools SCM -map/_version.py +my_awesome_app/_version.py # IDE configuration .vscode diff --git a/map/__init__.py b/my_awesome_app/__init__.py similarity index 100% rename from map/__init__.py rename to my_awesome_app/__init__.py diff --git a/map/cool_module.py b/my_awesome_app/cool_module.py similarity index 100% rename from map/cool_module.py rename to my_awesome_app/cool_module.py diff --git a/pyproject.toml b/pyproject.toml index f2bcff2..0dac729 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ requires = [ build-backend = "setuptools.build_meta" [tool.setuptools_scm] -write_to = "map/_version.py" +write_to = "my_awesome_app/_version.py" [tool.pylint] ignore = "_version.py" diff --git a/tests/test_cool_module.py b/tests/test_cool_module.py index da1002b..4ab4889 100644 --- a/tests/test_cool_module.py +++ b/tests/test_cool_module.py @@ -1,7 +1,7 @@ """Testing of the Cool Module""" from unittest import TestCase -from map.cool_module import greeter +from my_awesome_app.cool_module import greeter class TestCoolModule(TestCase): diff --git a/tox.ini b/tox.ini index c053064..d538894 100644 --- a/tox.ini +++ b/tox.ini @@ -34,8 +34,8 @@ commands = black: {envpython} -m black --version black: {envpython} -m black --check --diff . pylint: {envpython} -m pylint --version - pylint: {envpython} -m pylint map tests - format: {envpython} -m autopep8 -v -aa --in-place --recursive map + pylint: {envpython} -m pylint my_awesome_app tests + format: {envpython} -m autopep8 -v -aa --in-place --recursive my_awesome_app format: {envpython} -m autopep8 -v -aa --in-place --recursive tests format: {envpython} -m black -v . -- GitLab