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
1 change: 1 addition & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ ignore = E203, E501, W503, W503, D105, D202, E721
max-line-length = 88
max-complexity = 10
doctests = true
exclude = .venv,.git,__pycache__,build,dist
19 changes: 10 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,27 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: abatilo/actions-poetry@v3.0.0
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
poetry-version: 1.8.3
version: "0.9.8"
enable-cache: true
- name: Install dependencies
run: |
poetry install
uv sync --all-extras
- name: Install Pydantic ${{ matrix.pydantic-version }}
run: |
if [ "${{ matrix.pydantic-version }}" = "1" ]; then
poetry run pip install "pydantic>=1.9.0,<2.0"
uv pip install "pydantic>=1.9.0,<2.0"
else
poetry run pip install "pydantic>=2.0,<3.0"
uv pip install "pydantic>=2.0,<3.0"
fi
- name: Run checks and lint code
run: |
poetry run invoke check
uv run invoke check
- name: Run tests
run: |
poetry run invoke test
poetry run coverage xml
uv run invoke test
uv run coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
1 change: 1 addition & 0 deletions climatecontrol/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
:licence: MIT, see LICENSE file for more details.

"""

from .core import Climate
from .exceptions import SettingsLoadError, SettingsValidationError

Expand Down
1 change: 0 additions & 1 deletion climatecontrol/constants.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Constants used in other modules."""


from enum import Enum


Expand Down
1 change: 1 addition & 0 deletions climatecontrol/core.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Climate parser."""

import logging
from contextlib import contextmanager
from copy import deepcopy
Expand Down
1 change: 1 addition & 0 deletions climatecontrol/processors.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Fragment processors."""

import glob
import logging
import os
Expand Down
763 changes: 0 additions & 763 deletions poetry.lock

This file was deleted.

96 changes: 51 additions & 45 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,56 +1,62 @@
[tool.poetry]
[project]
name = "climatecontrol"
version = "0.12.0"
version = "0.13.0"
description = "Python library for loading app configurations from files and/or namespaced environment variables."
authors = ["Davis Kirkendall <davis.e.kirkendall@gmail.com>"]
authors = [
{name = "Davis Kirkendall", email = "davis.e.kirkendall@gmail.com"}
]
license = "MIT"
readme = "README.rst"
homepage = "https://github.com/daviskirk/climatecontrol"
repository = "https://github.com/daviskirk/climatecontrol"
documentation = "https://github.com/daviskirk/climatecontrol"
requires-python = ">=3.10,<4.0"
keywords = ["climatecontrol", "configuration", "environment"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Utilities",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Utilities",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"wrapt>=1.14,<2.0",
]
include = ["LICENSE", "README.rst", "setup.py", "climatecontrol/py.typed"]

[tool.poetry.dependencies]
python = ">=3.10,<4.0"
wrapt = "^1.14"
dacite = { version = "^1.6", optional = true }
pydantic = { version = ">=1.7.4,<3.0", optional = true }

[tool.poetry.group.dev.dependencies]
pytest = "^6.2.2"
pytest-mock = "^3.5.1"
coverage = "^5.4"
tomli = "^2.0.1"
PyYAML = "^6.0.1"
click = ">=8.0"
invoke = "^2.0"
black = "^22.1.0"
mypy = "^1.0"
isort = ">=5.10.1"
flake8 = "^6.0"
dacite = "^1.6.0" # for extras
pydantic = ">=1.9.0,<3.0" # for extras
types-PyYAML = "^6.0.4"
tomli-w = "^1.0.0"
[project.optional-dependencies]
dataclasses = [
"dacite>=1.6,<2.0",
"pydantic>=1.7.4,<3.0",
]
dev = [
"pytest>=6.2.2",
"pytest-mock>=3.5.1",
"coverage>=5.4",
"tomli>=2.0.1",
"PyYAML>=6.0.1",
"click>=8.0",
"invoke>=2.0",
"black>=22.1.0",
"mypy>=1.0",
"isort>=5.10.1",
"flake8>=6.0",
"dacite>=1.6.0",
"pydantic>=1.9.0,<3.0",
"types-PyYAML>=6.0.4",
"tomli-w>=1.0.0",
]

[tool.poetry.extras]
dataclasses = ["dacite", "pydantic"]
[project.urls]
Homepage = "https://github.com/daviskirk/climatecontrol"
Repository = "https://github.com/daviskirk/climatecontrol"
Documentation = "https://github.com/daviskirk/climatecontrol"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
requires = ["uv_build>=0.9.8,<0.10.0"]
build-backend = "uv_build"

[tool.uv.build-backend]
module-root = ""
1 change: 1 addition & 0 deletions tests/test_settings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test settings."""

import json
import os
import sys
Expand Down
Loading