Skip to content
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
6 changes: 6 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[flake8]

exclude = .git,.pycache,build,.eggs

# Allow longer lines due to so many JSON files
max-line-length = 88
41 changes: 0 additions & 41 deletions .github/workflows/black.yml

This file was deleted.

29 changes: 0 additions & 29 deletions .github/workflows/flake8.yml

This file was deleted.

16 changes: 16 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Linting and code quality check

on:
push:
branches:
- main
- develop
pull_request:

jobs:
lint:
uses: mundialis/github-workflows/.github/workflows/linting.yml@main
with:
# set pylint-version to empty string to skip the pylint workflow
pylint-version: ''
59 changes: 30 additions & 29 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Upload Python Package

on:
Expand All @@ -10,34 +11,34 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python3 -m build --outdir build .
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: build/*.whl
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python3 -m build --outdir build .
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: build/*.whl

# - name: Publish package to TestPyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
# repository_url: https://test.pypi.org/legacy/
# packages_dir: build/
# verbose: true
# - name: Publish package to TestPyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
# repository_url: https://test.pypi.org/legacy/
# packages_dir: build/
# verbose: true

- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: build/
verbose: true
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: build/
verbose: true
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,6 @@ MANIFEST
# Per-project virtualenvs
.venv*/
.conda*/

# Linting
ruff-merged.toml
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
API docs for actinia-core and plugins!
# API docs for actinia-core and plugins

OpenAPI is a project used to describe and document RESTful APIs.
actinia is using swagger2, version upgrade is on the agena.
Expand Down
6 changes: 3 additions & 3 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
Steps when releasing actinia-api:
# Steps when releasing actinia-api

## 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/mundialis/actinia_core/wiki/Versioning).

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

gh api repos/mundialis/actinia-api/releases/generate-notes -f tag_name="$ESTIMATED_VERSION" -f target_commitish=main -q .body
```
* Go to https://github.com/mundialis/actinia-api/releases/new
* Go to [a new release](https://github.com/mundialis/actinia-api/releases/new) page
* 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/mundialis/actinia-api/compare/3.0.0...3.0.1) if all changes are included. If changes were pushed directly to main branch, they are not included.
Expand Down
36 changes: 0 additions & 36 deletions docker/release/Dockerfile

This file was deleted.

23 changes: 0 additions & 23 deletions docker/release/README.md

This file was deleted.

28 changes: 0 additions & 28 deletions docker/release/create_release_with_asset.sh

This file was deleted.

2 changes: 1 addition & 1 deletion renovate.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base"
"config:recommended"
]
}
15 changes: 15 additions & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Extends https://github.com/mundialis/github-workflows/blob/main/linting-config-examples/ruff.toml

lint.ignore = [
"BLE001", # BLE001 Do not catch blind exception: `Exception
"D205", # D205 1 blank line required between summary line and description
"E501", # E501 Line too long (ignore here, flake checks with 88 lines)
"RUF012", # RUF012 Mutable class attributes should be annotated with `typing.ClassVar`
"RUF100", # RUF100 [*] Unused `noqa` directive (non-enabled: `E501`) - needed for flake8
]

# [lint.per-file-ignores]
# "src/actinia_grassdata_management_plugin/apidocs/__init__.py" = [ "E501",]

# Online ignores of
# S108 Probable insecure usage of temporary file or directory
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Setup script for actinia-api."""

from setuptools import setup

if __name__ == "__main__":
Expand Down
11 changes: 10 additions & 1 deletion src/actinia_api/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
"""actinia-api.
=========
actinia-api is a RESTful API for the actinia framework. It provides a
web service interface to the actinia framework, which is a geospatial
processing framework based on the GRASS GIS software. The API allows
users to access and manipulate geospatial data, run processing tasks,
and manage the underlying GRASS GIS environment.
"""

import importlib.metadata

API_VERSION = "v3"

# This is the URL prefix that must be used in the tests
URL_PREFIX = "/api/%s" % API_VERSION
URL_PREFIX = f"/api/{API_VERSION}"

try:
# Change here if project is renamed and does not equal the package name
Expand Down
1 change: 1 addition & 0 deletions src/actinia_api/swagger2/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Module containing swagger2 API documentation for actinia."""
1 change: 1 addition & 0 deletions src/actinia_api/swagger2/actinia_core/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Module containing swagger2 API documentation for actinia-core."""
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
#######
# actinia-core - an open source REST API for scalable, distributed, high
# performance processing of geographical data that uses GRASS GIS for
Expand All @@ -21,14 +20,13 @@
#
#######

"""
API docs for api_log_management
"""
"""API docs for api_log_management."""

from actinia_core.models.response_models import SimpleResponseModel

from actinia_api.swagger2.actinia_core.schemas.api_log_management import (
ApiLogListModel,
)
from actinia_core.models.response_models import SimpleResponseModel

__license__ = "GPLv3"
__author__ = "Sören Gebbert, Anika Weinmann"
Expand All @@ -50,7 +48,7 @@
"required": True,
"in": "path",
"type": "string",
}
},
],
"responses": {
"200": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
#######
# actinia-core - an open source REST API for scalable, distributed, high
# performance processing of geographical data that uses GRASS GIS for
Expand All @@ -21,13 +20,11 @@
#
#######

"""
API docs for download_cache_management
"""
"""API docs for download_cache_management."""

from actinia_core.models.response_models import (
StorageResponseModel,
ProcessingResponseModel,
StorageResponseModel,
)

__license__ = "GPLv3"
Expand Down
Loading