-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #85 from nobbi1991/update_project_structure
Update project structure
- Loading branch information
Showing
197 changed files
with
16,437 additions
and
16,538 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 |
---|---|---|
|
@@ -2,38 +2,39 @@ name: Create Docker Image | |
|
||
on: | ||
release: | ||
types: [published] | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
buildx: | ||
runs-on: ubuntu-latest | ||
environment: dockerhub | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: main | ||
- name: Get latest release | ||
id: latest_version | ||
uses: abatilo/[email protected].1 | ||
with: | ||
owner: nobbi1991 | ||
repo: HABAppRules | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- name: Build and push | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
push: true | ||
tags: | | ||
${{ secrets.DOCKER_HUB_USERNAME }}/habapp_rules:latest | ||
${{ secrets.DOCKER_HUB_USERNAME }}/habapp_rules:${{ steps.latest_version.outputs.latest_tag }} | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: main | ||
|
||
- name: Get latest release | ||
id: latest_version | ||
uses: abatilo/[email protected].3 | ||
with: | ||
owner: nobbi1991 | ||
repo: HABAppRules | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Build and push | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
push: true | ||
tags: | | ||
${{ secrets.DOCKER_HUB_USERNAME }}/habapp_rules:latest | ||
${{ secrets.DOCKER_HUB_USERNAME }}/habapp_rules:${{ steps.latest_version.outputs.latest_tag }} |
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,32 +1,31 @@ | ||
name: Publish Python distributions to PyPI | ||
name: Publish Python Package | ||
|
||
on: | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-n-publish: | ||
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
environment: pypi | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: main | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.10' | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Install Hatch | ||
run: pip install hatch | ||
|
||
- name: Build the package | ||
run: hatch build | ||
|
||
- name: Install setuptools | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install --upgrade setuptools wheel twine | ||
- name: Build a binary wheel and a source tarball | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
- name: Publish distribution to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.pypi_api_key }} | ||
- name: Publish to PyPI | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.pypi_api_key }} | ||
run: pip install twine && twine upload dist/* |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Run Tests | ||
|
||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.10", "3.11", "3.12", "3.13"] | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install Dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pre-commit | ||
- name: Run Pre-Commit Hooks | ||
run: | | ||
pre-commit install | ||
pre-commit run --all-files | ||
unit-tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.10", "3.11", "3.12", "3.13"] | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install Hatch | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install hatch | ||
- name: Run Hatch Tests | ||
run: | | ||
hatch run tests:local | ||
- name: Upload Coverage Report on Failure | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: coverage-report-${{ matrix.python-version }} | ||
path: htmlcov |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
default_install_hook_types: [pre-push] | ||
repos: | ||
# - repo: https://github.com/pre-commit/mirrors-mypy | ||
# rev: v1.13.0 | ||
# hooks: | ||
# - id: mypy | ||
# args: [--install-types, --non-interactive] | ||
# exclude: ^tests/ | ||
# additional_dependencies: | ||
# - pydantic | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v5.0.0 | ||
hooks: | ||
- id: check-added-large-files | ||
- id: check-ast | ||
- id: check-case-conflict | ||
- id: check-executables-have-shebangs | ||
- id: check-json | ||
- id: check-toml | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: fix-byte-order-marker | ||
- id: trailing-whitespace | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.7.0 | ||
hooks: | ||
- id: ruff | ||
args: [--fix] | ||
- id: ruff-format | ||
- repo: https://github.com/google/yamlfmt | ||
rev: v0.13.0 | ||
hooks: | ||
- id: yamlfmt | ||
args: [-conf, .yamlfmt.yaml] | ||
- repo: https://github.com/scop/pre-commit-shfmt | ||
rev: v3.10.0-1 | ||
hooks: | ||
- id: shfmt | ||
- repo: https://github.com/executablebooks/mdformat | ||
rev: 0.7.18 | ||
hooks: | ||
- id: mdformat | ||
|
||
- repo: local | ||
hooks: | ||
- id: version-check | ||
name: Check versions | ||
entry: python version_check.py | ||
language: python | ||
pass_filenames: false | ||
additional_dependencies: | ||
- requests | ||
- pytz |
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,5 @@ | ||
formatter: | ||
type: basic | ||
eof_newline: true | ||
max_line_length: 120 | ||
retain_line_breaks_single: true |
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.