Skip to content

Commit 91205d8

Browse files
committed
Add initial information and test CI
1 parent 7642582 commit 91205d8

8 files changed

Lines changed: 43 additions & 11 deletions

File tree

.github/workflows/pytest.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This workflow will install Python dependencies, run tests and lint with a single version of Python
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: Pytesting
5+
6+
on:
7+
push:
8+
branches: [ main ]
9+
pull_request:
10+
branches: [ main ]
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Set up Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: '3.12'
21+
cache: 'pip'
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install -e .[test]
26+
pip install -e .[lint]
27+
- name: Lint with Ruff
28+
run: |
29+
ruff check --output-format=github .
30+
- name: Test with pytest and coverage
31+
run: |
32+
pytest --cov=./ --cov-report=term

pyproject.toml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
1-
[build-system]
2-
requires = ["hatchling"]
3-
build-backend = "hatchling.build"
4-
51
[project]
62
name = "kitchenowl-python"
73
description = "A python wrapper for the KitchenOwl API"
84
readme = "README.md"
95
keywords = ["kitchenowl"]
10-
version = "0.1.0"
6+
version = "0.0.1"
117
authors = [
12-
{name = "super-qua"}
8+
{name = "super-qua"},
9+
{name = "Tom Bursch", email = "tom@kitchenowl.org"}
1310
]
1411
license = {file = "LICENSE"}
1512
classifiers = [
@@ -33,7 +30,9 @@ lint = [
3330
]
3431

3532
[project.urls]
36-
Repository = "https://github.com/super-qua/kitchenowl-python"
33+
Homepage = "https://kitchenowl.org"
34+
Repository = "https://github.com/tombursch/kitchenowl-python"
35+
Issues = "https://github.com/TomBursch/kitchenowl/issues"
3736

3837

3938
[tool.pytest.ini_options]

src/kitchenowl_python/const.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"""Constants for the KitchenOwl API."""
1+
"""Constants for the KitchenOwl API."""

src/kitchenowl_python/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ class KitchenOwlRequestException(KitchenOwlException):
88
"""Raised on a bad request to the KitchenOwl instance."""
99

1010
class KitchenOwlAuthException(KitchenOwlException):
11-
"""Raised when the authentication token is not valid."""
11+
"""Raised when the authentication token is not valid."""

tests/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""KitchenOwl API Tests."""

tests/data/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Constants for KitchenOwl tests."""

tests/data/defaults.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,4 +259,4 @@
259259
"ordering": 1,
260260
"support": 0,
261261
"updated_at": 0,
262-
}
262+
}

tests/test_kitchenowl.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from aiohttp.hdrs import METH_DELETE, METH_GET, METH_HEAD, METH_POST
99
from aioresponses import CallbackResult, aioresponses
1010

11-
import kitchenowl_python
1211
from kitchenowl_python.exceptions import KitchenOwlAuthException, KitchenOwlRequestException
1312
from kitchenowl_python.kitchenowl import KitchenOwl
1413
from kitchenowl_python.types import (

0 commit comments

Comments
 (0)