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

mdformat #472

Merged
merged 1 commit into from
Sep 2, 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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ repos:
src/actinia_core.egg-info/
)
- repo: https://github.com/mundialis/github-workflows
rev: 1.0.0
rev: 1.0.3
hooks:
- id: linting

Expand Down
858 changes: 553 additions & 305 deletions CHANGELOG.md

Large diffs are not rendered by default.

37 changes: 19 additions & 18 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ Actinia has been mainly developed by open source GIS developers of the GRASS GIS
Since the project is open source, all users, regardless of the profession or skill level,
have the ability to contribute to actinia. Here's a few suggestion on how:

* Help actinia users that is less experienced than yourself
* Write a bug report
* Request a new feature
* Write documentation for your favorite actinia usage
* Fix a bug
* Implement a new feature
- Help actinia users that is less experienced than yourself
- Write a bug report
- Request a new feature
- Write documentation for your favorite actinia usage
- Fix a bug
- Implement a new feature

In the following sections you can find some guidelines on how to contribute.
As actinia is managed on GitHub most contributions require that you have a GitHub
Expand All @@ -49,11 +49,11 @@ thorough bug report.

A good bug report includes at least:

* A title that quickly explains the problem
* A description of the problem and how it can be reproduced
* Version of actinia being used
* Version numbers of any other relevant software being used, e.g. operating system
* A description of what already has been done to solve the problem
- A title that quickly explains the problem
- A description of the problem and how it can be reproduced
- Version of actinia being used
- Version numbers of any other relevant software being used, e.g. operating system
- A description of what already has been done to solve the problem

The more information that is given up front, the more likely it is that a developer
will find interest in solving the problem. You will probably get follow-up questions
Expand Down Expand Up @@ -89,6 +89,7 @@ on GitHub.
## Code contributions

### Legalese

Committers are the front line gatekeepers to keep the code base clear of improperly contributed code.
It is important to the actinia users, developers and the OSGeo community to avoid contributing any
code to the project without it being clearly licensed under the project license.
Expand All @@ -114,18 +115,18 @@ All unusual situations need to be discussed and/or documented.
Committer should adhere to the following guidelines, and may be personally legally liable for
improperly contributing code to the source repository:

* Make sure the contributor (and possibly employer) is aware of the contribution terms.
* Code coming from a source other than the contributor (such as adapted from another project)
- Make sure the contributor (and possibly employer) is aware of the contribution terms.
- Code coming from a source other than the contributor (such as adapted from another project)
should be clearly marked as to the original source, copyright holders, license terms and so forth.
This information can be in the file headers, but should also be added to the project licensing
file if not exactly matching normal project licensing (LICENSE.txt).
* Existing copyright headers and license text should never be stripped from a file. If a copyright
- Existing copyright headers and license text should never be stripped from a file. If a copyright
holder wishes to give up copyright they must do so in writing to the project steering committee
before copyright messages are removed. If license terms are changed it has to be by agreement
(written in email is ok) of the copyright holders.
* When substantial contributions are added to a file (such as substantial patches) the
- When substantial contributions are added to a file (such as substantial patches) the
author/contributor should be added to the list of copyright holders for the file.
* If there is uncertainty about whether a change is proper to contribute to the code base, please
- If there is uncertainty about whether a change is proper to contribute to the code base, please
seek more information from the project steering committee.

### Git workflow with actinia
Expand All @@ -145,8 +146,8 @@ Details here...

### Additional Resources

