Skip to content

Commit

Permalink
Merge pull request #519 from OpenTrafficCam/feature/2132-implement-re…
Browse files Browse the repository at this point in the history
…lease-workflow-to-publish-otanalytics-on-pypi-user-profile

add file to publish te pypi release, changed pyproject details
  • Loading branch information
frunika authored Aug 6, 2024
2 parents 1d42be6 + 8a13346 commit 1427731
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
PLATOMO_BUILDER_ACCESS: ${{ secrets.PLATOMO_BUILDER_ACCESS }}
with:
package-version: nightly
package-path: OTAnalytics
draft-release: false
pre-release: true
delete-existing: true
3 changes: 2 additions & 1 deletion .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@ jobs:
uses: './.github/workflows/regression-test.yml'
secrets: inherit
create_release:
needs:
needs:
- test
- regression-test
uses: "platomo/GitHub-workflows/.github/workflows/reusable-create-release-with-assets.yml@main"
secrets:
PLATOMO_BUILDER_ACCESS: ${{ secrets.PLATOMO_BUILDER_ACCESS }}
with:
package-version: ${{ github.ref_name }}
package-path: OTAnalytics
draft-release: false
pre-release: false
delete-existing: false
36 changes: 36 additions & 0 deletions .github/workflows/release-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Release Version to PYPI

on:
# Create release if tag is pushed to main.
# Needs: secrets.PLATOMO_BUILDER_ACCESS
push:
tags:
- "v*.*.*.*"

jobs:
test:
if: endsWith(github.event.base_ref, 'main')
uses: './.github/workflows/test.yml'
regression-test:
if: endsWith(github.event.base_ref, 'main')
uses: './.github/workflows/regression-test.yml'
secrets: inherit
create_pypi_release:
needs:
- test
- regression-test
uses: "platomo/GitHub-workflows/.github/workflows/reusable-create-pypi-release.yml@main"
secrets:
PLATOMO_BUILDER_ACCESS: ${{ secrets.PLATOMO_BUILDER_ACCESS }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest]
py: ["3.11"]
with:
package-version: ${{ github.ref_name }}
package-path: OTAnalytics
os: ${{ matrix.os }}
py-version: ${{ matrix.py }}
release-url: https://test.pypi.org/p/OTAnalytics-EXAMPLE-TEST-DISTRIBUTION
31 changes: 28 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,41 @@ requires = ["hatchling", "hatch-requirements-txt"]
build-backend = "hatchling.build"

[project]
name = "OTAnalytics"
version = "0.0.1"
dynamic = ["dependencies"]
name = "OTAnalytics-EXAMPLE-TEST-DISTRIBUTION"
dynamic = ["dependencies", "version"]
authors = [
{ name="Martin Bärwolff", email="martin.baerwolff@platomo.com" },
{ name="Lars Briem", email="lars.briem@platomo.com" },
{ name="Sebastian Buck", email="sebastian.buck@platomo.com" },
{ name="Michael Heilig", email="michael.heilig@platomo.com" },
{ name="Randy Seng", email="randy.seng@platomo.com" },
{ name="Steven Schlechte", email="steven.schlechte@platomo.com" },
]
description = "OTAnalytics is a core module of the OpenTrafficCam framework to perform traffic analysis on trajectories of road users."
readme = "README.md"
requires-python = ">=3.11"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: OS Independent",
]
keywords = ["OpenTrafficCam", "Traffic Analysis", "Traffic Counting"]

[project.urls]
Homepage = "https://opentrafficcam.org/"
Documentation = "https://opentrafficcam.org/overview/"
Repository = "https://github.com/OpenTrafficCam/OTAnalytics"
Issues = "https://github.com/OpenTrafficCam/OTAnalytics/issues"

[tool.hatch.metadata.hooks.requirements_txt]
files = ["requirements.txt"]

[tool.hatch.version]
path = "OTAnalytics/version.py"

[tool.hatch.build.targets.wheel]
packages = ["OTAnalytics"]

[tool.black]
line-length = 88

Expand Down
2 changes: 2 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
-r requirements.txt
black==24.4.2
flake8==7.1.0
hatch-requirements-txt==0.4.1
interrogate==1.7.0
isort==5.13.2
mypy==1.10.0
pre-commit==3.7.1
pytest==8.2.2
pytest-benchmark==4.0.0
pytest-cov==5.0.0
twine==5.0.0
yamllint==1.35.1

0 comments on commit 1427731

Please sign in to comment.