4 Commits
v0.4.0 ... main

Author SHA1 Message Date
Miguel Sozinho Ramalho
e9b7680263 migrate gh artifact actions to v4 (#20)
* migrate gh artifact actions to v4

from migration guide no breaking changes apply here.

* updates pipfile.lock dependency versions

* updates CI due to pytest issue see https://github.com/scipy/scipy/issues/22236

* bump to python 3.12

* revert to py3.10
2025-01-09 15:47:27 +00:00
msramalho
de4d4689b9 Bump version to v0.4.1 for release 2022-09-27 14:49:17 +01:00
msramalho
484d3cb02c adds: tests for csv 2022-09-27 14:49:04 +01:00
msramalho
65366816fa updates readme with release info 2022-09-27 14:43:05 +01:00
7 changed files with 1866 additions and 1065 deletions

View File

@@ -44,11 +44,11 @@ jobs:
- python: "3.10"
task:
name: "Test"
run: pytest --exitfirst --failed-first
- python: "3.7"
run: pytest --exitfirst --failed-first --assert=plain
- python: "3.8"
task:
name: "Test (3.7)"
run: pytest --exitfirst --failed-first
name: "Test (3.8)"
run: pytest --exitfirst --failed-first --assert=plain
steps:
- uses: actions/checkout@v3
@@ -65,7 +65,7 @@ jobs:
- name: Upload package distribution files
if: matrix.task.name == 'Build'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: package
path: dist
@@ -99,7 +99,7 @@ jobs:
echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Download package distribution files
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: package
path: dist

2904
Pipfile.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -162,3 +162,9 @@ It is assumed that you are using **Python3.9+**. It is encouraged to [setup a vi
```
We use [Black](https://github.com/psf/black) as our code formatter. If you don't want to use the `pre-commit` hook, you can run the formatter manually or via an editor plugin.
## Release
1. Update [version.py](geoclustering/version.py)
2. Run `scripts/release.sh`
3. Confirm GH action completed successfully

View File

@@ -89,6 +89,7 @@ class CSVEncoder:
self.state,
fieldnames=["cluster_id"] + list(cluster[0].keys()),
quoting=csv.QUOTE_NONNUMERIC,
lineterminator="\n",
)
self.writer.writeheader()

View File

@@ -2,7 +2,7 @@ _MAJOR = "0"
_MINOR = "4"
# On main and in a nightly release the patch should be one ahead of the last
# released build.
_PATCH = "0"
_PATCH = "1"
# This is mainly for nightly builds which have the suffix ".dev$DATE". See
# https://semver.org/#is-v123-a-semantic-version for the semantics.
_SUFFIX = ""

View File

@@ -27,3 +27,4 @@ def test_encoders():
assert res["string"] == read_fixture_content("snapshots/result.txt")
assert res["json"] == read_fixture_content("snapshots/result.json")
assert res["geojson"] == read_fixture_content("snapshots/result.geojson")
assert res["csv"] == read_fixture_content("snapshots/result.csv")

5
tests/fixtures/snapshots/result.csv vendored Normal file
View File

@@ -0,0 +1,5 @@
"cluster_id","id","name","lat","lon"
0,1,"Alice",52.523955,13.442362
0,2,"Bob",52.526659,13.448097
1,3,"Carol",52.525626,13.419246
1,4,"Dan",52.52443559865125,13.41261723049818
1 cluster_id id name lat lon
2 0 1 Alice 52.523955 13.442362
3 0 2 Bob 52.526659 13.448097
4 1 3 Carol 52.525626 13.419246
5 1 4 Dan 52.52443559865125 13.41261723049818