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

PyPI #35

Merged
merged 9 commits into from
Dec 21, 2023
Merged

PyPI #35

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 .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ exclude = .git,__pycache__,env
# F401 'actinia.actinia.Actinia' imported but unused

per-file-ignores =
./actinia/__init__.py: F401
./src/actinia/__init__.py: F401
46 changes: 7 additions & 39 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,14 @@
# 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 wheel setuptools
- name: Build package
run: |
python3 setup.py bdist_wheel
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: dist/*.whl

- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
# repository_url: https://test.pypi.org/legacy/
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: dist/
verbose: true
publish-python:
uses: mundialis/github-workflows/.github/workflows/python-publish.yml@python-publish
# with:
# test_pypi: true
secrets:
# PYPI_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
15 changes: 6 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
SRC := .

.PHONY: dependencies

dependencies:
pip install -r $(SRC)/requirements.txt
.PHONY: installdev

install:
pip install actinia-python-client

installdev: dependencies
installdev:
pip3 install pip-tools
pip install -e .

mockedtest: dependencies
mockedtest: installdev
pip install pytest
python -m pytest tests_mocked/

test: dependencies
test: installdev
pip install pytest
python -m pytest tests/

devtest:
pip install -r $(SRC)/requirements.txt
devtest: installdev
pip install pytest
python -m pytest tests/ -m dev
7 changes: 6 additions & 1 deletion README-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,21 @@ source env/bin/activate
```
With `deactivate` you can exit the virtual env


## Install actinia for development
```

```bash
make installdev
```

Test with Python3:

```python3
from actinia import Actinia
test = Actinia()
```


## Run tests
```
docker-compose -f "docker/docker-compose-test.yml" up -d --build
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@ Python Client Library for [actinia](https://actinia.mundialis.de/).
## Installation

```bash
VERSION="0.3.1"

pip3 install "actinia-python-client @ https://github.com/actinia-org/actinia-python-client/releases/download/${VERSION}/actinia_python_client-${VERSION}-py3-none-any.whl"
pip3 install actinia-python-client
```

For newest version see [releases](https://github.com/actinia-org/actinia-python-client/releases).


## Small Example

See [examples](https://actinia-org.github.io/actinia-python-client/03_quickstart)
34 changes: 34 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "actinia-python-client"
version = "0.3.1"
authors = [
{ name="Anika Weinmann", email="[email protected]" },
]
maintainers = [{name="mundialis GmbH & Co. KG", email="[email protected]"}]
description = "Python client library for actinia requests."
readme = "README.md"
requires-python = ">=3.8"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: OS Independent",
]
dependencies = [
"jinja2",
"requests",
"sphinx-material",
]

[project.urls]
"Homepage" = "https://github.com/actinia-org/actinia-python-client"
"Bug Tracker" = "https://github.com/actinia-org/actinia-python-client/issues"

[tool.setuptools.packages.find]
where = ["src"]

[tool.setuptools.package-data]
actinia = ["templates/*.json"]
3 changes: 0 additions & 3 deletions requirements.txt

This file was deleted.

34 changes: 0 additions & 34 deletions setup.py

This file was deleted.

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.