From 261e4d75e1f5645d327e99c610d6a79c13a93043 Mon Sep 17 00:00:00 2001 From: Cristiano Singulani Date: Wed, 20 Mar 2024 16:24:48 +0000 Subject: [PATCH] Fixed lib to work with python 3.12 --- .devcontainer/devcontainer.json | 1 - .github/workflows/build-documentation.yml | 2 +- .github/workflows/linting.yml | 3 ++- .github/workflows/publish-to-pypi.yml | 7 ++---- .github/workflows/smoke-test.yml | 4 ++-- .github/workflows/testing-and-coverage.yml | 4 ++-- README.md | 3 ++- docs/requirements.txt | 6 ++--- pyproject.toml | 27 +++++++++++++--------- 9 files changed, 30 insertions(+), 27 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index eba6625..3e45788 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -29,7 +29,6 @@ "aaron-bond.better-comments", "PKief.material-icon-theme", "njpwerner.autodocstring", - "TabNine.tabnine-vscode", "ms-azuretools.vscode-docker" ] } diff --git a/.github/workflows/build-documentation.yml b/.github/workflows/build-documentation.yml index 917ecf7..055f647 100644 --- a/.github/workflows/build-documentation.yml +++ b/.github/workflows/build-documentation.yml @@ -8,7 +8,7 @@ on: jobs: build: - + name: build_doc runs-on: ubuntu-latest steps: diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index bc0ef2c..e13ed83 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -11,10 +11,11 @@ on: jobs: build: + name: lint runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.8', '3.9', '3.10'] + python-version: ['3.10', '3.11', '3.12'] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 928bde7..e0b69d8 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -17,7 +17,7 @@ permissions: jobs: pypi-publish: - name: Upload release to PyPI + name: pypi_publish runs-on: ubuntu-latest environment: name: pypi @@ -37,7 +37,4 @@ jobs: - name: Build package run: python -m build - name: Publish package - uses: pypa/gh-action-pypi-publish@release/v1 - # with: - # user: __token__ - # password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file + uses: pypa/gh-action-pypi-publish@release/v1 \ No newline at end of file diff --git a/.github/workflows/smoke-test.yml b/.github/workflows/smoke-test.yml index e319191..e632649 100644 --- a/.github/workflows/smoke-test.yml +++ b/.github/workflows/smoke-test.yml @@ -9,11 +9,11 @@ on: jobs: build: - + name: smoke_test runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.8', '3.9', '3.10'] + python-version: ['3.10', '3.11', '3.12'] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/testing-and-coverage.yml b/.github/workflows/testing-and-coverage.yml index e653aa5..ec1a849 100644 --- a/.github/workflows/testing-and-coverage.yml +++ b/.github/workflows/testing-and-coverage.yml @@ -11,11 +11,11 @@ on: jobs: build: - + name: test_and_coverage runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.8', '3.9', '3.10'] + python-version: ['3.10', '3.11', '3.12'] steps: - uses: actions/checkout@v3 diff --git a/README.md b/README.md index 1deef03..022bb6c 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,8 @@ A Python library to access data from the [Photo-z Server](https://pz-server-dev.linea.org.br/). -The Photo-z Server is an online service based on software developed and delivered as part of the in-kind contribution program BRA-LIN, from LIneA to the Rubin Observatory's LSST. The Photo-z Server is open source, and the code is available on the GitHub repository [linea-it/pzserver_app](https://github.com/linea-it/pzserver_app). +The Photo-z Server is an online service based on software developed and delivered as part of the in-kind contribution program BRA-LIN, from LIneA to the Rubin Observatory's LSST. The Photo-z Server is open source, and the code is +available on the GitHub repository [linea-it/pzserver_app](https://github.com/linea-it/pzserver_app). An overview of this and other contributions is available [here](https://linea-it.github.io/pz-lsst-inkind-doc/). The API documentation is available [here](https://linea-it.github.io/pzserver). diff --git a/docs/requirements.txt b/docs/requirements.txt index 936c3af..4104a2b 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,6 +1,6 @@ -sphinx==6.1.3 -sphinx_rtd_theme==1.2.0 -sphinx-autoapi==2.0.1 +sphinx>=7.0.0,<8 +sphinx_rtd_theme>1.2.0,<2 +sphinx-autoapi>=3.0.0,<4 ghp-import nbsphinx ipython diff --git a/pyproject.toml b/pyproject.toml index ed22b3f..7857f17 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,23 +1,28 @@ [project] name = "pzserver" license = {file = "LICENSE"} +dynamic = ["version"] readme = "README.md" authors = [ { name = "LIneA", email = "itteam@linea.org.br" } ] +requires-python = ">=3.8,<3.13" classifiers = [ "Development Status :: 4 - Beta", "License :: OSI Approved :: MIT License", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "Operating System :: OS Independent", - "Programming Language :: Python", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ] -dynamic = ["version"] dependencies = [ "deprecated", - "ipykernel", # Support for Jupyter notebooks - "numpy>=1.23, <1.24", + "numpy>=1.23", "pandas>=1.2.0", "requests>=2.23.0", "astropy>=5.0.0", @@ -26,7 +31,6 @@ dependencies = [ "Jinja2>=3.1.2", "ipython>=8.5.0", "h5py>=3.8.0", - "jupyterlab", ] # On a mac, install optional dependencies with `pip install '.[dev]'` (include the single quotes) @@ -35,24 +39,25 @@ dev = [ "pytest", "pytest-cov", # Used to report total code coverage "pre-commit", # Used to run checks before finalizing a git commit - "sphinx==6.1.3", # Used to automatically generate documentation - "sphinx_rtd_theme==1.2.0", # Used to render documentation - "sphinx-autoapi==2.0.1", # Used to automatically generate api documentation + "sphinx>=7.0.0,<8", # Used to automatically generate documentation + "sphinx_rtd_theme>=1.2.0,<2", # Used to render documentation + "sphinx-autoapi>=3.0.0,<4", # Used to automatically generate api documentation "pylint", # Used for static linting of files # if you add dependencies here while experimenting in a notebook and you # want that notebook to render in your documentation, please add the # dependencies to ./docs/requirements.txt as well. + "ipykernel", # Support for Jupyter notebooks "nbconvert", # Needed for pre-commit check to clear output from Python notebooks "nbsphinx", # Used to integrate Python notebooks into Sphinx documentation "ipython", # Also used in building notebooks into Sphinx + "jupyterlab", "matplotlib", # Used in sample notebook intro_notebook.ipynb - "numpy", # Used in sample notebook intro_notebook.ipynb ] [build-system] requires = [ - "setuptools>=45", # Used to build and package the Python project - "setuptools_scm>=6.2", # Gets release version from git. Makes it available programmatically + "setuptools>=66", # Used to build and package the Python project + "setuptools_scm>=8", # Gets release version from git. Makes it available programmatically ] build-backend = "setuptools.build_meta"