From 486a9f74a3798048a9a268065f2668049590da24 Mon Sep 17 00:00:00 2001 From: Markus Binsteiner Date: Wed, 18 Dec 2024 14:32:33 +0100 Subject: [PATCH] chore: build & package related chores --- .github/workflows/build-linux.yaml | 4 +-- .gitignore | 1 + .pre-commit-config.yaml | 15 ++------ ci/rattler-recipes/build.yaml | 37 ++++++++++++++++++++ pyproject.toml | 2 +- src/kiara/interfaces/python_api/kiara_api.py | 2 ++ 6 files changed, 45 insertions(+), 16 deletions(-) create mode 100644 ci/rattler-recipes/build.yaml diff --git a/.github/workflows/build-linux.yaml b/.github/workflows/build-linux.yaml index 70aafa3c5..84dfe788c 100644 --- a/.github/workflows/build-linux.yaml +++ b/.github/workflows/build-linux.yaml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python_version: ["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 @@ -65,7 +65,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python_version: ["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 diff --git a/.gitignore b/.gitignore index 6b0eae510..fc83907f8 100644 --- a/.gitignore +++ b/.gitignore @@ -79,3 +79,4 @@ temp/ # pixi environments .pixi pixi.lock +output diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0f409b243..ef8205851 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,17 +4,12 @@ default_language_version: repos: - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook - rev: 'v9.19.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.13.0' # Use the sha / tag you want to point at hooks: @@ -26,9 +21,8 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.8.1 + rev: v0.8.3 hooks: - # Run the linter. - id: ruff args: [ --fix ] # Run the formatter. @@ -55,8 +49,3 @@ repos: args: ['--fix=no'] - id: no-commit-to-branch args: [--branch, main] - -- repo: https://github.com/Kludex/no-optional - rev: 0.4.0 - hooks: - - id: no_optional diff --git a/ci/rattler-recipes/build.yaml b/ci/rattler-recipes/build.yaml new file mode 100644 index 000000000..759a00ad9 --- /dev/null +++ b/ci/rattler-recipes/build.yaml @@ -0,0 +1,37 @@ +context: + version: "1.2.2post1" + +package: + name: "build" + version: ${{ version }} + +source: + - url: + - https://files.pythonhosted.org/packages/7d/46/aeab111f8e06793e4f0e421fcad593d547fb8313b50990f31681ee2fb1ad/build-1.2.2.post1.tar.gz + + sha256: b36993e92ca9375a219c99e606a122ff365a760a2d4bba0caa09bd5278b608b7 + +build: + # Thanks to `noarch: python` this package works on all platforms + noarch: python + script: + - python -m pip install . -vv + +requirements: + host: + - pip + - python 3.10 + - flit-core >= 3.8 + run: + - packaging >= 19.1 + - pyproject_hooks + - tomli >= 1.1.0 + +about: + homepage: https://github.com/pypa/build + license: MIT + license_file: LICENSE + summary: A simple, correct Python build frontend + description: | + A simple, correct Python build frontend. + repository: https://github.com/pypa/build diff --git a/pyproject.toml b/pyproject.toml index eb221a8fd..a74bd2a50 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -426,7 +426,7 @@ select = [ "PLW", "PIE", ] -#select = ["E", "F", "RUF100", "W", "I001"] + 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 = { } diff --git a/src/kiara/interfaces/python_api/kiara_api.py b/src/kiara/interfaces/python_api/kiara_api.py index 6cfd4f346..842c7b9ac 100644 --- a/src/kiara/interfaces/python_api/kiara_api.py +++ b/src/kiara/interfaces/python_api/kiara_api.py @@ -741,6 +741,8 @@ def get_info(node): result = { "preview": render_result } + else: + raise Exception(f"Unknown node type: {node[1]}") return result