Skip to content

Commit 667ccac

Browse files
authored
Add bump version (#10)
* added bump-my-version * configure version * added project config * update pyproject.toml * added changes.md * added dev_guide * update readme: console instead of bash
1 parent c94da5e commit 667ccac

File tree

9 files changed

+317
-26
lines changed

9 files changed

+317
-26
lines changed

CHANGES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## v0.1.0 (2024-12-04)
2+
3+
Initial release.

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
FROM geopython/pygeoapi:latest
22

33
LABEL maintainer="Carsten Ehbrecht <ehbrecht@dkrz.de>"
4+
LABEL Description="nandu pygeoapi" Vendor="Birdhouse" Version="0.1.0"
45

56
# Volume mapping cannot be used with webhook
67
# https://github.com/maccyber/micro-dockerhub-hook

README.md

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,24 @@
1414
## Quick Guide
1515

1616
Clone the repository:
17-
```bash
17+
```console
1818
git clone https://github.com/cehbrecht/nandu.git
1919
cd nandu
2020
```
2121

2222
Create the Conda environment:
23-
```bash
23+
```console
2424
conda env create -f environment.yml
2525
conda activate nandu
2626
```
2727

2828
You can use make to run the installation:
29-
```bash
29+
```console
3030
make install
3131
```
3232

3333
... and start the service:
34-
```bash
34+
```console
3535
make start
3636
```
3737

@@ -45,47 +45,47 @@ make start
4545

4646
Clone the repository:
4747

48-
```bash
48+
```console
4949
git clone https://github.com/cehbrecht/nandu.git
5050
cd nandu
5151
```
5252

5353
Create the Conda environment:
5454

55-
```bash
55+
```console
5656
conda env create -f environment.yml
5757
conda activate nandu
5858
```
5959

6060
Install the project dependencies using Poetry:
61-
```bash
61+
```console
6262
poetry install
6363
```
6464

6565
## Configuration
6666

6767
Edit pygeoapi config (optional):
68-
```bash
68+
```console
6969
vim pygeoapi-config.yml
7070
```
7171

7272
Export paths to configs:
7373

74-
```bash
74+
```console
7575
export PYGEOAPI_CONFIG=pygeoapi-config.yml
7676
export PYGEOAPI_OPENAPI=pygeoapi-openapi.yml
7777
```
7878

7979
Update the OpenAPI configuration:
8080

81-
```bash
81+
```console
8282
pygeoapi openapi generate $PYGEOAPI_CONFIG --output-file $PYGEOAPI_OPENAPI
8383
```
8484

8585
## Usage
8686

8787
Start the pygeoapi server and expose the processes:
88-
```bash
88+
```console
8989
pygeoapi serve
9090
```
9191

@@ -103,7 +103,7 @@ http://localhost:5000/processes/hello-world
103103

104104

105105
Execute the process:
106-
```bash
106+
```console
107107
curl -X POST http://localhost:5000/processes/hello-world/execution \
108108
-H "Content-Type: application/json" \
109109
-d '{
@@ -116,20 +116,24 @@ curl -X POST http://localhost:5000/processes/hello-world/execution \
116116
## Development
117117

118118
Run tests:
119-
```bash
119+
```console
120120
make test
121121
```
122122

123123
Check coding style:
124-
```bash
124+
```console
125125
make lint
126126
```
127127

128128
Build docs:
129-
```bash
129+
```console
130130
make docs
131131
```
132132

133+
## Release
134+
135+
Please check the developer guide.
136+
133137
## Examples
134138

135139
See usage examples for the processes in the notebooks folder.
@@ -139,12 +143,12 @@ See usage examples for the processes in the notebooks folder.
139143
You can also use a docker deployment.
140144

141145
Build images:
142-
```bash
146+
```console
143147
docker-compose build
144148
```
145149

146150
Start container:
147-
```bash
151+
```console
148152
docker-compose up
149153
```
150154

docs/dev_guide.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Developer Guide
2+
3+
## Building the docs
4+
5+
Run the mkdocs generator:
6+
7+
```console
8+
$ make docs
9+
```
10+
11+
## Running tests
12+
13+
Run tests using [pytest](https://docs.pytest.org/en/latest/).
14+
15+
```console
16+
$ make test
17+
$ make lint
18+
```
19+
20+
## Prepare a release
21+
22+
Update the Conda specification file to build identical
23+
[environments](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#building-identical-conda-environments)
24+
on a specific OS.
25+
26+
27+
**You should run this on your target OS, in our case Linux.**
28+
29+
``` console
30+
$ conda env create -f environment.yml
31+
$ source activate rook
32+
§ rm poetry.lock
33+
$ make clean
34+
$ make install
35+
$ conda list -n nandu --explicit > spec-list.txt
36+
```
37+
38+
## Bump a new version
39+
40+
Make a new version of nandu in the following steps:
41+
42+
- Make sure everything is commited to GitHub.
43+
- Update `CHANGES.md` with the next version.
44+
- Dry Run: `bump-my-version bump --dry-run --verbose --new-version 0.8.1 patch`
45+
- Do it: `bump-my-version bump --new-version 0.8.1 patch`
46+
- \... or: `bump-my-version bump --new-version 0.9.0 minor`
47+
- Push it: `git push`
48+
- Push tag: `git push --tags`
49+
50+
See the [bumpversion](https://pypi.org/project/bump-my-version/)
51+
documentation for details.

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
site_name: Nandu
22
nav:
33
- Home: index.md
4+
- Developer Guide: dev_guide.md
45
theme: material

0 commit comments

Comments
 (0)