diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2ec35b7..c93ed05 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,6 +1,8 @@ name: CI on: + push: + branches: [main] pull_request: workflow_dispatch: diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 4e7418a..fde6abe 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -1,6 +1,8 @@ name: lint and style checks on: + push: + branches: [main] pull_request: workflow_dispatch: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1a86b8f..2998b06 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,7 +11,7 @@ repos: hooks: - id: mypy args: [--ignore-missing-imports, --check-untyped-defs] - additional_dependencies: [types-PyYAML] + additional_dependencies: [types-PyYAML, types-requests] - repo: https://github.com/pappasam/toml-sort rev: v0.24.2 hooks: diff --git a/.python-version b/.python-version new file mode 100644 index 0000000..2c07333 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.11 diff --git a/pyproject.toml b/pyproject.toml index fa81333..89bb585 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,12 +1,14 @@ [build-system] -requires = ["setuptools >= 61.0", "wheel"] -build-backend = "setuptools.build_meta" +requires = ["hatchling"] +build-backend = "hatchling.build" [project] name = "python_project" version = "0.0.1" -requires-python = ">=3.8" -dependencies = [ +requires-python = ">=3.10" + +[dependency-groups] +dev = [ "pre-commit", "pytest", "pytest-cov", @@ -25,6 +27,12 @@ omit = [ fail_under = 80 show_missing = true +[tool.hatch.build.targets.wheel] +packages = ["src"] + +[tool.hatch.metadata] +allow-direct-references = true + [tool.mypy] disable_error_code = ["no-redef"] # for fasthtml @@ -50,5 +58,3 @@ ignore = [ known-local-folder = ["src"] no-lines-before = ["local-folder"] -[tool.setuptools] -packages = ["src"]