From 6e445d8f0d7b63b6018bd7653913d738ae05f223 Mon Sep 17 00:00:00 2001 From: Steffen Meinecke Date: Mon, 8 Apr 2024 15:59:46 +0200 Subject: [PATCH 1/6] Release/v1.5.0 (#43) * change test_release.yml --- .github/workflows/test_release.yml | 7 +++---- .github/workflows/upload_release.yml | 2 +- README.rst | 2 -- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test_release.yml b/.github/workflows/test_release.yml index 5799272..fd1b0ea 100644 --- a/.github/workflows/test_release.yml +++ b/.github/workflows/test_release.yml @@ -19,7 +19,6 @@ jobs: matrix: python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] os: [ ubuntu-latest, windows-latest ] - group: [ 1, 2 ] steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it @@ -34,7 +33,7 @@ jobs: run: | python -m pip install --upgrade pip python -m pip install pytest-split matplotlib geopandas - pip install -e . + python -m pip install .["all"] - name: Install specific dependencies (Windows) if: matrix.os == 'windows-latest' @@ -52,8 +51,8 @@ jobs: - name: List all installed packages run: | - pip list + python -m pip list - name: Test with pytest run: | - pytest --splits 2 --group ${{ matrix.group }} --pyargs simbench.test + python -m pytest --pyargs simbench.test diff --git a/.github/workflows/upload_release.yml b/.github/workflows/upload_release.yml index b214356..717feb9 100644 --- a/.github/workflows/upload_release.yml +++ b/.github/workflows/upload_release.yml @@ -48,6 +48,6 @@ jobs: TWINE_REPOSITORY: pypi - name: Sleep for 150s to make release available - uses: juliangruber/sleep-action@v1 + uses: juliangruber/sleep-action@v2 with: time: 300s diff --git a/README.rst b/README.rst index 174bbd7..b8057a6 100644 --- a/README.rst +++ b/README.rst @@ -3,8 +3,6 @@ :target: https://www.simbench.net :alt: SimBench logo -| - .. image:: https://badge.fury.io/py/simbench.svg :target: https://pypi.python.org/pypi/simbench :alt: PyPI From b82751022fe75ee249244520f041e57c6d49acb9 Mon Sep 17 00:00:00 2001 From: Steffen Meinecke Date: Mon, 8 Apr 2024 17:21:08 +0200 Subject: [PATCH 2/6] update readthedocs.yml to fix the docs build --- .github/workflows/upload_release.yml | 2 +- .readthedocs.yml | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/upload_release.yml b/.github/workflows/upload_release.yml index 85fd6c5..254cb4a 100644 --- a/.github/workflows/upload_release.yml +++ b/.github/workflows/upload_release.yml @@ -45,7 +45,7 @@ jobs: TWINE_PASSWORD: ${{ secrets.PYPI }} TWINE_REPOSITORY: pypi - - name: Sleep for 150s to make release available + - name: Sleep for 300s to make release available uses: juliangruber/sleep-action@v2 with: time: 300s diff --git a/.readthedocs.yml b/.readthedocs.yml index c93ce23..d0656b6 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,5 +1,15 @@ +# Read the Docs configuration file for Sphinx projects +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details version: 2 +build: + os: ubuntu-22.04 + tools: + python: "3.11" + +sphinx: + configuration: doc/conf.py + python: version: 3.8 install: From 70f3ac710a7134e12b85b8e32f48173025e5eaac Mon Sep 17 00:00:00 2001 From: Steffen Meinecke Date: Mon, 8 Apr 2024 17:42:56 +0200 Subject: [PATCH 3/6] remove duplicated python version definition in .readthedocs.yml --- .readthedocs.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index d0656b6..3b7f9d7 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -11,9 +11,8 @@ sphinx: configuration: doc/conf.py python: - version: 3.8 install: - method: pip path: . extra_requirements: - - docs,plotting \ No newline at end of file + - docs,plotting From e1d79b2728b0bd331cac3634727059e26888cef3 Mon Sep 17 00:00:00 2001 From: hkoertge Date: Tue, 9 Apr 2024 13:02:20 +0200 Subject: [PATCH 4/6] fixes for build --- .github/workflows/upload_release.yml | 15 +++++++-------- CHANGELOG.rst | 10 ++++++++++ MANIFEST.in | 6 +++++- pyproject.toml | 6 +++--- setup.py | 6 ++++++ 5 files changed, 31 insertions(+), 12 deletions(-) diff --git a/.github/workflows/upload_release.yml b/.github/workflows/upload_release.yml index 254cb4a..ecf0592 100644 --- a/.github/workflows/upload_release.yml +++ b/.github/workflows/upload_release.yml @@ -12,16 +12,13 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - upload: # The type of runner that the job will run on runs-on: ubuntu-latest - # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v4 - # Sets up python3 - uses: actions/setup-python@v5 with: @@ -32,20 +29,22 @@ jobs: # Upgrade pip python3 -m pip install --upgrade pip # Install twine - python3 -m pip install setuptools wheel twine - + python3 -m pip install build setuptools wheel twine # Upload to PyPI - name: Build and Upload to PyPI run: | - python3 setup.py sdist --formats=zip - twine check dist/* --strict + python3 -m build + python3 -m twine check dist/* --strict python3 -m twine upload dist/* env: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.PYPI }} TWINE_REPOSITORY: pypi - - name: Sleep for 300s to make release available uses: juliangruber/sleep-action@v2 with: time: 300s + - name: Install simbench from PyPI + run: | + python3 -m pip install simbench + python3 -c "import simbench; print(simbench.__version__)" diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 0a50b0b..514f46c 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,16 @@ Change Log ============= +[1.5.2] - 2024-04-09 +---------------------- +- [CHANGED] readded copyright notice to setup.py and updated date +- [CHANGED] added prune to MANIFEST.in to exclude doc and tutorials from wheel builds +- [CHANGED] removed gitlab ci files from MANIFEST.in to keep them out of wheel builds +- [CHANGED] updated pyproject.toml to fix build issues +- [CHANGED] updated upload_release.yml to not call setup.py anymore (see https://packaging.python.org/en/latest/discussions/setup-py-deprecated/) +- [CHANGED] updated upload_release.yml to build and upload src dist as .tar.gz and .whl +- [CHANGED] updated upload_release.yml to install from PyPI and test the installed package + [1.5.1] - 2024-04-08 ---------------------- [FIXED] spelling mistake in pyproject.toml diff --git a/MANIFEST.in b/MANIFEST.in index 78e18cd..f6ab14c 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,8 @@ -include LICENSE AUTHORS README.rst CHANGELOG.rst .github/**/*.yml +include LICENSE AUTHORS README.rst CHANGELOG.rst + global-include *.csv global-include *.json global-include *.txt + +prune doc* +prune tutorials* diff --git a/pyproject.toml b/pyproject.toml index 3d9d231..b50edcc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "simbench" -version = "1.5.1" # File format version '__format_version__' is tracked in _version.py +version = "1.5.1" authors = [ { name = "Steffen Meinecke", email = "steffen.meinecke@uni-kassel.de" } ] @@ -65,8 +65,8 @@ all = [ ] # "shapely", "pyproj", "fiona" are dependencies of geopandas and should be already available -[tool.setuptools.packages.find] -where = ["simbench"] +[tool.setuptools] +packages = ["simbench"] [tool.pytest.ini_options] addopts = ["--strict-markers"] diff --git a/setup.py b/setup.py index fc1f76c..005fe37 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,9 @@ +# -*- coding: utf-8 -*- + +# Copyright (c) 2019-2024 by University of Kassel, Tu Dortmund, RWTH Aachen University and Fraunhofer +# Institute for Energy Economics and Energy System Technology (IEE) Kassel and individual +# contributors (see AUTHORS file for details). All rights reserved. + from setuptools import setup setup() \ No newline at end of file From b82a7f2c761e0fc352a218ec4a09630aea26e987 Mon Sep 17 00:00:00 2001 From: hkoertge Date: Tue, 9 Apr 2024 15:53:20 +0200 Subject: [PATCH 5/6] fixed issue in pyproject.toml --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index b50edcc..3adf882 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,8 +65,8 @@ all = [ ] # "shapely", "pyproj", "fiona" are dependencies of geopandas and should be already available -[tool.setuptools] -packages = ["simbench"] +[tool.setuptools.packages] +find = {} [tool.pytest.ini_options] addopts = ["--strict-markers"] From a508235bea474c3b5cfdb80fdbad6f3f2b69565e Mon Sep 17 00:00:00 2001 From: Steffen Meinecke Date: Tue, 9 Apr 2024 16:00:45 +0200 Subject: [PATCH 6/6] prepare release v1.5.2 --- CHANGELOG.rst | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 514f46c..be13a6f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -13,7 +13,7 @@ Change Log [1.5.1] - 2024-04-08 ---------------------- -[FIXED] spelling mistake in pyproject.toml +- [FIXED] spelling mistake in pyproject.toml [1.5.0] - 2024-04-08 ---------------------- diff --git a/pyproject.toml b/pyproject.toml index b50edcc..45971cf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "simbench" -version = "1.5.1" +version = "1.5.2" authors = [ { name = "Steffen Meinecke", email = "steffen.meinecke@uni-kassel.de" } ]