Skip to content
Merged
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
72 changes: 72 additions & 0 deletions .github/workflows/cd-pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: CD Pipeline

on:
workflow_dispatch:

jobs:
test_publish_package:
name: publish package to test pypi
runs-on: ubuntu-latest
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: checkout code
uses: actions/checkout@v4

- name: set up python
uses: actions/setup-python@v3
with:
python-version: 3.11

- name: install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh

- name: build package
run: uv build

- name: publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/

publish:
name: publish package to pypi
runs-on: ubuntu-latest
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: checkout code
uses: actions/checkout@v4

- name: set up python
uses: actions/setup-python@v3
with:
python-version: 3.11

- name: install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh

# - name: Add uv to PATH
# run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH

- name: build
run: uv build

- name: publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

publish_docs:
name: trigger docs pipeline
runs-on: ubuntu-latest
steps:
- name: trigger downstream workflow
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: hololinked-dev/docs
event-type: trigger-downstream
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Unit Tests For Development
name: CI Pipeline

on:
workflow_dispatch:
Expand All @@ -10,6 +10,26 @@ on:
- main

jobs:
codestyle:
name: ruff codestyle check/linting
runs-on: ubuntu-latest
continue-on-error: true

steps:
- name: checkout code
uses: actions/checkout@v4

- name: set up python 3.11
uses: actions/setup-python@v3
with:
python-version: 3.11

- name: install ruff
run: pip install ruff

- name: run ruff linter
run: ruff check hololinked

test:
strategy:
matrix:
Expand All @@ -32,57 +52,57 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
- name: checkout code
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
- name: set up python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install uv (Linux/macOS)
- name: install uv (linux/macOS)
if: runner.os != 'Windows'
run: curl -LsSf https://astral.sh/uv/install.sh | sh

- name: Install uv (Windows)
- name: install uv (windows)
if: runner.os == 'Windows'
run: |
python -m pip install uv

- name: Install dependencies (Linux/macOS)
- name: install dependencies (linux/macOS)
if: runner.os != 'Windows'
run: |
uv venv .venv
source .venv/bin/activate
uv sync --no-install-project --group test --group dev

- name: Install dependencies (Windows)
- name: install dependencies (windows)
if: runner.os == 'Windows'
run: |
uv venv .venv
.venv\Scripts\activate
uv sync --no-install-project --group test --group dev

- name: Run unit tests (Linux/macOS)
- name: run unit tests (linux/macOS)
if: runner.os != 'Windows' && matrix.python-version != 3.13
run: |
source .venv/bin/activate
uv run coverage run -m unittest discover -s tests -p 'test_*.py'

- name: Run unit tests and generate coverage report (Linux/macOS python 3.13)
- name: run unit tests (Windows)
if: runner.os == 'Windows'
run: |
.venv\Scripts\activate
uv run coverage run -m unittest discover -s tests -p "test_*.py"

- name: run unit tests and generate coverage report (linux/macOS python 3.13)
if: runner.os != 'Windows' && matrix.python-version == 3.13
run: |
source .venv/bin/activate
uv run coverage run -m unittest discover -s tests -p 'test_*.py'
uv run coverage xml -o coverage.xml

- name: Run unit tests (Windows)
if: runner.os == 'Windows'
run: |
.venv\Scripts\activate
uv run coverage run -m unittest discover -s tests -p "test_*.py"

- name: Upload coverage report as artifact
- name: upload coverage report as artifact
uses: actions/upload-artifact@v4
if: runner.os != 'Windows' && matrix.python-version == 3.13
with:
Expand All @@ -91,23 +111,23 @@ jobs:
if-no-files-found: warn

publish_coverage:
name: Publish coverage (Ubuntu Python 3.13)
name: publish coverage
needs: test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout code
- name: checkout code
uses: actions/checkout@v4

- name: Download Ubuntu 3.13 coverage artifact
- name: download coverage artifact
id: dl
uses: actions/download-artifact@v4
with:
name: coverage-report-ubuntu-latest-py3.13
path: .
continue-on-error: true

- name: Upload coverage to Codecov
- name: upload coverage to codecov
if: steps.dl.outcome == 'success'
uses: codecov/codecov-action@v4
env:
Expand All @@ -118,30 +138,6 @@ jobs:
fail_ci_if_error: true
slug: hololinked-dev/hololinked

- name: Skip note (no Ubuntu 3.13 artifact found)
- name: skip note (no artifact found)
if: steps.dl.outcome != 'success'
run: echo "No Ubuntu 3.13 coverage artifact present; skipping Codecov upload."

publish_package:
name: Publish package to Test PyPI
runs-on: ubuntu-latest
needs: test
if: github.event_name == 'workflow_dispatch'
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.11
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Build package
run: uv build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
run: echo "No coverage artifact present; skipping codecov upload."
38 changes: 0 additions & 38 deletions .github/workflows/python-publish-pypi.yml

This file was deleted.

37 changes: 0 additions & 37 deletions .github/workflows/python-publish-testpypi.yml

This file was deleted.

49 changes: 0 additions & 49 deletions .github/workflows/test-release.yml

This file was deleted.

7 changes: 6 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,10 @@
80, 120
],
"editor.formatOnSave": true,
"ruff.lineLength": 120
"ruff.lineLength": 120,
"[yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"prettier.tabWidth": 2
}
}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

✓ means ready to try

## [v0.3.5] - 2025-10-18

- supports MongoDB as a database for property persistence (see infrastructure project in README to quick-setup)
- adds HTTP handlers for reading/writing multiple properties at once (which used to be supported <0.2.11 but removed later until now by mistake)
- refactors CI/CD pipelines - separate workflows for developing and publishing

## [v0.3.4] - 2025-10-02

- fixes a bug in content type in the forms of TD for HTTP protocol binding, when multiple serializers are used
Expand Down
2 changes: 1 addition & 1 deletion doc
Submodule doc updated from afa0e6 to d4e965
2 changes: 1 addition & 1 deletion hololinked/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.3.4"
__version__ = "0.3.5"
Loading
Loading