From aeb2da30d8a7c0ba2b24d52e581f4a0a448e990c Mon Sep 17 00:00:00 2001 From: Peter Dudfield <34686298+peterdudfield@users.noreply.github.com> Date: Fri, 13 Sep 2024 09:08:25 +0100 Subject: [PATCH] Pyproject.toml (#197) * reset for merge conflict * #185 change from setup.py to pyproject.toml (#192) * #185 change from setup.py to pyproject.toml * #192 issue: change from setup.py to pyproject.toml added the required changes mentioned. * #985 issue: error fix * fix * remove readme-content-type * adjust current version --------- Co-authored-by: Rohan Singh <85754035+Brohan7524@users.noreply.github.com> --- .bumpversion.cfg | 6 ++--- pyproject.toml | 60 ++++++++++++++++++++++++++++++++++++++++++++++++ requirements.txt | 19 --------------- setup.py | 24 ------------------- 4 files changed, 63 insertions(+), 46 deletions(-) create mode 100644 pyproject.toml delete mode 100644 requirements.txt delete mode 100644 setup.py diff --git a/.bumpversion.cfg b/.bumpversion.cfg index c126a2d..9c239a0 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -4,6 +4,6 @@ tag = True current_version = 1.0.72 message = Bump version: {current_version} → {new_version} [skip ci] -[bumpversion:file:setup.py] -search = version="{current_version}" -replace = version="{new_version}" +[bumpversion:file:pyproject.toml] +search = version = "{current_version}" +replace = version = "{new_version}" diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..0bc020a --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,60 @@ +[build-system] +requires = ["setuptools", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "quartz_solar_forecast" +version = "1.0.72" +description = "Open Source Solar Forecasting for a Site" +authors = [ + { name = "Peter Dudfield", email = "info@openclimatefix.org" } +] +readme = "README.md" +requires-python = ">=3.6" +license = { text = "MIT" } + +dependencies = [ + "xarray==2022.12.0", + "pv-site-prediction==0.1.19", + "pydantic==2.6.2", + "huggingface_hub==0.17.3", # only for evaluation + "python-dotenv==1.0.1", + "openmeteo-requests==1.2.0", + "requests-cache==1.2.0", + "retry-requests==2.0.0", + "gdown==5.1.0", + "xgboost==2.0.3", + "plotly", + "typer", + "streamlit", + "async_timeout", + "uvicorn", + "fastapi", + "pydantic_settings", + "httpx" +] + +[project.urls] +Company = "Open Climate Fix Ltd" +"Source Code" = "https://github.com/openclimatefix/Open-Source-Quartz-Solar-Forecast.git" + +[tool.setuptools] +packages = { find = { include = ["*"] } } +package-data = { "quartz_solar_forecast" = ["*"] } + +[project.optional-dependencies] +dev = [] + +[tool.mypy] + +[tool.ruff] +line-length = 100 +exclude = ["tests", "data", "scripts", "^tests/"] +disallow-untyped-defs = true +disallow-any-unimported = true +no-implicit-optional = true +check-untyped-defs = true +warn-return-any = true +warn-unused-ignores = true +show-error-codes = true +warn-unreachable = true diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 9f9ae96..0000000 --- a/requirements.txt +++ /dev/null @@ -1,19 +0,0 @@ -pandas==2.2.1 -xarray==2022.12.0 -pv-site-prediction==0.1.19 -pydantic==2.6.2 -huggingface_hub== 0.17.3 # only for evaluation -python-dotenv==1.0.1 -openmeteo-requests==1.2.0 -requests-cache==1.2.0 -retry-requests==2.0.0 -gdown==5.1.0 -xgboost==2.0.3 -plotly -typer -streamlit -async_timeout -uvicorn -fastapi -pydantic_settings -httpx diff --git a/setup.py b/setup.py deleted file mode 100644 index 33a130e..0000000 --- a/setup.py +++ /dev/null @@ -1,24 +0,0 @@ -""" Usual setup file for package """ -# read the contents of your README file -from pathlib import Path - -from setuptools import find_packages, setup - -this_directory = Path(__file__).parent -long_description = (this_directory / "README.md").read_text() -install_requires = (this_directory / "requirements.txt").read_text().splitlines() - -setup( - name="quartz_solar_forecast", - version="1.0.72", - license="MIT", - author="Peter Dudfield", - author_email="info@openclimatefix.org", - company="Open Climate Fix Ltd", - install_requires=install_requires, - long_description=long_description, - long_description_content_type="text/markdown", - include_package_data=True, - packages=find_packages(), - description="Open Source Solar Forecasting for a Site", -)