diff --git a/.idea/misc.xml b/.idea/misc.xml index d8e1b06..6771072 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -3,4 +3,7 @@ + + \ No newline at end of file diff --git a/LICENCE b/LICENCE new file mode 100644 index 0000000..e69de29 diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..b3efc2c --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,26 @@ +[build-system] +requires = ["hatchling>=1.24"] +build-backend = "hatchling.build" + +[project] +name = "yourpkg" # nazwa na PyPI/pip +version = "0.1.0" # albo użyj dynamicznego (patrz niżej) +description = "Victron/PG price tools" +readme = "README.md" +requires-python = ">=3.9" +license = { text = "MIT" } +authors = [{ name = "Bartosz", email = "bartosz@example.com" }] +dependencies = [ + "psycopg[binary,pool]>=3.2", +] + +#[project.scripts] +#victron-fill = "yourpkg.cli:main" # `victron-fill ...` + +# (opcjonalnie) „extras”: pip install yourpkg[pg,dev] +[project.optional-dependencies] +pg = ["psycopg[binary]>=3.2"] +dev = ["black", "ruff", "pytest"] + +[tool.hatch.build.targets.wheel] +packages = ["src/victron_energy_price_calculator"] diff --git a/requirements-extra.txt b/requirements-extra.txt new file mode 100644 index 0000000..e69de29 diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 72e5d6f..0000000 --- a/requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ -psycopg[binary,pool]>=3.1,<3.3 -apscheduler>=3.10,<4.0 - -systemd-python>=235; sys_platform != "win32" \ No newline at end of file diff --git a/DistributionCost.py b/src/victron_energy_price_calculator/DistributionCost.py similarity index 100% rename from DistributionCost.py rename to src/victron_energy_price_calculator/DistributionCost.py diff --git a/DistributionCostFactory.py b/src/victron_energy_price_calculator/DistributionCostFactory.py similarity index 100% rename from DistributionCostFactory.py rename to src/victron_energy_price_calculator/DistributionCostFactory.py diff --git a/DistributionCostProvider/TauronG11Provider.py b/src/victron_energy_price_calculator/DistributionCostProvider/TauronG11Provider.py similarity index 100% rename from DistributionCostProvider/TauronG11Provider.py rename to src/victron_energy_price_calculator/DistributionCostProvider/TauronG11Provider.py diff --git a/DistributionCostProvider/TauronG12Provider.py b/src/victron_energy_price_calculator/DistributionCostProvider/TauronG12Provider.py similarity index 100% rename from DistributionCostProvider/TauronG12Provider.py rename to src/victron_energy_price_calculator/DistributionCostProvider/TauronG12Provider.py diff --git a/DistributionCostProvider/TauronG12WProvider.py b/src/victron_energy_price_calculator/DistributionCostProvider/TauronG12WProvider.py similarity index 100% rename from DistributionCostProvider/TauronG12WProvider.py rename to src/victron_energy_price_calculator/DistributionCostProvider/TauronG12WProvider.py diff --git a/DistributionCostProvider/TauronG13Provider.py b/src/victron_energy_price_calculator/DistributionCostProvider/TauronG13Provider.py similarity index 100% rename from DistributionCostProvider/TauronG13Provider.py rename to src/victron_energy_price_calculator/DistributionCostProvider/TauronG13Provider.py diff --git a/DistributionCostProvider/TauronG13SProvider.py b/src/victron_energy_price_calculator/DistributionCostProvider/TauronG13SProvider.py similarity index 100% rename from DistributionCostProvider/TauronG13SProvider.py rename to src/victron_energy_price_calculator/DistributionCostProvider/TauronG13SProvider.py diff --git a/DistributionCostProvider/__init__.py b/src/victron_energy_price_calculator/DistributionCostProvider/__init__.py similarity index 100% rename from DistributionCostProvider/__init__.py rename to src/victron_energy_price_calculator/DistributionCostProvider/__init__.py diff --git a/EnergyPrice.py b/src/victron_energy_price_calculator/EnergyPrice.py similarity index 100% rename from EnergyPrice.py rename to src/victron_energy_price_calculator/EnergyPrice.py diff --git a/EnergyPriceFactory.py b/src/victron_energy_price_calculator/EnergyPriceFactory.py similarity index 100% rename from EnergyPriceFactory.py rename to src/victron_energy_price_calculator/EnergyPriceFactory.py diff --git a/EnergyPriceProvider/DynamicPricesProvider.py b/src/victron_energy_price_calculator/EnergyPriceProvider/DynamicPricesProvider.py similarity index 100% rename from EnergyPriceProvider/DynamicPricesProvider.py rename to src/victron_energy_price_calculator/EnergyPriceProvider/DynamicPricesProvider.py diff --git a/EnergyPriceProvider/PstrykBuyProvider.py b/src/victron_energy_price_calculator/EnergyPriceProvider/PstrykBuyProvider.py similarity index 100% rename from EnergyPriceProvider/PstrykBuyProvider.py rename to src/victron_energy_price_calculator/EnergyPriceProvider/PstrykBuyProvider.py diff --git a/EnergyPriceProvider/TauronG11Provider.py b/src/victron_energy_price_calculator/EnergyPriceProvider/TauronG11Provider.py similarity index 100% rename from EnergyPriceProvider/TauronG11Provider.py rename to src/victron_energy_price_calculator/EnergyPriceProvider/TauronG11Provider.py diff --git a/EnergyPriceProvider/TauronG12Provider.py b/src/victron_energy_price_calculator/EnergyPriceProvider/TauronG12Provider.py similarity index 100% rename from EnergyPriceProvider/TauronG12Provider.py rename to src/victron_energy_price_calculator/EnergyPriceProvider/TauronG12Provider.py diff --git a/EnergyPriceProvider/TauronG12WProvider.py b/src/victron_energy_price_calculator/EnergyPriceProvider/TauronG12WProvider.py similarity index 100% rename from EnergyPriceProvider/TauronG12WProvider.py rename to src/victron_energy_price_calculator/EnergyPriceProvider/TauronG12WProvider.py diff --git a/EnergyPriceProvider/TauronG13Provider.py b/src/victron_energy_price_calculator/EnergyPriceProvider/TauronG13Provider.py similarity index 100% rename from EnergyPriceProvider/TauronG13Provider.py rename to src/victron_energy_price_calculator/EnergyPriceProvider/TauronG13Provider.py diff --git a/EnergyPriceProvider/__init__.py b/src/victron_energy_price_calculator/EnergyPriceProvider/__init__.py similarity index 100% rename from EnergyPriceProvider/__init__.py rename to src/victron_energy_price_calculator/EnergyPriceProvider/__init__.py diff --git a/PriceCalculator.py b/src/victron_energy_price_calculator/PriceCalculator.py similarity index 100% rename from PriceCalculator.py rename to src/victron_energy_price_calculator/PriceCalculator.py diff --git a/VictronPriceWriter.py b/src/victron_energy_price_calculator/VictronPriceWriter.py similarity index 100% rename from VictronPriceWriter.py rename to src/victron_energy_price_calculator/VictronPriceWriter.py diff --git a/src/victron_energy_price_calculator/__init__.py b/src/victron_energy_price_calculator/__init__.py new file mode 100644 index 0000000..256d7f2 --- /dev/null +++ b/src/victron_energy_price_calculator/__init__.py @@ -0,0 +1,2 @@ +__all__ = [] +__version__ = "0.1.0" \ No newline at end of file diff --git a/app.py b/src/victron_energy_price_calculator/app.py similarity index 100% rename from app.py rename to src/victron_energy_price_calculator/app.py diff --git a/src/victron_energy_price_calculator/requirements.txt b/src/victron_energy_price_calculator/requirements.txt new file mode 100644 index 0000000..88ae796 --- /dev/null +++ b/src/victron_energy_price_calculator/requirements.txt @@ -0,0 +1 @@ +psycopg[binary,pool]>=3.1,<3.3 diff --git a/utils/calendar_pl.py b/src/victron_energy_price_calculator/utils/calendar_pl.py similarity index 100% rename from utils/calendar_pl.py rename to src/victron_energy_price_calculator/utils/calendar_pl.py diff --git a/utils/logging.py b/src/victron_energy_price_calculator/utils/logging.py similarity index 100% rename from utils/logging.py rename to src/victron_energy_price_calculator/utils/logging.py diff --git a/utils/time.py b/src/victron_energy_price_calculator/utils/time.py similarity index 100% rename from utils/time.py rename to src/victron_energy_price_calculator/utils/time.py