Skip to content

Commit edda5aa

Browse files
authored
Merge pull request #40 from bedrock-engineer/test-kaitak-nb-w-local-brgi
Adapt the Kai Tak, HK marimo notebook test such that it runs with latest code
2 parents 66ae441 + cf200a2 commit edda5aa

File tree

6 files changed

+30
-33
lines changed

6 files changed

+30
-33
lines changed

.github/workflows/python-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
matrix:
1414
os: [ubuntu-latest, windows-latest]
15-
python-version: ['3.9']
15+
python-version: ['3.9', '3.12']
1616

1717
steps:
1818
- name: Checkout code

RELEASE.md

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,11 @@ Update the version number in:
1414
- [`/src/bedrock/__init__.py`](/src/bedrock_ge/__init__.py)
1515
- Inline script dependencies of marimo notebooks in [`examples`](/examples/)
1616

17-
## 2. Update the Changelog
17+
## 3. PR `dev``main`
1818

19-
Update `CHANGELOG.md` with details about the new release. Include any new features, bug fixes, or breaking changes.
20-
21-
## 3. Run Tests
22-
23-
Ensure that all tests pass by running your test suite.
19+
Open a pull request (PR) from `dev` to `main`.
2420

25-
To automate this, it's possible to set up a CI (Continuous Integration) pipeline to confirm everything works in multiple environments, e.g. with `GitHub Actions`.
21+
This also runs the automated tests.
2622

2723
## 4. Commit the Changes
2824

@@ -33,15 +29,11 @@ git add .
3329
git commit -m "Release version X.Y.Z"
3430
```
3531

36-
## 5. Prepare for Merge
37-
38-
Open a pull request (PR) from `dev` to `main`.
39-
40-
## 6. Merge `dev` into `main`
32+
## 5. Merge `dev` into `main`
4133

4234
Once everything is ready, and the PR is approved, merge `dev` into `main`. This officially brings all the changes in `dev` into the release-ready `main` branch.
4335

44-
## 7. Tag the Release
36+
## 6. Tag the Release
4537

4638
Create a Git tag for the new version:
4739

@@ -51,14 +43,20 @@ git tag X.Y.Z
5143
git push origin X.Y.Z
5244
```
5345

54-
## 8. Build the Distribution
46+
## 7. Build the Distribution
5547

5648
Create source and wheel distributions:
5749

5850
```bash
5951
uv build
6052
```
6153

54+
This creates a `bedrock_ge-X.Y.Z.tar.gz` file (source) and a `bedrock_ge-X.Y.Z-py3-none-any.whl` file (wheel) in the `/dist` folder.
55+
56+
## 8. Remove the old distribution
57+
58+
In order for the `uv publish` command to work properly, only one version of the distriution can be inside the `/dist` folder. Therefore delete the old source and wheel files.
59+
6260
## 9. Publish to PyPI
6361

6462
1. Set the `UV_PUBLISH_TOKEN` environment variable. Copy from `.env`.
@@ -69,10 +67,6 @@ set UV_PUBLISH_TOKEN=pypi-blablabla
6967
uv publish
7068
```
7169

72-
> ⚠️ **Attention:**
73-
>
74-
> You might have to delete previous distributions of the Python package in `dist/*`
75-
7670
## 10. Verify the Release
7771

7872
Check that the new version is available on PyPI:

examples/hk_kaitak_ags3/hk_kaitak_ags3_to_brgi_geodb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# /// script
22
# requires-python = ">=3.12"
33
# dependencies = [
4-
# "bedrock-ge==0.2.3",
4+
# "bedrock-ge==0.2.4",
55
# "chardet==5.2.0",
66
# "folium==0.19.5",
77
# "geopandas==1.0.1",

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,9 @@ Tracker = "https://github.com/bedrock-engineer/bedrock-ge/issues"
7373
[dependency-groups]
7474
dev = [
7575
"duckdb>=1.2.2",
76-
"folium>=0.17.0",
7776
"frictionless[excel]>=4.40.8",
7877
"jupyter>=1.1.1",
79-
"mapclassify>=2.8.1",
8078
"marimo>=0.12.5",
81-
"matplotlib>=3.9.2",
8279
"mypy>=1.11.2",
8380
"nbconvert>=7.16.6",
8481
"pandas-stubs>=2.2.2.240807",
@@ -87,6 +84,9 @@ dev = [
8784
]
8885

8986
tests = [
87+
"folium>=0.17.0",
88+
"mapclassify>=2.8.1",
89+
"matplotlib>=3.9.2",
9090
"pytest>=8.3.3",
9191
]
9292

tests/test_examples/test_hk_kaitak_ags3_to_brgi_geodb.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ def test_kaitak_ags3_notebook_runs_and_creates_gpkg(examples_dir):
4444
env = os.environ.copy()
4545
env["PYTHONIOENCODING"] = "utf-8"
4646
result = subprocess.run(
47-
["uvx", "uv", "run", "--no-project", "--no-cache", str(notebook_path)],
47+
# ["uvx", "uv", "run", "--no-project", "--no-cache", str(notebook_path)],
48+
["uv", "run", str(notebook_path)],
4849
check=False,
4950
capture_output=True,
5051
text=True,

uv.lock

Lines changed: 11 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)