Skip to content

Commit 604839b

Browse files
Anselmoorenovate[bot]pre-commit-ci[bot]
authored
feat: Update project metadata and add animation support to ClassicPlot (#84)
* feat(plots): add animation support to ClassicPlot and improve type hints * chore: update project metadata and dependencies in pyproject.toml * chore: bump version to 0.3.0 * chore(deps): update dependency version constraints for matplotlib and plotly * chore: 🚨 add configuration files for linting and ignore patterns * fix: handle None case for x and y axis data in ClassicPlot and add main execution block for testing * chore: update pre-commit configuration to include Sourcery and improve formatting * chore: Change type of comparision * fix: update condition to check if ax_fig.lines is a list in ClassicPlot * fix: refine animation saving logic in ClassicPlot and update docstring for clarity * chore: replace Poetry with uv for dependency management in workflows * chore: migrate from Poetry to Hatch for dependency management and update project structure * fix: update colormap access in ClassicPlot and remove unused imports * ci: add Sourcery configuration file for project refactoring and analysis * fix: 🚑 update matplotlib version and change known third-party dependency to hatchling.build * chore(deps): update dependency mkdocs-table-reader-plugin to v3 * chore: update project metadata and dependencies in pyproject.toml * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 3b7a754 commit 604839b

File tree

14 files changed

+3199
-1220
lines changed

14 files changed

+3199
-1220
lines changed

.github/workflows/python-package.yml

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,15 @@ jobs:
2121
steps:
2222
- uses: actions/checkout@v4
2323
- name: Set up Python ${{ matrix.python-version }}
24-
uses: actions/setup-python@v5
24+
uses: astral-sh/setup-uv@v5
2525
with:
26+
enable-cache: true
27+
cache-dependency-glob: uv.lock
2628
python-version: ${{ matrix.python-version }}
27-
- name: Install poetry
28-
run: |
29-
python -m pip install --upgrade pip
30-
python -m pip install poetry
31-
poetry config virtualenvs.create true
32-
poetry config virtualenvs.in-project true
33-
poetry config virtualenvs.path .venv
34-
- name: Install dependencies
35-
run: |
36-
poetry install --all-extras --with=dev,check
37-
- name: Test with pytest
38-
run: |
39-
poetry run pytest
29+
- name: Install the project
30+
run: uv sync --all-extras --dev
31+
- name: Test SpectraFit
32+
run: uv run --group dev --all-extras pytest umf/
4033
- name: Codecov
4134
uses: codecov/[email protected]
4235
with:
@@ -50,27 +43,21 @@ jobs:
5043
- uses: actions/checkout@v4
5144
with:
5245
fetch-depth: 0
53-
- name: Set up Python 3.10
54-
uses: actions/setup-python@v5
46+
- name: Install uv and dependencies with doc-dependencies
47+
uses: astral-sh/setup-uv@v5
5548
with:
49+
enable-cache: true
50+
cache-dependency-glob: uv.lock
5651
python-version: "3.10"
57-
- name: Install poetry
58-
run: |
59-
python -m pip install --upgrade pip
60-
python -m pip install poetry
61-
poetry config virtualenvs.create true
62-
poetry config virtualenvs.in-project true
63-
poetry config virtualenvs.path .venv
64-
- name: Install dependencies
65-
run: |
66-
poetry install --all-extras --with=docs
52+
- name: Install the project
53+
run: uv sync --all-extras --group docs
6754
- name: Set git config
6855
run: |
6956
git config --local user.email "[email protected]"
7057
git config --local user.name "GitHub Action"
7158
- name: Build documentation
7259
if: ${{ !contains(github.ref, 'refs/heads/main')}}
73-
run: poetry run mkdocs build --clean
60+
run: uv run --group docs --all-extras mkdocs build --clean
7461
- name: Deploy documentation develops
7562
if: contains(github.ref, 'refs/heads/main')
76-
run: poetry run mike deploy --push --update-aliases develop
63+
run: uv run --group docs --all-extras mike deploy --push --update-aliases develop

.github/workflows/python-publish.yml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,14 @@ jobs:
3939
- uses: actions/checkout@v4
4040
with:
4141
fetch-depth: 0
42-
- uses: actions/setup-python@v5
42+
- name: Install uv and dependencies with doc-dependencies
43+
uses: astral-sh/setup-uv@v5
4344
with:
45+
enable-cache: true
46+
cache-dependency-glob: uv.lock
4447
python-version: "3.10"
45-
- name: Install Poetry and dependencies with doc-dependencies
46-
run: |
47-
python -m pip install --upgrade pip
48-
pip install poetry
49-
poetry config virtualenvs.create true
50-
poetry config virtualenvs.in-project true
51-
poetry config virtualenvs.path .venv
52-
poetry install --no-interaction --with docs --all-extras
5348
- name: Install library
54-
run: poetry install --no-interaction --with docs --all-extras
49+
run: uv sync --all-extras --group docs
5550
- name: Set git config
5651
run: |
5752
git config --local user.email "[email protected]"
@@ -72,9 +67,9 @@ jobs:
7267
previous_version=$(echo $previous_tag | cut -d '.' -f 1,2)
7368
current_version=$(echo $current_tag | cut -d '.' -f 1,2)
7469
if [[ "$previous_version" == "$current_version" ]]; then
75-
poetry run mike delete ${{ steps.previous_release.outputs.previous_tag }}
70+
uv run --group docs --all-extras run mike delete ${{ steps.previous_release.outputs.previous_tag }}
7671
fi
7772
- name: Deploy documentation develops
7873
run: |
79-
poetry run mike deploy --push --update-aliases ${{ github.event.release.tag_name }} latest --message "Release ${{ github.event.release.tag_name }}"
80-
poetry run mike set-default --push latest
74+
uv run --group docs --all-extras run mike deploy --push --update-aliases ${{ github.event.release.tag_name }} latest --message "Release ${{ github.event.release.tag_name }}"
75+
uv run --group docs --all-extras run mike set-default --push latest

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ repos:
1818
hooks:
1919
- id: prettier
2020
name: Prettier (Markdown)
21-
files: '\.(md|js|css)$'
21+
files: \.(md|js|css)$
2222
args: [--prose-wrap=always]
2323

2424
- repo: https://github.com/markdownlint/markdownlint

.sourcery.yaml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# 🪄 This is your project's Sourcery configuration file.
2+
3+
# You can use it to get Sourcery working in the way you want, such as
4+
# ignoring specific refactorings, skipping directories in your project,
5+
# or writing custom rules.
6+
7+
# 📚 For a complete reference to this file, see the documentation at
8+
# https://docs.sourcery.ai/Configuration/Project-Settings/
9+
10+
# This file was auto-generated by Sourcery on 2025-01-24 at 21:08.
11+
12+
version: "1" # The schema version of this config file
13+
14+
ignore: # A list of paths or files which Sourcery will ignore.
15+
- .git
16+
- env
17+
- .env
18+
- .tox
19+
- node_modules
20+
- vendor
21+
- venv
22+
- .venv
23+
- ~/.pyenv
24+
- ~/.rye
25+
- ~/.vscode
26+
- .vscode
27+
- ~/.cache
28+
- ~/.config
29+
- ~/.local
30+
31+
rule_settings:
32+
enable:
33+
- default
34+
disable: [] # A list of rule IDs Sourcery will never suggest.
35+
rule_types:
36+
- refactoring
37+
- suggestion
38+
- comment
39+
python_version: "3.10" # A string specifying the lowest Python version your project supports. Sourcery will not suggest refactorings requiring a higher Python version.
40+
41+
# rules: # A list of custom rules Sourcery will include in its analysis.
42+
# - id: no-print-statements
43+
# description: Do not use print statements in the test directory.
44+
# pattern: print(...)
45+
# language: python
46+
# replacement:
47+
# condition:
48+
# explanation:
49+
# paths:
50+
# include:
51+
# - test
52+
# exclude:
53+
# - conftest.py
54+
# tests: []
55+
# tags: []
56+
57+
# rule_tags: {} # Additional rule tags.
58+
59+
# metrics:
60+
# quality_threshold: 25.0
61+
62+
# github:
63+
# labels: []
64+
# ignore_labels:
65+
# - sourcery-ignore
66+
# request_review: author
67+
# sourcery_branch: sourcery/{base_branch}
68+
69+
# clone_detection:
70+
# min_lines: 3
71+
# min_duplicates: 2
72+
# identical_clones_only: false
73+
74+
# proxy:
75+
# url:
76+
# ssl_certs_file:
77+
# no_ssl_verify: false
78+
79+
# coding_assistant:
80+
# project_description: ''
81+
# enabled: true

.trunk/.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
*out
2+
*logs
3+
*actions
4+
*notifications
5+
*tools
6+
plugins
7+
user_trunk.yaml
8+
user.yaml
9+
tmp

.trunk/configs/.isort.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[settings]
2+
profile=black

.trunk/configs/.markdownlint.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Prettier friendly markdownlint config (all formatting rules disabled)
2+
extends: markdownlint/style/prettier

.trunk/configs/.yamllint.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
rules:
2+
quoted-strings:
3+
required: only-when-needed
4+
extra-allowed: ["{|}"]
5+
key-duplicates: {}
6+
octal-values:
7+
forbid-implicit-octal: true

.trunk/trunk.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# This file controls the behavior of Trunk: https://docs.trunk.io/cli
2+
# To learn more about the format of this file, see https://docs.trunk.io/reference/trunk-yaml
3+
version: 0.1
4+
cli:
5+
version: 1.22.9
6+
# Trunk provides extensibility via plugins. (https://docs.trunk.io/plugins)
7+
plugins:
8+
sources:
9+
- id: trunk
10+
ref: v1.6.6
11+
uri: https://github.com/trunk-io/plugins
12+
# Many linters and tools depend on runtimes - configure them here. (https://docs.trunk.io/runtimes)
13+
runtimes:
14+
enabled:
15+
16+
17+
# This is the section where you manage your linters. (https://docs.trunk.io/check/configuration)
18+
lint:
19+
enabled:
20+
21+
22+
23+
24+
- git-diff-check
25+
26+
27+
28+
29+
30+
31+
32+
33+
34+
35+
36+
actions:
37+
disabled:
38+
- trunk-announce
39+
- trunk-check-pre-push
40+
- trunk-fmt-pre-commit
41+
enabled:
42+
- trunk-upgrade-available

0 commit comments

Comments
 (0)