diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 49f8ac8..f998b64 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -2,8 +2,6 @@ name: Release on: push: - branches: - - main tags: - v* workflow_dispatch: @@ -17,8 +15,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: - fetch-depth: 0 - name: Setup Python uses: actions/setup-python@v4 with: @@ -32,6 +28,7 @@ jobs: with: password: ${{ secrets.TEST_PYPI_API_TOKEN }} repository-url: https://test.pypi.org/legacy/ + skip-existing: true - name: Publish to PyPI if: startsWith(github.ref, 'refs/tags/v') uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/README.md b/README.md index a71c49f..c34340c 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ # antimeridian [![CI Status](https://img.shields.io/github/actions/workflow/status/gadomski/antimeridian/ci.yaml?style=for-the-badge&label=CI)](https://github.com/gadomski/antimeridian/actions/workflows/ci.yaml) -[![PyPI](https://img.shields.io/pypi/v/antimeridian?style=for-the-badge)](https://pypi.org/project/antimeridian/) [![Read the Docs](https://img.shields.io/readthedocs/antimeridian?style=for-the-badge)](https://antimeridian.readthedocs.io/en/latest/) -[![Test PyPI Status](https://img.shields.io/github/actions/workflow/status/gadomski/antimeridian/release.yaml?style=for-the-badge&label=Test+PyPI)](https://test.pypi.org/project/antimeridian/) -[![GitHub](https://img.shields.io/github/license/gadomski/antimeridian?style=for-the-badge)](./LICENSE) -[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg?style=for-the-badge)](./CODE_OF_CONDUCT) +[![PyPI](https://img.shields.io/pypi/v/antimeridian?style=for-the-badge)](https://pypi.org/project/antimeridian/) + +[![GitHub](https://img.shields.io/github/license/gadomski/antimeridian?style=for-the-badge)](https://github.com/gadomski/antimeridian/blob/main/LICENSE) +[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg?style=for-the-badge)](https://github.com/gadomski/antimeridian/blob/main/CODE_OF_CONDUCT) A Python package to correct GeoJSON shapes that cross the antimeridian. @@ -77,7 +77,7 @@ Here's a simple example, taken from a real-world [Landsat](https://landsat.gsfc. As you can see, a tiny corner of the polygon crosses the antimeridian, leading to an invalid item: -![Landsat problem](./img/landsat-problem.png) +![Landsat problem](https://raw.githubusercontent.com/gadomski/antimeridian/main/img/landsat-problem.png) The issue also arises when geometries cross over a pole. @@ -92,15 +92,15 @@ Here's before and after pictures of some Sentinel 5p data. These are swath data that enclose both poles. In the before picture, you can see the strange artifacts created by the invalid geometry: -![Sentinel 5p before](./img/sentinel-5p-before.png) +![Sentinel 5p before](https://raw.githubusercontent.com/gadomski/antimeridian/main/img/sentinel-5p-before.png) After correction, it's more clear that the data covers both poles: -![Sentinel 5p after](./img/sentinel-5p-after.png) +![Sentinel 5p after](https://raw.githubusercontent.com/gadomski/antimeridian/main/img/sentinel-5p-after.png) Our library also handles splitting complex polygons that cross the antimeridian: -![Complex split](./img/complex-split.png) +![Complex split](https://raw.githubusercontent.com/gadomski/antimeridian/main/img/complex-split.png) ## Developing @@ -129,4 +129,4 @@ Github [issues](https://github.com/gadomski/antimeridian/issues) and [pull reque ## License -[Apache-2.0](./LICENSE) +[Apache-2.0](https://github.com/gadomski/antimeridian/blob/main/LICENSE) diff --git a/RELEASING.md b/RELEASING.md index d0b646a..9da433f 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -2,7 +2,6 @@ 1. Determine the next version. Try to follow [semantic versioning](https://semver.org/). Our public API is every importable Python function and class, except for `antimeridian.main` -- the CLI is not part of the API, and can break at any time. -2. Update the [CHANGELOG](./CHANGELOG.md) and commit the update. -3. Create a tag with that version, with a `v` prefix, e.g. `v1.2.3`. -4. Push the tag and the new commit to Github. -5. Use [workflow dispatch](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch) to start the [Release workflow](https://github.com/gadomski/antimeridian/actions/workflows/release.yaml). +2. Update the version in [pyproject.toml](./pyproject.toml), update the [CHANGELOG](./CHANGELOG.md), and open a PR with the changes named `release/vX.Y.Z`. +3. When the PR is merged, created a tag on `main` with that version with a `v` prefix, e.g. `vX.Y.Z`. +4. Push the tag to Github, which will fire off the release workflow. diff --git a/pyproject.toml b/pyproject.toml index a558576..9c1d5ef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,8 +1,9 @@ [build-system] -requires = ["setuptools >= 64", "setuptools_scm[toml]>=6.2"] +requires = ["setuptools >= 64"] [project] name = "antimeridian" +version = "0.0.2.post0" authors = [ {name = "Pete Gadomski", email = "pete.gadomski@gmail.com"} ] @@ -18,7 +19,6 @@ classifiers = [ dependencies = [ "shapely>=1.8" ] -dynamic = ["version"] [project.optional-dependencies] dev = [ @@ -36,9 +36,6 @@ docs = [ [project.scripts] fix-antimeridian = "antimeridian:main" -[tool.setuptools_scm] -local_scheme = "no-local-version" - [tool.mypy] strict = true