Skip to content

Commit

Permalink
chore: sync project template
Browse files Browse the repository at this point in the history
  • Loading branch information
makkus committed Dec 18, 2024
1 parent 3bd62f7 commit 27cf34c
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 71 deletions.
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/DHARPA-Project/kiara_plugin.develop.git",
"commit": "8aa22f1d306a334a38b4a7c35aea3481622860aa",
"commit": "de71bdfbfb07e024811fd65146dd75aa6f34a34e",
"checkout": null,
"context": {
"cookiecutter": {
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-darwin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: macos-14
strategy:
matrix:
python_version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python_version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- name: "Set up Python ${{ matrix.python_version }}"
uses: actions/setup-python@v5
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build-linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python_version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python_version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- name: "Set up Python ${{ matrix.python_version }}"
uses: actions/setup-python@v5
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python_version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python_version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- name: "Set up Python ${{ matrix.python_version }}"
uses: actions/setup-python@v5
Expand Down Expand Up @@ -174,7 +174,7 @@ jobs:
with:
fetch-depth: 0
- name: install kiara_plugin.develop
run: pip install kiara_plugin.develop
run: pip install -U git+https://github.com/DHARPA-project/kiara_plugin.develop@develop
- name: build conda package
run: kiara build conda pkg --channel dharpa --channel conda-forge --patch-data ci/conda/conda-pkg-patch.yaml --output-folder build-dir .
- name: upload artifacts
Expand All @@ -184,7 +184,7 @@ jobs:
path: build-dir/

release_conda_package:
name: publish python package to anaconda
name: publish conda package to anaconda
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
needs:
Expand Down Expand Up @@ -212,7 +212,7 @@ jobs:
name: conda-pkgs
path: build-dir/
- name: release conda package
run: kiara build conda publish --user dharpa --channel dharpa --token ${{ secrets.ANACONDA_PUSH_TOKEN }} build-dir
run: kiara build conda publish --user dharpa --channel main --token ${{ secrets.ANACONDA_PUSH_TOKEN }} build-dir

merge_tag_to_main:
name: merge current tag to main branch
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
python_version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python_version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- name: "Set up Python ${{ matrix.python_version }}"
uses: actions/setup-python@v5
Expand Down
21 changes: 5 additions & 16 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,14 @@ default_language_version:
repos:

- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: 'v9.15.0'
rev: 'v9.20.0'
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies: ['@commitlint/config-conventional']

- repo: https://github.com/psf/black
rev: 24.3.0
hooks:
- id: black

- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.9.0' # Use the sha / tag you want to point at
rev: 'v1.13.0' # Use the sha / tag you want to point at
hooks:
- id: mypy
files: "^src/"
Expand All @@ -26,21 +21,15 @@ repos:

- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.4.1
rev: v0.8.3
hooks:
# Run the linter.
- id: ruff
args: [ --fix ]
# Run the formatter.
#- id: ruff-format

- repo: https://github.com/Kludex/no-optional
rev: 0.4.0
hooks:
- id: no_optional
# - id: ruff-format

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 'v4.5.0'
rev: 'v4.6.0'
hooks:
- id: trailing-whitespace
exclude: 'setup.cfg'
Expand Down
87 changes: 40 additions & 47 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ authors = [
{name = "Markus Binsteiner", email = "[email protected]"}
]
readme = "README.md"
requires-python = ">=3.8"
requires-python = ">=3.9"
keywords = ["kiara"]
license = {text = "MPL-2.0"}
classifiers = [
Expand All @@ -40,15 +40,14 @@ classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
]
dependencies = [
"kiara>=0.5.11,<0.6.0",
"kiara_plugin.core_types>=0.5.1,<0.6.0",
"kiara>=0.5.13,<0.6.0",
"kiara_plugin.core_types>=0.5.2,<0.6.0",
"httpx>=0.23.0",
"pyzenodo3>=1.0.2",
"PyGithub>=1.58.0",
Expand Down Expand Up @@ -148,32 +147,9 @@ line-length = 88

src = ["src", "tests"]

select = [
"E",
"F",
"RUF",
"I001",
"YTT",
"S",
"C4",
"T10",
"ISC",
"ICN",
"T20",
"Q",
"TID",
"PD",
"PLC",
"PLE",
"PLR",
"PLW",
"PIE",
]
ignore = ["E501", "S101", "SIM118", "SIM108", "PLR2004", "PLR0913", "S110", "PLR0912", "PLR0915", "PIE810"]

fix = true
fixable = ["E", "F", "RUF100", "I001", "Q"]

# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
Expand All @@ -194,35 +170,52 @@ exclude = [
"dist",
"node_modules",
"venv",
"docs",
".venv"
]
per-file-ignores = { }

# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"

# Assume Python 3.10.
target-version = "py310"

[tool.ruff.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10
[tool.ruff.lint]
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
fixable = ["E", "F", "RUF100", "I001", "Q", "D"]

[tool.ruff.isort]
known-first-party = ["kiara", "kiara_plugin"]
select = [
"E",
"F",
"RUF",
"I001",
"YTT",
"S",
"C4",
"T10",
"ISC",
"ICN",
"T20",
"Q",
"TID",
"PD",
"PLC",
"PLE",
"PLR",
"PLW",
"PIE",
]

[tool.ruff.pydocstyle]
convention = "google"
ignore = ["E501", "S101", "SIM118", "SIM108", "PLR2004", "PLR0913", "S110", "PIE810", "PLR0911", "PLR0915", "PLR0912", "D", "D401", "PLW0603", "PLR5501", "PLW2901", "S603", "S608", "ISC001", "PLC0206", "RUF022"]
per-file-ignores = { }

[tool.pyright]
include = ["src"]
exclude = ["**/__pycache__"]
ignore = []
[tool.ruff.lint.isort]
known-first-party = ["kiara", "kiara_plugin"]

reportMissingImports = true
reportMissingTypeStubs = false

executionEnvironments = [
]
[tool.ruff.lint.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10

[tool.ruff.lint.pydocstyle]
convention = "google"

[tool.mypy]
python_version = "3.9"
Expand Down

0 comments on commit 27cf34c

Please sign in to comment.