mirror of
https://github.com/jdejaegh/irm-kmi-api.git
synced 2025-06-27 04:05:56 +02:00
Create Python project
This commit is contained in:
parent
f0ec55866b
commit
1e3bc0d1f5
4 changed files with 95 additions and 1 deletions
2
.github/workflows/pytest.yml
vendored
2
.github/workflows/pytest.yml
vendored
|
@ -11,7 +11,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version: ["3.11", "3.12", "3.13"]
|
python-version: ["3.11", "3.13"]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: MathRobin/timezone-action@v1.1
|
- uses: MathRobin/timezone-action@v1.1
|
||||||
|
|
47
.github/workflows/release.yml
vendored
Normal file
47
.github/workflows/release.yml
vendored
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
name: Create release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*.*.*'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
tests:
|
||||||
|
uses: ./.github/workflows/pytest.yml
|
||||||
|
release:
|
||||||
|
name: Release pushed tag
|
||||||
|
needs: [tests]
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- name: Create release
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
tag: ${{ github.ref_name }}
|
||||||
|
run: |
|
||||||
|
gh release create "$tag" \
|
||||||
|
--repo="$GITHUB_REPOSITORY" \
|
||||||
|
--title="${GITHUB_REPOSITORY#*/} ${tag#v}" \
|
||||||
|
--generate-notes
|
||||||
|
publish:
|
||||||
|
name: Publish to PyPI
|
||||||
|
needs: [tests] # require tests to pass before deploy runs
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout source
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Set up Python 3.11
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: 3.11
|
||||||
|
- name: Build package
|
||||||
|
run: |
|
||||||
|
python -m pip install -U pip build
|
||||||
|
python -m build
|
||||||
|
- name: Publish
|
||||||
|
uses: pypa/gh-action-pypi-publish@v1.5.0
|
||||||
|
with:
|
||||||
|
user: __token__
|
||||||
|
password: ${{ secrets.PYPI_KEY }}
|
|
@ -0,0 +1 @@
|
||||||
|
__version__ = '0.1.0'
|
46
pyproject.toml
Normal file
46
pyproject.toml
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
[build-system]
|
||||||
|
requires = ["setuptools>=61.0.0", "wheel"]
|
||||||
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
|
[project]
|
||||||
|
name = "irm-kmi-api"
|
||||||
|
version = "0.1.0"
|
||||||
|
description = "Retrieve data from the Belgian IRM KMI in Python"
|
||||||
|
readme = "README.md"
|
||||||
|
authors = [{ name = "Jules Dejaeghere", email = "curable.grass491@mailer.me" }]
|
||||||
|
license = { file = "LICENSE" }
|
||||||
|
classifiers = [
|
||||||
|
"License :: OSI Approved :: Apache Software License",
|
||||||
|
"Programming Language :: Python",
|
||||||
|
"Programming Language :: Python :: 3",
|
||||||
|
]
|
||||||
|
keywords = ["weather", "weather-api", "netherlands", "weather-forecast", "pollen", "belgium", "luxembourg", "rain-radar"]
|
||||||
|
dependencies = [
|
||||||
|
"aiohttp==3.11.13",
|
||||||
|
"async-timeout==4.0.3",
|
||||||
|
"svgwrite==1.4.3",
|
||||||
|
]
|
||||||
|
requires-python = ">=3.11"
|
||||||
|
|
||||||
|
[project.urls]
|
||||||
|
Homepage = "https://github.com/jdejaegh/irm-kmi-api"
|
||||||
|
|
||||||
|
[tool.bumpver]
|
||||||
|
current_version = "0.1.0"
|
||||||
|
version_pattern = "MAJOR.MINOR.PATCH"
|
||||||
|
commit_message = "bump version {old_version} -> {new_version}"
|
||||||
|
tag_message = "{new_version}"
|
||||||
|
tag_scope = "default"
|
||||||
|
pre_commit_hook = ""
|
||||||
|
post_commit_hook = ""
|
||||||
|
commit = true
|
||||||
|
tag = true
|
||||||
|
push = true
|
||||||
|
|
||||||
|
[tool.bumpver.file_patterns]
|
||||||
|
"pyproject.toml" = [
|
||||||
|
'current_version = "{version}"',
|
||||||
|
'version = "{version}"'
|
||||||
|
]
|
||||||
|
"irm_kmi_api/__init__.py" = ["{version}"]
|
||||||
|
|
Loading…
Add table
Reference in a new issue