* [General GitHub documentation](https://help.github.com/)
* [GitHub pull request documentation](https://help.github.com/articles/about-pull-requests/)
- [General GitHub documentation](https://help.github.com/)
- [GitHub pull request documentation](https://help.github.com/articles/about-pull-requests/)

## Acknowledgements

Expand Down
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Article [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.2631917.svg)](https:
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Docker pulls](https://img.shields.io/docker/pulls/mundialis/actinia-core.svg)](https://hub.docker.com/r/mundialis/actinia-core)


**[Actinia](https://actinia.mundialis.de/)** is an open source REST API for scalable, distributed, high performance
processing of geographical data that mainly uses [GRASS GIS](https://grass.osgeo.org/) for computational tasks.

Expand All @@ -20,6 +19,7 @@ Sentinel-2 scenes in an ephemeral databases. The computational results of epheme
are available via object storage as GeoTIFF files.

## API documentation

<!---
a more complete API documentation generated with Spinx was here: https://actinia.mundialis.de/api_docs
but no longer exists
Expand All @@ -35,15 +35,18 @@ see [here](https://github.com/actinia-org/ace).
## Installation

Required system packages:
* alpine: `apk add python3 py3-pip`

- alpine: `apk add python3 py3-pip`
As not all python packages are pre-build for alpine, they need to be build during installation. For this some system packages are required:
`apk add python3 py3-pip python3-dev gcc musl-dev linux-headers build-base gdal gdal-tools gdal-dev proj proj-util proj-dev geos-dev py3-numpy-dev`
* ubuntu: `apt install -y python3 python3-pip`
- ubuntu: `apt install -y python3 python3-pip`

And then install from pypi:

```
pip install actinia-core
```

## Installation with Docker

Docker images are available from https://hub.docker.com/r/mundialis/actinia-core
Expand All @@ -56,44 +59,43 @@ For own deployments or local dev-setup, see the `docker/` subfolder.

Actinia is also available on [OSGeoLive](https://live.osgeo.org/en/overview/actinia_overview.html).


## Examples

### Data management

* List all locations that are available in the actinia persistent database:
- List all locations that are available in the actinia persistent database:

```bash
curl -u 'demouser:gu3st!pa55w0rd' -X GET "https://actinia.mundialis.de/api/v3/locations"
```

* List all mapsets in the location latlong_wgs84:
- List all mapsets in the location latlong_wgs84:

```bash
curl -u 'demouser:gu3st!pa55w0rd' -X GET "https://actinia.mundialis.de/api/v3/locations/latlong_wgs84/mapsets"
```

* List all space-time raster datasets (STRDS) in location latlong_wgs84 and mapset Sentinel_timeseries:
- List all space-time raster datasets (STRDS) in location latlong_wgs84 and mapset Sentinel_timeseries:

```bash
curl -u 'demouser:gu3st!pa55w0rd' -X GET "https://actinia.mundialis.de/api/v3/locations/latlong_wgs84/mapsets/modis_ndvi_global/strds"
```

* List all raster map layers of the STRDS:
- List all raster map layers of the STRDS:

```bash
curl -u 'demouser:gu3st!pa55w0rd' -X GET "https://actinia.mundialis.de/api/v3/locations/latlong_wgs84/mapsets/modis_ndvi_global/strds/ndvi_16_5600m/raster_layers"
```

### Landsat and Sentinel-2 NDVI computation

* Compute the NDVI of the top of athmosphere (TOAR) corrected Landsat4 scene LC80440342016259LGN00:
- Compute the NDVI of the top of athmosphere (TOAR) corrected Landsat4 scene LC80440342016259LGN00:

```bash
curl -u 'demouser:gu3st!pa55w0rd' -X POST "https://actinia.mundialis.de/api/v3/landsat_process/LC80440342016259LGN00/TOAR/NDVI"
```

* NDVI computation of Sentinel-2A scene S2A_MSIL1C_20170212T104141_N0204_R008_T31TGJ_20170212T104138:
- NDVI computation of Sentinel-2A scene S2A_MSIL1C_20170212T104141_N0204_R008_T31TGJ_20170212T104138:

```bash
curl -u 'demouser:gu3st!pa55w0rd' -X POST "https://actinia.mundialis.de/api/v3/sentinel2_process/ndvi/S2A_MSIL1C_20170212T104141_N0204_R008_T31TGJ_20170212T104138"
Expand Down
68 changes: 38 additions & 30 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,56 @@
Steps when releasing actinia-core:

## 0. Steps for major updates
* If the release is a major update, it needs to be prepared like described in the [WIKI](https://github.com/actinia-org/actinia-core/wiki/Versioning).

- If the release is a major update, it needs to be prepared like described in the [WIKI](https://github.com/actinia-org/actinia-core/wiki/Versioning).

## 1. Prepare release and version
* Run in terminal
```
ESTIMATED_VERSION=3.0.1

gh api repos/actinia-org/actinia-core/releases/generate-notes -f tag_name="$ESTIMATED_VERSION" -f target_commitish=main -q .body
```
* Go to https://github.com/actinia-org/actinia-core/releases/new
* Copy the output of terminal command to the release description
* Change heading `## What's Changed` to `### Changed`, `### Fixed`, `### Added` or what applicable and sort list amongst these headings.
* You can [compare manually](https://github.com/actinia-org/actinia-core/compare/3.0.0...3.0.1) if all changes are included. If changes were pushed directly to main branch, they are not included.
* Check if `ESTIMATED_VERSION` increase still fits - we follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html). You can also have a look at the milestones added to the included PRs. They indicate weather this single PR would lead to a major, minor or patch version increment.
* Fill in tag and release title with this version
* At the bottom of the release, add

- Run in terminal
```
ESTIMATED_VERSION=3.0.1

gh api repos/actinia-org/actinia-core/releases/generate-notes -f tag_name="$ESTIMATED_VERSION" -f target_commitish=main -q .body
```
- Go to https://github.com/actinia-org/actinia-core/releases/new
- Copy the output of terminal command to the release description
- Change heading `## What's Changed` to `### Changed`, `### Fixed`, `### Added` or what applicable and sort list amongst these headings.
- You can [compare manually](https://github.com/actinia-org/actinia-core/compare/3.0.0...3.0.1) if all changes are included. If changes were pushed directly to main branch, they are not included.
- Check if `ESTIMATED_VERSION` increase still fits - we follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html). You can also have a look at the milestones added to the included PRs. They indicate weather this single PR would lead to a major, minor or patch version increment.
- Fill in tag and release title with this version
- At the bottom of the release, add
"generated with `gh api repos/actinia-org/actinia-core/releases/generate-notes -f tag_name="$ESTIMATED_VERSION" -f target_commitish=main -q .body`" and replace `$ESTIMATED_VERSION` with the actual version.
* DO NOT click "save" yet!!
- DO NOT click "save" yet!!

## 2. Prepare citation
* In [CITATION.cff](https://github.com/actinia-org/actinia-core/blob/main/CITATION.cff), update [version](https://github.com/actinia-org/actinia-core/blob/main/CITATION.cff#L8) and [date-released](https://github.com/actinia-org/actinia-core/blob/main/CITATION.cff#L10) in main branch

- In [CITATION.cff](https://github.com/actinia-org/actinia-core/blob/main/CITATION.cff), update [version](https://github.com/actinia-org/actinia-core/blob/main/CITATION.cff#L8) and [date-released](https://github.com/actinia-org/actinia-core/blob/main/CITATION.cff#L10) in main branch

## 3. Release
* Now you can save the release

- Now you can save the release

## 4. Update changelog
* Run in terminal
```
curl https://api.github.com/repos/actinia-org/actinia-core/releases/latest | jq -r '. | "## [\(.tag_name)] - \(.published_at | strptime("%Y-%m-%dT%H:%M:%SZ") | strftime("%Y-%m-%d"))\nreleased from \(.target_commitish)\n\(.body) \n"'
```
* Copy the output to the top of the release list in [CHANGELOG.md](https://github.com/actinia-org/actinia-core/blob/main/CHANGELOG.md)
* Push changes in CHANGELOG.md to main branch (before, you might need to pull changes from CITATION.cff).

- Run in terminal
```
curl https://api.github.com/repos/actinia-org/actinia-core/releases/latest | jq -r '. | "## [\(.tag_name)] - \(.published_at | strptime("%Y-%m-%dT%H:%M:%SZ") | strftime("%Y-%m-%d"))\nreleased from \(.target_commitish)\n\(.body) \n"'
```
- Copy the output to the top of the release list in [CHANGELOG.md](https://github.com/actinia-org/actinia-core/blob/main/CHANGELOG.md)
- Push changes in CHANGELOG.md to main branch (before, you might need to pull changes from CITATION.cff).

## 5. Update GitHub Milestones
* [Create a new milestone](https://github.com/actinia-org/actinia-core/milestones/new) with title of new version which was just released and set date to today
* Set in all related PRs the milestone to the new one - `next_patch`, `next_minor` and `next_major` should not contain closed PRs anymore. If there are invalid ones, they should be labeled as `invalid` and also included in the new milestone
* close the milestone

- [Create a new milestone](https://github.com/actinia-org/actinia-core/milestones/new) with title of new version which was just released and set date to today
- Set in all related PRs the milestone to the new one - `next_patch`, `next_minor` and `next_major` should not contain closed PRs anymore. If there are invalid ones, they should be labeled as `invalid` and also included in the new milestone
- close the milestone

## 6. actinia-docker
* Optionally update version in https://github.com/actinia-org/actinia-docker/blob/main/actinia-alpine/Dockerfile#L23

- Optionally update version in https://github.com/actinia-org/actinia-docker/blob/main/actinia-alpine/Dockerfile#L23

## Outcome:
* Automatically a new docker image with the new tag will be created and pushed to [Dockerhub](https://hub.docker.com/r/mundialis/actinia-core/tags)
* Automatically new source and build distributions are created and pulished on [PyPI](https://pypi.org/project/actinia-core/)
* The version is automatically updated in [pyproject.toml](pyproject.toml)

- Automatically a new docker image with the new tag will be created and pushed to [Dockerhub](https://hub.docker.com/r/mundialis/actinia-core/tags)
- Automatically new source and build distributions are created and pulished on [PyPI](https://pypi.org/project/actinia-core/)
- The version is automatically updated in [pyproject.toml](pyproject.toml)
Loading