-
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.
* Add poetry package structure for SCC1 driver * Add initial github action for build and test
- Loading branch information
Showing
9 changed files
with
926 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Build and Test | ||
on: push | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
poetry-version: ["1.7.1"] | ||
os: [ubuntu-22.04, macos-latest, windows-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Poetry | ||
uses: abatilo/actions-poetry@v2 | ||
with: | ||
poetry-version: ${{ matrix.poetry-version }} | ||
- uses: actions/cache@v3 | ||
name: Define a cache for the virtual environment based on the dependencies lock file | ||
with: | ||
path: ./.venv | ||
key: venv-${{ hashFiles('poetry.lock') }} | ||
- name: Install the project dependencies | ||
run: poetry install --with test | ||
- name: Verify style with flake8 | ||
run: poetry run flake8 | ||
- name: Run tests | ||
run: poetry run pytest | ||
- name: Coveralls | ||
uses: coverallsapp/github-action@v2 |
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,27 @@ | ||
name: Build and Test | ||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- "^[0-9]+.[0-9]+.[0-9]+" | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Poetry | ||
uses: abatilo/actions-poetry@v2 | ||
with: | ||
poetry-version: ${{ matrix.poetry-version }} | ||
- uses: actions/cache@v3 | ||
name: Define a cache for the virtual environment based on the dependencies lock file | ||
with: | ||
path: ./.venv | ||
key: venv-${{ hashFiles('poetry.lock') }} | ||
- name: Install the project dependencies | ||
run: poetry install --with docs |
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,32 @@ | ||
name: Build and Test | ||
on: | ||
push: | ||
tags: | ||
- "^[0-9]+.[0-9]+.[0-9]+" | ||
|
||
jobs: | ||
publish: | ||
environment: | ||
name: release | ||
url: https://pypi.org/p/sensirion-uart-scc1 | ||
permissions: | ||
id-token: write | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Poetry | ||
uses: abatilo/actions-poetry@v2 | ||
with: | ||
poetry-version: ${{ matrix.poetry-version }} | ||
- uses: actions/cache@v3 | ||
name: Define a cache for the virtual environment based on the dependencies lock file | ||
with: | ||
path: ./.venv | ||
key: venv-${{ hashFiles('poetry.lock') }} | ||
- name: Install the project dependencies | ||
run: poetry install | ||
- name: Install the project dependencies | ||
run: poetry publish --build |
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 |
---|---|---|
|
@@ -42,6 +42,7 @@ htmlcov/ | |
.nox/ | ||
.coverage | ||
.coverage.* | ||
coverage.lcov | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
|
Large diffs are not rendered by default.
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,3 @@ | ||
[virtualenvs] | ||
create = true | ||
in-project = 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
[tool.poetry] | ||
name = "sensirion-uart-scc1" | ||
version = "0.1.0" | ||
description = "Driver for Sensirion SCC1 USB cable" | ||
authors = ["Pascal Sachs"] | ||
license = "BSD-3-Clause" | ||
readme = "README.md" | ||
|
||
[tool.poetry.dependencies] | ||
python = ">=3.8.1,<4" | ||
sensirion-shdlc-driver = "^0.1.5" | ||
|
||
[tool.poetry.group.test] | ||
optional = true | ||
|
||
[tool.poetry.group.test.dependencies] | ||
pytest = "^7.4" | ||
flake8 = "^7.0.0" | ||
pytest-cov = "^4.1" | ||
|
||
[tool.pytest.ini_options] | ||
minversion = "7.0" | ||
addopts = "--cov=sensirion_uart_scc1 --cov-report term --cov-report lcov" | ||
testpaths = [ | ||
"tests" | ||
] | ||
|
||
[tool.poetry.group.docs] | ||
optional = true | ||
|
||
[tool.poetry.group.docs.dependencies] | ||
sphinx = "^6.1.3" | ||
sphinx-rtd-theme = "^1.2.0" | ||
|
||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" |
Empty file.
Empty file.