Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

general package maintenance #45

Merged
merged 11 commits into from
Apr 12, 2024
12 changes: 7 additions & 5 deletions .github/workflows/python-package-conda.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -35,5 +33,9 @@ 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:
github-token: ${{ github.token }}
36 changes: 18 additions & 18 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
13 changes: 4 additions & 9 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -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



Expand All @@ -20,4 +16,3 @@ Indices and tables
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

3 changes: 2 additions & 1 deletion environment-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ channels:
- conda-forge
- defaults
dependencies:
- python>=3.8
- progressbar2
- pathos>=0.2
- numpy
Expand All @@ -14,4 +15,4 @@ dependencies:
- pip
- sqlite
- libspatialite
- sphinx<7.0 # https://github.com/readthedocs/sphinx_rtd_theme/issues/1463
- sphinx
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ channels:
- conda-forge
- defaults
dependencies:
- python>=3.8
- progressbar2
- pathos>=0.2
- numpy
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "[email protected]" }
Expand All @@ -23,10 +23,10 @@ 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"] }
readme = { file = ["README.md"] }
readme = { file = ["README.md"], content-type = "text/markdown" }

[tool.setuptools_scm]
2 changes: 1 addition & 1 deletion readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 2 additions & 6 deletions spatialist/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Loading