diff --git a/.DS_Store b/.DS_Store index dd5f517..fcd4247 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/src/openenergyid/__init__.py b/openenergyid/__init__.py similarity index 100% rename from src/openenergyid/__init__.py rename to openenergyid/__init__.py diff --git a/src/openenergyid/main.py b/openenergyid/main.py similarity index 58% rename from src/openenergyid/main.py rename to openenergyid/main.py index 202ba75..d3e5d79 100644 --- a/src/openenergyid/main.py +++ b/openenergyid/main.py @@ -1,2 +1,6 @@ -if __name__ == '__main__': +def main(): print('Hello World!') + return 0 + +if __name__ == '__main__': + main() diff --git a/pyproject.toml b/pyproject.toml index dbf4425..fd74e16 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,4 +31,7 @@ classifiers = [ ] [project.urls] -homepage = "www.energyid.eu" \ No newline at end of file +homepage = "www.energyid.eu" + +[tool.hatch.version] +path = "openenergyid/__init__.py" \ No newline at end of file diff --git a/src/.DS_Store b/src/.DS_Store deleted file mode 100644 index 4c5d51c..0000000 Binary files a/src/.DS_Store and /dev/null differ diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_main.py b/tests/test_main.py new file mode 100644 index 0000000..d37482d --- /dev/null +++ b/tests/test_main.py @@ -0,0 +1,8 @@ +from openenergyid import __version__ +from openenergyid.main import main + +def test_version(): + assert __version__ == '0.0.1' + +def test_main(): + assert main() == 0