Skip to content

Commit

Permalink
Add bump version (#10)
Browse files Browse the repository at this point in the history
* added bump-my-version

* configure version

* added project config

* update pyproject.toml

* added changes.md

* added dev_guide

* update readme: console instead of bash
  • Loading branch information
cehbrecht authored Dec 4, 2024
1 parent c94da5e commit 667ccac
Show file tree
Hide file tree
Showing 9 changed files with 317 additions and 26 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## v0.1.0 (2024-12-04)

Initial release.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM geopython/pygeoapi:latest

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

# Volume mapping cannot be used with webhook
# https://github.com/maccyber/micro-dockerhub-hook
Expand Down
38 changes: 21 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,24 @@
## Quick Guide

Clone the repository:
```bash
```console
git clone https://github.com/cehbrecht/nandu.git
cd nandu
```

Create the Conda environment:
```bash
```console
conda env create -f environment.yml
conda activate nandu
```

You can use make to run the installation:
```bash
```console
make install
```

... and start the service:
```bash
```console
make start
```

Expand All @@ -45,47 +45,47 @@ make start

Clone the repository:

```bash
```console
git clone https://github.com/cehbrecht/nandu.git
cd nandu
```

Create the Conda environment:

```bash
```console
conda env create -f environment.yml
conda activate nandu
```

Install the project dependencies using Poetry:
```bash
```console
poetry install
```

## Configuration

Edit pygeoapi config (optional):
```bash
```console
vim pygeoapi-config.yml
```

Export paths to configs:

```bash
```console
export PYGEOAPI_CONFIG=pygeoapi-config.yml
export PYGEOAPI_OPENAPI=pygeoapi-openapi.yml
```

Update the OpenAPI configuration:

```bash
```console
pygeoapi openapi generate $PYGEOAPI_CONFIG --output-file $PYGEOAPI_OPENAPI
```

## Usage

Start the pygeoapi server and expose the processes:
```bash
```console
pygeoapi serve
```

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


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

Run tests:
```bash
```console
make test
```

Check coding style:
```bash
```console
make lint
```

Build docs:
```bash
```console
make docs
```

## Release

Please check the developer guide.

## Examples

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

Build images:
```bash
```console
docker-compose build
```

Start container:
```bash
```console
docker-compose up
```

Expand Down
51 changes: 51 additions & 0 deletions docs/dev_guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Developer Guide

## Building the docs

Run the mkdocs generator:

```console
$ make docs
```

## Running tests

Run tests using [pytest](https://docs.pytest.org/en/latest/).

```console
$ make test
$ make lint
```

## Prepare a release

Update the Conda specification file to build identical
[environments](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#building-identical-conda-environments)
on a specific OS.


**You should run this on your target OS, in our case Linux.**

``` console
$ conda env create -f environment.yml
$ source activate rook
§ rm poetry.lock
$ make clean
$ make install
$ conda list -n nandu --explicit > spec-list.txt
```

## Bump a new version

Make a new version of nandu in the following steps:

- Make sure everything is commited to GitHub.
- Update `CHANGES.md` with the next version.
- Dry Run: `bump-my-version bump --dry-run --verbose --new-version 0.8.1 patch`
- Do it: `bump-my-version bump --new-version 0.8.1 patch`
- \... or: `bump-my-version bump --new-version 0.9.0 minor`
- Push it: `git push`
- Push tag: `git push --tags`

See the [bumpversion](https://pypi.org/project/bump-my-version/)
documentation for details.
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
site_name: Nandu
nav:
- Home: index.md
- Developer Guide: dev_guide.md
theme: material
Loading

0 comments on commit 667ccac

Please sign in to comment.