From 4eafffcd8ecc31ef8b9098882e2ebb9aebf03070 Mon Sep 17 00:00:00 2001 From: Leon Haffmans Date: Mon, 16 Oct 2023 14:16:08 +0200 Subject: [PATCH] Initial setup --- pyproject.toml | 10 +++++----- src/bo4e_generator/__init__.py | 0 src/{mypackage => bo4e_generator}/py.typed | 0 src/mypackage/__init__.py | 3 --- src/mypackage/mymodule.py | 23 ---------------------- unittests/test_myclass.py | 11 ----------- 6 files changed, 5 insertions(+), 42 deletions(-) create mode 100644 src/bo4e_generator/__init__.py rename src/{mypackage => bo4e_generator}/py.typed (100%) delete mode 100644 src/mypackage/__init__.py delete mode 100644 src/mypackage/mymodule.py delete mode 100644 unittests/test_myclass.py diff --git a/pyproject.toml b/pyproject.toml index 0d13591..c3c5a89 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,10 @@ [project] -name = "your-favourite-package-name" -description = "Description of your package" +name = "BO4E-python-generator" +description = "This tool auto generates (customizable) pydantic v2 Code to implement the BO4E-Schemas." license = { text = "MIT" } requires-python = ">=3.11" -authors = [{ name = "your name", email = "your@email.address" }] -keywords = ["your", "important", "keywords"] +authors = [{ name = "Hochfrequenz Unternehmensberatung GmbH", email = "info@hochfrequenz.de" }] +keywords = ["bo4e", "code-generator"] classifiers = [ "Development Status :: 4 - Beta", "Environment :: Console", @@ -47,7 +47,7 @@ fragments = [{ path = "README.md" }] source = "vcs" [tool.hatch.build.hooks.vcs] -version-file = "src/_your_package_version.py" +version-file = "src/_bo4e_generator_version.py" template = ''' version = "{version}" ''' diff --git a/src/bo4e_generator/__init__.py b/src/bo4e_generator/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/mypackage/py.typed b/src/bo4e_generator/py.typed similarity index 100% rename from src/mypackage/py.typed rename to src/bo4e_generator/py.typed diff --git a/src/mypackage/__init__.py b/src/mypackage/__init__.py deleted file mode 100644 index c8dd36b..0000000 --- a/src/mypackage/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -""" -src contains all your business logic -""" diff --git a/src/mypackage/mymodule.py b/src/mypackage/mymodule.py deleted file mode 100644 index 2afc797..0000000 --- a/src/mypackage/mymodule.py +++ /dev/null @@ -1,23 +0,0 @@ -""" -This a docstring for the module. -""" - - -class MyClass: # pylint: disable=too-few-public-methods - """ - This is a docstring for the class. - """ - - def __init__(self): - """ - Initialize for the sake of initializing - """ - self.my_instance_var: str = "abc" - - def do_something(self) -> str: - """ - Actually does nothing. - :return: the value of an instance variable - """ - # this is a super long line with: 100 < line length <= 120 to demonstrate the purpose of pyproject.toml - return self.my_instance_var diff --git a/unittests/test_myclass.py b/unittests/test_myclass.py deleted file mode 100644 index 768a9e4..0000000 --- a/unittests/test_myclass.py +++ /dev/null @@ -1,11 +0,0 @@ -from mypackage.mymodule import MyClass - - -class TestMyClass: - """ - A class with pytest unit tests. - """ - - def test_something(self): - my_class = MyClass() - assert my_class.do_something() == "abc"