Skip to content

Commit

Permalink
Prerelease commit
Browse files Browse the repository at this point in the history
  • Loading branch information
strawpants committed Mar 19, 2024
1 parent f27a08f commit 986a381
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 27 deletions.
103 changes: 87 additions & 16 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,105 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package
name: Publish geoslurp 📦 to PyPI

on: release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

jobs:
deploy:
permissions:
contents: read

jobs:
build:
name: Build distribution 📦
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
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
python-version: "3.x"
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a source tarball
run: python3 -m build -s
- name: Store the distribution packages
uses: actions/upload-artifact@v3
with:
name: python-package-distributions
path: dist/
publish-to-pypi:
name: >-
Publish geoslurp Python 🐍 distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/geoslurp
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
github-release:
name: >-
Sign the Python 🐍 distribution 📦 with Sigstore
and upload them to GitHub Release
needs:
- publish-to-pypi
runs-on: ubuntu-latest

permissions:
contents: write # IMPORTANT: mandatory for making GitHub Releases
id-token: write # IMPORTANT: mandatory for sigstore

steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Sign the dists with Sigstore
uses: sigstore/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
inputs: >-
./dist/*.tar.gz
./dist/*.whl
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release create
'${{ github.ref_name }}'
--repo '${{ github.repository }}'
--notes ""
- name: Upload artifact signatures to GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
# Upload to GitHub Release using the `gh` CLI.
# `dist/` contains the built packages, and the
# sigstore-produced signatures and certificates.
run: >-
gh release upload
'${{ github.ref_name }}' dist/**
--repo '${{ github.repository }}'
17 changes: 7 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
# Download and manage datasets in a PostGreSQL database with the PostGIS
The idea is that this tool contains script to download (i.e. **slurp**) commonly used datasets and to register them in a postgresql+postgis database. This database can then be queried allowing the retrieval of the relevant data or datafiles.

The main documentation lives at [wobbly.earth/geoslurp](https://wobbly.earth/geoslurp)
The main documentation lives at [geoslurp.wobbly.earth](https://geoslurp.wobbly.earth)

## Workings

The geoslurp module itself is a pure python module, which acts as a client. For this to work one needs to [set up a running PostGreSQL database](https://github.com/strawpants/docker-geoslurp).

![Image of geoslurp clients versus database server](docsrc/graphics/geoslurp_network.svg)
![Image of geoslurp clients versus database server](docs/source/_static/geoslurp_network.svg)

## Change log
* Use python entry points to register


## TODO for release v3

* Fix doc generation and move to readthedocs
* Renew links to docs and static images
* check and fix github actions
* Add change log to this README

## TODO's
* Move remaining 'orphaned' datasets to suitable python packages modules or include in the main package
* Improve this README
2 changes: 1 addition & 1 deletion defaultheader.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# License along with Frommle; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

# Author Roelof Rietbroek ([email protected]), 2022
# Author Roelof Rietbroek ([email protected]), 2024

0 comments on commit 986a381

Please sign in to comment.