Skip to content

Commit

Permalink
Merge branch 'master' of github.com:mundialis/actinia_statistic_plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
mmacata committed Mar 23, 2022
2 parents 8d65aa7 + 7516d41 commit 45e6710
Show file tree
Hide file tree
Showing 10 changed files with 1,755 additions and 477 deletions.
32 changes: 27 additions & 5 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,31 @@
Changelog
=========

Version 0.1
===========
Version 0.0.5
=============

- Feature A added
- FIX: nasty bug #1729 fixed
- add your changes here!
(yet unreleased)

- some files formatted with `black`
- New raster layer sampling endpoint "sampling_sync" (#7)
- New vector layer sampling endpoint "sampling_sync" (#8)

Version 0.0.4
=============

- #6 from mundialis/version2: Use URL_PREFIX from actinia_core app

Version 0.0.3
=============

- Move actinia_core imports #5

Version 0.0.2
=============

- internal release

Version 0.0.1
=============

- Initial upload
14 changes: 7 additions & 7 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
name = actinia_statistic_plugin
description = Actinia plugin for efficient statistic computing
author = Soeren Gebbert
author-email = soerengebbert@googlemai.com
license = mit
url = http://...
author-email = soerengebbert@googlemail.com
license = MIT
url = https://actinia.mundialis.de/
long-description = file: README.rst
# Change if running only on Windows, Mac or Linux (comma-separated)
platforms = any
Expand All @@ -26,7 +26,7 @@ package_dir =
=src
# Add here dependencies of your project (semicolon-separated), e.g.
# install_requires = numpy; scipy
install_requires =
install_requires =
# Add here test requirements (semicolon-separated)
tests_require = pytest; pytest-cov

Expand All @@ -41,7 +41,7 @@ exclude =
# PDF = ReportLab; RXP

[test]
# py.test options when running `python3 setup.py test`
# py.test options when running `python setup.py test`
addopts = tests

[tool:pytest]
Expand All @@ -50,8 +50,8 @@ addopts = tests
# e.g. --cov-report html (or xml) for html/xml output or --junitxml junit.xml
# in order to write a coverage file that can be read by Jenkins.
addopts =
--cov actinia_statistic_plugin --cov-report term-missing
--verbose
--cov actinia_core --cov-report term-missing
--verbose --tb=line -x
norecursedirs =
dist
build
Expand Down
193 changes: 138 additions & 55 deletions src/actinia_statistic_plugin/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,64 +3,147 @@
"""
Actinia satellite plugin endpoint definitions
"""
from .ephemeral_strds_area_stats_univar import AsyncEphemeralSTRDSAreaStatsUnivarResource, \
SyncEphemeralSTRDSAreaStatsUnivarResource
from .ephemeral_strds_area_stats import AsyncEphemeralSTRDSAreaStatsResource, \
SyncEphemeralSTRDSAreaStatsResource
from .ephemeral_raster_area_stats import AsyncEphemeralRasterAreaStatsResource, \
SyncEphemeralRasterAreaStatsResource
from .ephemeral_raster_area_stats_univar import AsyncEphemeralRasterAreaStatsUnivarResource, \
SyncEphemeralRasterAreaStatsUnivarResource
from .strds_sampling import AsyncEphemeralSTRDSSamplingResource, SyncEphemeralSTRDSSamplingResource
from .strds_sampling_geojson import AsyncEphemeralSTRDSSamplingGeoJSONResource, \
SyncEphemeralSTRDSSamplingGeoJSONResource
from .ephemeral_strds_area_stats_univar import (
AsyncEphemeralSTRDSAreaStatsUnivarResource,
SyncEphemeralSTRDSAreaStatsUnivarResource,
)
from .ephemeral_strds_area_stats import (
AsyncEphemeralSTRDSAreaStatsResource,
SyncEphemeralSTRDSAreaStatsResource,
)
from .ephemeral_raster_area_stats import (
AsyncEphemeralRasterAreaStatsResource,
SyncEphemeralRasterAreaStatsResource,
)
from .ephemeral_raster_area_stats_univar import (
AsyncEphemeralRasterAreaStatsUnivarResource,
SyncEphemeralRasterAreaStatsUnivarResource,
)
from .strds_sampling import (
AsyncEphemeralSTRDSSamplingResource,
SyncEphemeralSTRDSSamplingResource,
)
from .strds_sampling_geojson import (
AsyncEphemeralSTRDSSamplingGeoJSONResource,
SyncEphemeralSTRDSSamplingGeoJSONResource,
)
from .raster_sampling import (
AsyncEphemeralRasterSamplingResource,
SyncEphemeralRasterSamplingResource,
)


from .vector_sampling import (
AsyncEphemeralVectorSamplingResource,
SyncEphemeralVectorSamplingResource,
)


__license__ = "GPLv3"
__author__ = "Sören Gebbert"
__copyright__ = "Copyright 2016, Sören Gebbert"
__maintainer__ = "Sören Gebbert"
__email__ = "soerengebbert@googlemail.com"
__author__ = "Sören Gebbert, Markus Neteler"
__copyright__ = "Copyright 2016-present, Sören Gebbert and mundialis GmbH & Co. KG"


def create_endpoints(flask_api):
flask_api.add_resource(AsyncEphemeralSTRDSAreaStatsUnivarResource, '/locations/<string:location_name>/mapsets/'
'<string:mapset_name>/strds/'
'<string:strds_name>/timestamp/'
'<string:timestamp>/area_stats_univar_async')
flask_api.add_resource(SyncEphemeralSTRDSAreaStatsUnivarResource, '/locations/<string:location_name>/mapsets/'
'<string:mapset_name>/strds/'
'<string:strds_name>/timestamp/'
'<string:timestamp>/area_stats_univar_sync')
flask_api.add_resource(AsyncEphemeralSTRDSAreaStatsResource, '/locations/<string:location_name>/mapsets/'
'<string:mapset_name>/strds/<string:strds_name>'
'/timestamp/<string:timestamp>/area_stats_async')
flask_api.add_resource(SyncEphemeralSTRDSAreaStatsResource, '/locations/<string:location_name>/mapsets/'
'<string:mapset_name>/strds/<string:strds_name>'
'/timestamp/<string:timestamp>/area_stats_sync')
flask_api.add_resource(
AsyncEphemeralSTRDSAreaStatsUnivarResource,
"/locations/<string:location_name>/mapsets/"
"<string:mapset_name>/strds/"
"<string:strds_name>/timestamp/"
"<string:timestamp>/area_stats_univar_async",
)
flask_api.add_resource(
SyncEphemeralSTRDSAreaStatsUnivarResource,
"/locations/<string:location_name>/mapsets/"
"<string:mapset_name>/strds/"
"<string:strds_name>/timestamp/"
"<string:timestamp>/area_stats_univar_sync",
)
flask_api.add_resource(
AsyncEphemeralSTRDSAreaStatsResource,
"/locations/<string:location_name>/mapsets/"
"<string:mapset_name>/strds/<string:strds_name>"
"/timestamp/<string:timestamp>/area_stats_async",
)
flask_api.add_resource(
SyncEphemeralSTRDSAreaStatsResource,
"/locations/<string:location_name>/mapsets/"
"<string:mapset_name>/strds/<string:strds_name>"
"/timestamp/<string:timestamp>/area_stats_sync",
)

flask_api.add_resource(
AsyncEphemeralRasterAreaStatsResource,
"/locations/<string:location_name>/mapsets/"
"<string:mapset_name>/raster_layers/"
"<string:raster_name>/area_stats_async",
)
flask_api.add_resource(
SyncEphemeralRasterAreaStatsResource,
"/locations/<string:location_name>/mapsets/"
"<string:mapset_name>/raster_layers/"
"<string:raster_name>/area_stats_sync",
)
flask_api.add_resource(
AsyncEphemeralRasterAreaStatsUnivarResource,
"/locations/<string:location_name>/mapsets/"
"<string:mapset_name>/raster_layers/"
"<string:raster_name>"
"/area_stats_univar_async",
)
flask_api.add_resource(
SyncEphemeralRasterAreaStatsUnivarResource,
"/locations/<string:location_name>/mapsets/"
"<string:mapset_name>/raster_layers/"
"<string:raster_name>"
"/area_stats_univar_sync",
)

flask_api.add_resource(
AsyncEphemeralSTRDSSamplingResource,
"/locations/<string:location_name>/mapsets/"
"<string:mapset_name>/strds/<string:strds_name>"
"/sampling_async",
)
flask_api.add_resource(
SyncEphemeralSTRDSSamplingResource,
"/locations/<string:location_name>/mapsets/"
"<string:mapset_name>/strds/<string:strds_name>"
"/sampling_sync",
)
flask_api.add_resource(
AsyncEphemeralSTRDSSamplingGeoJSONResource,
"/locations/<string:location_name>/mapsets/"
"<string:mapset_name>/strds/<string:strds_name>"
"/sampling_async_geojson",
)
flask_api.add_resource(
SyncEphemeralSTRDSSamplingGeoJSONResource,
"/locations/<string:location_name>/mapsets/"
"<string:mapset_name>/strds/<string:strds_name>"
"/sampling_sync_geojson",
)

flask_api.add_resource(AsyncEphemeralRasterAreaStatsResource, '/locations/<string:location_name>/mapsets/'
'<string:mapset_name>/raster_layers/'
'<string:raster_name>/area_stats_async')
flask_api.add_resource(SyncEphemeralRasterAreaStatsResource, '/locations/<string:location_name>/mapsets/'
'<string:mapset_name>/raster_layers/'
'<string:raster_name>/area_stats_sync')
flask_api.add_resource(AsyncEphemeralRasterAreaStatsUnivarResource, '/locations/<string:location_name>/mapsets/'
'<string:mapset_name>/raster_layers/'
'<string:raster_name>'
'/area_stats_univar_async')
flask_api.add_resource(SyncEphemeralRasterAreaStatsUnivarResource, '/locations/<string:location_name>/mapsets/'
'<string:mapset_name>/raster_layers/'
'<string:raster_name>'
'/area_stats_univar_sync')
flask_api.add_resource(AsyncEphemeralSTRDSSamplingResource, '/locations/<string:location_name>/mapsets/'
'<string:mapset_name>/strds/<string:strds_name>'
'/sampling_async')
flask_api.add_resource(SyncEphemeralSTRDSSamplingResource, '/locations/<string:location_name>/mapsets/'
'<string:mapset_name>/strds/<string:strds_name>'
'/sampling_sync')
flask_api.add_resource(AsyncEphemeralSTRDSSamplingGeoJSONResource, '/locations/<string:location_name>/mapsets/'
'<string:mapset_name>/strds/<string:strds_name>'
'/sampling_async_geojson')
flask_api.add_resource(SyncEphemeralSTRDSSamplingGeoJSONResource, '/locations/<string:location_name>/mapsets/'
'<string:mapset_name>/strds/<string:strds_name>'
'/sampling_sync_geojson')
flask_api.add_resource(
AsyncEphemeralRasterSamplingResource,
"/locations/<string:location_name>/mapsets/"
"<string:mapset_name>/raster_layers/<string:raster_name>"
"/sampling_async",
)
flask_api.add_resource(
SyncEphemeralRasterSamplingResource,
"/locations/<string:location_name>/mapsets/"
"<string:mapset_name>/raster_layers/<string:raster_name>",
)
flask_api.add_resource(
AsyncEphemeralVectorSamplingResource,
"/locations/<string:location_name>/mapsets/"
"<string:mapset_name>/vector_layers/<string:vector_name>"
"/sampling_async",
)
flask_api.add_resource(
SyncEphemeralVectorSamplingResource,
"/locations/<string:location_name>/mapsets/"
"<string:mapset_name>/vector_layers/<string:vector_name>"
"/sampling_sync",
)
Loading

0 comments on commit 45e6710

Please sign in to comment.