From 8397999480ecae4fe971b10b8d1841ffe65099c1 Mon Sep 17 00:00:00 2001 From: John Truckenbrodt Date: Fri, 12 Apr 2024 11:37:33 +0200 Subject: [PATCH 01/11] update copyright years --- LICENSE.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE.txt b/LICENSE.txt index c331627..06a691f 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2015-2021, John Truckenbrodt +# Copyright (c) 2015-2024, John Truckenbrodt Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the From 80425b7225894fd9633bd5246f89297a85be3f8e Mon Sep 17 00:00:00 2001 From: John Truckenbrodt Date: Fri, 12 Apr 2024 11:38:32 +0200 Subject: [PATCH 02/11] [github actions] renamed and cleaned up workflow --- .github/workflows/python-package-conda.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 13537fe..06bd20b 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -1,12 +1,10 @@ -name: Python Package using Conda +name: conda build on: [ push ] jobs: build-linux: runs-on: ubuntu-latest - env: - PROJ_DATA: $CONDA/share/proj strategy: max-parallel: 5 steps: From de0387f7bd9d90ead629d4c16527b6b7f3a0ecfb Mon Sep 17 00:00:00 2001 From: John Truckenbrodt Date: Fri, 12 Apr 2024 11:39:08 +0200 Subject: [PATCH 03/11] [pyproject] fixed readme file type --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6c0983c..339c3d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,6 +27,6 @@ docs = ["sphinx", "sphinxcontrib-bibtex<2.0.0"] [tool.setuptools.dynamic] dependencies = { file = ["requirements.txt"] } -readme = { file = ["README.md"] } +readme = { file = ["README.md"], content-type = "text/markdown" } [tool.setuptools_scm] From 832dcb3ff03c355d5da31d9a989cfd4db5f52c9f Mon Sep 17 00:00:00 2001 From: John Truckenbrodt Date: Fri, 12 Apr 2024 11:40:03 +0200 Subject: [PATCH 04/11] [readthedocs] updated mambaforge version --- readthedocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readthedocs.yml b/readthedocs.yml index 8262267..9e81421 100644 --- a/readthedocs.yml +++ b/readthedocs.yml @@ -3,7 +3,7 @@ version: 2 build: os: "ubuntu-22.04" tools: - python: "mambaforge-4.10" + python: "mambaforge-22.9" conda: environment: environment-doc.yml From f6598aad53b5fbccea8ccdfe7f8e8b2a04865834 Mon Sep 17 00:00:00 2001 From: John Truckenbrodt Date: Fri, 12 Apr 2024 11:40:37 +0200 Subject: [PATCH 05/11] [README] updated status badges --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6df1531..019e285 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # spatialist -[![Linux Build Status][1]][2] [![Windows Build status][3]][4] [![Coverage Status][5]][6] +[![Conda Build Status][1]][2] [![Coverage Status][5]][6] [![Documentation Status][7]][8] [![PyPI version][12]][13] [![Conda Version][15]][16] ### A Python module for spatial data handling @@ -15,10 +15,8 @@ Detailed instructions can be found in the documentation [here][14]. ### Tutorial A jupyter notebook and test data are available [here][11]. -[1]: https://www.travis-ci.com/johntruckenbrodt/spatialist.svg?branch=master +[1]: https://github.com/johntruckenbrodt/spatialist/actions/workflows/python-package-conda.yml/badge.svg [2]: https://www.travis-ci.com/johntruckenbrodt/spatialist -[3]: https://ci.appveyor.com/api/projects/status/3nxj2nnmp21ig860?svg=true -[4]: https://ci.appveyor.com/project/johntruckenbrodt/spatialist [5]: https://coveralls.io/repos/github/johntruckenbrodt/spatialist/badge.svg?branch=master [6]: https://coveralls.io/github/johntruckenbrodt/spatialist?branch=master [7]: https://readthedocs.org/projects/spatialist/badge/?version=latest From 0fce6f1f7e765ca1c14560bc34ce8211577fffb7 Mon Sep 17 00:00:00 2001 From: John Truckenbrodt Date: Fri, 12 Apr 2024 12:08:36 +0200 Subject: [PATCH 06/11] update sphinx requirements --- environment-doc.yml | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/environment-doc.yml b/environment-doc.yml index cb41302..ded227c 100644 --- a/environment-doc.yml +++ b/environment-doc.yml @@ -14,4 +14,4 @@ dependencies: - pip - sqlite - libspatialite - - sphinx<7.0 # https://github.com/readthedocs/sphinx_rtd_theme/issues/1463 + - sphinx diff --git a/pyproject.toml b/pyproject.toml index 339c3d8..67e01de 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,7 @@ documentation = "https://spatialist.readthedocs.io/en/latest/" [project.optional-dependencies] test = ["pytest"] -docs = ["sphinx", "sphinxcontrib-bibtex<2.0.0"] +docs = ["sphinx"] [tool.setuptools.dynamic] dependencies = { file = ["requirements.txt"] } From 25f1baf5bfddf7087d0288f7f06a3201dfab48f7 Mon Sep 17 00:00:00 2001 From: John Truckenbrodt Date: Fri, 12 Apr 2024 13:06:07 +0200 Subject: [PATCH 07/11] [github actions] renamed and formatted 'pypi publish' --- .github/workflows/python-publish.yml | 36 ++++++++++++++-------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index bdaab28..809965e 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -6,11 +6,11 @@ # separate terms of service, privacy policy, and support # documentation. -name: Upload Python Package +name: pypi publish on: release: - types: [published] + types: [ published ] permissions: contents: read @@ -21,19 +21,19 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v3 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install build - - name: Build package - run: python -m build - - name: Publish package - uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 - with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build + - name: Build package + run: python -m build + - name: Publish package + uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} From 74d0c26934ab47065a1232ea773ad626c04524ae Mon Sep 17 00:00:00 2001 From: John Truckenbrodt Date: Fri, 12 Apr 2024 13:29:48 +0200 Subject: [PATCH 08/11] [github actions] add coveralls action --- .github/workflows/python-package-conda.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 06bd20b..7c04ea1 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -35,3 +35,7 @@ jobs: run: | conda install pytest pytest + - name: Publish to coveralls.io + uses: coverallsapp/github-action@v2 + with: + github-token: ${{ github.token }} From 5a0d4be2da050b47a2b4b56022097331499dc478 Mon Sep 17 00:00:00 2001 From: John Truckenbrodt Date: Fri, 12 Apr 2024 13:35:05 +0200 Subject: [PATCH 09/11] [github actions] generate code coverage --- .github/workflows/python-package-conda.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 7c04ea1..6e94523 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -33,8 +33,8 @@ jobs: pip install . - name: Test with pytest run: | - conda install pytest - pytest + conda install pytest coverage + coverage run -m pytest - name: Publish to coveralls.io uses: coverallsapp/github-action@v2 with: From a2589601a77a5d1555d342533c6342e9e3ded419 Mon Sep 17 00:00:00 2001 From: John Truckenbrodt Date: Fri, 12 Apr 2024 13:45:43 +0200 Subject: [PATCH 10/11] [docs] updated authors, formatting --- docs/source/conf.py | 2 +- docs/source/index.rst | 13 ++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 6d08696..9e63a2c 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -18,7 +18,7 @@ from pkg_resources import get_distribution project = 'spatialist' -authors = 'John Truckenbrodt, Felix Cremer, Ismail Baris' +authors = 'John Truckenbrodt, Ismail Baris, Felix Cremer, Marco Wolsza, Tyler Anderson' year = datetime.datetime.now().year # If extensions (or modules to document with autodoc) are in another directory, diff --git a/docs/source/index.rst b/docs/source/index.rst index 311e3d3..b0169ad 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -1,16 +1,12 @@ -.. spatialist documentation master file, created by - sphinx-quickstart on Wed Mar 28 16:58:10 2018. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - Welcome to spatialist's documentation! ====================================== .. toctree:: + :maxdepth: 1 - installation - spatialist - changelog + installation + spatialist + changelog @@ -20,4 +16,3 @@ Indices and tables * :ref:`genindex` * :ref:`modindex` * :ref:`search` - From 08f81981e7f794c9fd62cbeb4ead23d921d61ed2 Mon Sep 17 00:00:00 2001 From: John Truckenbrodt Date: Fri, 12 Apr 2024 14:07:31 +0200 Subject: [PATCH 11/11] use importlib, require python>=3.8 --- environment-doc.yml | 1 + environment.yml | 1 + pyproject.toml | 2 +- spatialist/__init__.py | 8 ++------ 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/environment-doc.yml b/environment-doc.yml index ded227c..baf5d7d 100644 --- a/environment-doc.yml +++ b/environment-doc.yml @@ -3,6 +3,7 @@ channels: - conda-forge - defaults dependencies: + - python>=3.8 - progressbar2 - pathos>=0.2 - numpy diff --git a/environment.yml b/environment.yml index 6be6578..f10264a 100644 --- a/environment.yml +++ b/environment.yml @@ -3,6 +3,7 @@ channels: - conda-forge - defaults dependencies: + - python>=3.8 - progressbar2 - pathos>=0.2 - numpy diff --git a/pyproject.toml b/pyproject.toml index 67e01de..15ffdd9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2", "wheel"] [project] name = "spatialist" description = "a Python module for spatial data handling" -requires-python = ">=3.5" +requires-python = ">=3.8" license = { file = "LICENSE.txt" } maintainers = [ { name = "John Truckenbrodt", email = "john.truckenbrodt@dlr.de" } diff --git a/spatialist/__init__.py b/spatialist/__init__.py index a23c8a7..67d2cdb 100644 --- a/spatialist/__init__.py +++ b/spatialist/__init__.py @@ -10,9 +10,5 @@ from .raster import Raster, stack, rasterize from .sqlite_util import sqlite_setup, sqlite3 -from pkg_resources import get_distribution, DistributionNotFound -try: - __version__ = get_distribution(__name__).version -except DistributionNotFound: - # package is not installed - pass +import importlib.metadata +__version__ = importlib.metadata.version(__name__)