From c74f5075427048c894259bd4d94a272f5853ab5b Mon Sep 17 00:00:00 2001 From: Ting Sun Date: Thu, 3 Jul 2025 15:36:33 +0100 Subject: [PATCH] Remove redundant setup.py and document version update process - Remove umep-reqs/setup.py as all configuration is now in pyproject.toml - Add comprehensive version management instructions to README - Document how to update SuPy and other dependencies - Clarify that package versioning is handled by setuptools_scm via Git tags Addresses question raised in #5 and documented in #8 --- README.md | 49 +++++++++++++++++++++++++++++ umep-reqs/setup.py | 78 ---------------------------------------------- 2 files changed, 49 insertions(+), 78 deletions(-) delete mode 100644 umep-reqs/setup.py diff --git a/README.md b/README.md index d35ca2c..67945ed 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,51 @@ # umep-reqs A minimal Python package outlining UMEP dependencies. + +## Installation + +```bash +pip install umep-reqs +``` + +## Version Management + +This package uses `setuptools_scm` for automatic versioning based on Git tags. The package version is automatically determined from the latest Git tag. + +### How to Update Dependencies + +When a new version of SuPy or other dependencies is released: + +1. **Update the dependency version** in `pyproject.toml`: + ```toml + dependencies = [ + "supy==2025.6.2.dev0", # Update this version number + "numba==0.59.0", + # ... other dependencies + ] + ``` + +2. **Commit your changes**: + ```bash + git add pyproject.toml + git commit -m "Update SuPy to version X.X.X" + ``` + +3. **Create a new release tag**: + ```bash + git tag 2.6 # Use the next version number + git push origin main + git push origin 2.6 + ``` + +4. **The CI/CD pipeline will automatically**: + - Build the package with the new dependencies + - Publish to Test PyPI (for all pushes) + - Publish to PyPI (for tagged releases) + - Create a GitHub release + +### Important Notes + +- **DO NOT** manually update version numbers in code - they are managed by Git tags +- All dependency updates should be made in `pyproject.toml` +- The `setup.py` file has been removed in favour of modern `pyproject.toml` configuration +- Version numbers follow semantic versioning (MAJOR.MINOR.PATCH) diff --git a/umep-reqs/setup.py b/umep-reqs/setup.py deleted file mode 100644 index 159bca9..0000000 --- a/umep-reqs/setup.py +++ /dev/null @@ -1,78 +0,0 @@ -from setuptools import setup, find_packages -from pathlib import Path - -with open(Path(__file__).parent.parent / "README.md", "r", encoding="utf-8") as f: - long_description = f.read() - -setup( - name="umep-reqs", - use_scm_version=True, - setup_requires=["setuptools_scm"], - packages=find_packages(), - install_requires=[ - "supy==2025.6.2.dev0", - "numba==0.59.0", - "jaydebeapi==1.2.3", - "netCDF4", - "openpyxl", - "rioxarray", - "pydantic", - "target-py", - ], - author="UMEP dev team", - long_description=long_description, - long_description_content_type="text/markdown", -) - - - - - - - - -# from setuptools import setup, find_packages -# from pathlib import Path - -# import os - - -# def get_version(): - # try: - # from setuptools_scm import get_version - - # if os.environ.get("GITHUB_ACTIONS") == "true": - # # Use 'no-local-version' scheme for GitHub Actions - # return get_version(local_scheme="no-local-version") - # else: - # # Use the default scheme for local environments - # return get_version() - # except ImportError: - # print("setuptools_scm not installed, using default version '0.0'") - # return "0.0" - - -# with open(Path(__file__).parent.parent / "README.md", "r", encoding="utf-8") as f: - # long_description = f.read() - -# setup( - # name="umep-reqs", - # version=get_version(), # Use setuptools_scm to get version from git tags. - # packages=find_packages(), - # install_requires=[ - # "supy==2025.6.2.dev0", # Replace with actual dependency and version number. - # "numba==0.59.0", - # "jaydebeapi==1.2.3", - # "netCDF4", - # "openpyxl", - # "rioxarray", - # "pydantic", - # "target-py", # "dependency2==y.y.y" - # ], - # author="UMEP dev team", - # long_description=long_description, - # long_description_content_type="text/markdown", - -# ) - -