-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix import error and prepare for PyPI (#55)
* fix import error * adjust test * use pyproject.toml * remove test debugging * upload release wheel to pypi
- Loading branch information
Showing
61 changed files
with
107 additions
and
204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,19 @@ | ||
# This workflow will upload a Python Package using Twine when a release is created | ||
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries | ||
|
||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
name: Upload Python Package | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
deploy: | ||
|
||
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 | ||
publish-python-test-pypi: | ||
uses: mundialis/github-workflows/.github/workflows/python-publish.yml@main | ||
with: | ||
test_pypi: true | ||
secrets: | ||
PYPI_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }} | ||
|
||
# - name: Publish package | ||
# uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 | ||
# with: | ||
# user: __token__ | ||
# password: ${{ secrets.PYPI_API_TOKEN }} | ||
publish-python-pypi: | ||
uses: mundialis/github-workflows/.github/workflows/python-publish.yml@main | ||
secrets: | ||
PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,68 @@ | ||
[build-system] | ||
requires = ["setuptools>=40.6.0", "wheel"] | ||
requires = ["setuptools>=61.0.0", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "actinia-module-plugin" | ||
version = "2.5.1" | ||
description = "A (RESTFUL) Flask application which adds module self-description and process-chain-template management to actinia-core" | ||
readme = "README.md" | ||
authors = [ | ||
{ name = "Carmen Tawalika"}, | ||
{ name = "Markus Neteler"}, | ||
{ name = "Julia Haas"}, | ||
{ name = "Guido Riembauer"}, | ||
{ name = "Anika Weinmann"}, | ||
{ name = "Jan Suleiman"}, | ||
{ name = "Lina Krisztian"}, | ||
] | ||
classifiers = [ | ||
"License :: OSI Approved :: Apache Software License", | ||
"Programming Language :: Python :: 3", | ||
] | ||
requires-python = ">=3.8" | ||
keywords = [ | ||
"processing", | ||
"earth observation", | ||
"cloud-based processing", | ||
"rest api", | ||
"gis", | ||
"grass gis", | ||
"osgeo", | ||
] | ||
dependencies = [ | ||
"colorlog>=4.2.1", | ||
] | ||
|
||
[project.optional-dependencies] | ||
test = [ | ||
"pytest", | ||
"pytest-cov", | ||
] | ||
|
||
[project.scripts] | ||
pc2grass = "actinia_module_plugin.resources.cli:pc2grass" | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/mundialis/actinia-module-plugin" | ||
Tutorial = "https://mundialis.github.io/actinia_core" | ||
API_Docs = "https://redocly.github.io/redoc/?url=https://actinia.mundialis.de/latest/swagger.json" | ||
|
||
[tool.flake8] | ||
max-line-length = 88 | ||
|
||
[tool.setuptools.packages.find] | ||
where = ["src"] | ||
|
||
[tool.setuptools.package-data] | ||
"*" = ["*.*"] | ||
|
||
[tool.pytest.ini_options] | ||
minversion = "6.0" | ||
addopts = "--cov actinia_module_plugin --cov-report term-missing --verbose --tb=line -x -s" | ||
testpaths = [ | ||
"tests", | ||
] | ||
markers = [ | ||
"dev: test current in development", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,11 @@ | ||
[metadata] | ||
name = actinia_module_plugin.wsgi | ||
description = A (RESTFUL) Flask application which adds module self-description and process-chain-template management and processing | ||
author = Carmen Tawalika | ||
author-email = [email protected] | ||
license = apache-2.0 | ||
url = https://github.com/mundialis/actinia-module-plugin | ||
long-description = file: README.md | ||
platforms = any | ||
# Add here all kinds of additional classifiers as defined under | ||
# https://pypi.python.org/pypi?%3Aaction=list_classifiers | ||
classifiers = | ||
Development Status :: 4 - Beta | ||
Programming Language :: Python | ||
|
||
[options] | ||
zip_safe = False | ||
packages = find: | ||
include_package_data = True | ||
package_dir = | ||
=. | ||
install_requires = colorlog;Flask;Flask-Cors;Flask-RESTful;flask-restful-swagger-2;python-json-logger;xmltodict; | ||
tests_require = pytest; pytest-cov; pwgen | ||
=src | ||
|
||
[options.packages.find] | ||
where = . | ||
where = src | ||
exclude = | ||
tests | ||
|
||
[options.extras_require] | ||
|
||
[test] | ||
# py.test options when running `python setup.py test` | ||
addopts = tests | ||
|
||
[tool:pytest] | ||
# Options for py.test: | ||
# Specify command line options as you would do when invoking py.test directly. | ||
# 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. | ||
# for debugging in tests, see https://docs.pytest.org/en/latest/usage.html | ||
addopts = | ||
--cov actinia_module_plugin --cov-report html | ||
--verbose --tb=line | ||
-x --pdb | ||
norecursedirs = | ||
dist | ||
build | ||
.tox | ||
|
||
[aliases] | ||
release = sdist bdist_wheel upload | ||
|
||
[bdist_wheel] | ||
# Use this option if your package is pure-python | ||
universal = 1 | ||
|
||
[build_sphinx] | ||
source_dir = docs | ||
build_dir = docs/_build | ||
|
||
[flake8] | ||
# Some sane defaults for the code style checker flake8 | ||
exclude = | ||
.tox | ||
build | ||
dist | ||
.eggs | ||
docs/conf.py | ||
|
||
[pyscaffold] | ||
version = 3.0.3 | ||
package = actinia_module_plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,4 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
""" | ||
Copyright (c) 2018-2021 mundialis GmbH & Co. KG | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
Setup file for actinia_module_plugin. | ||
This file was generated with PyScaffold 3.0.2. | ||
PyScaffold helps you to put up the scaffold of your new Python project. | ||
Learn more under: http://pyscaffold.org/ | ||
""" | ||
|
||
__author__ = "Carmen Tawalika" | ||
__copyright__ = "2018-2021 mundialis GmbH & Co. KG" | ||
__license__ = "Apache-2.0" | ||
|
||
|
||
from setuptools import setup | ||
|
||
entry_points = { | ||
"console_scripts": [ | ||
"name = actinia_module_plugin.resources.cli:name", | ||
"about = actinia_module_plugin.resources.cli:about", | ||
"pc2grass = actinia_module_plugin.resources.cli:pc2grass", | ||
] | ||
} | ||
|
||
|
||
def setup_package(): | ||
setup( | ||
setup_requires=["pyscaffold>=3.0a0,<3.1a0"], | ||
entry_points=entry_points, | ||
packages=["actinia_module_plugin"], | ||
package_dir={"actinia_module_plugin": "actinia_module_plugin"}, | ||
include_package_data=True, | ||
use_pyscaffold=True, | ||
) | ||
|
||
|
||
if __name__ == "__main__": | ||
setup_package() | ||
setup() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# -*- coding: utf-8 -*- | ||
import importlib.metadata | ||
|
||
try: | ||
# Change here if project is renamed and does not equal the package name | ||
dist_name = __name__ | ||
__version__ = importlib.metadata.version(dist_name) | ||
except Exception: | ||
__version__ = "unknown" |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
File renamed without changes.
File renamed without changes.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.