Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ⭐ Introducing UV as package manager #1785

Merged
merged 30 commits into from
Jan 22, 2025
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
df33ea3
feat: :sparkles: Introduce UV instead of poetry
Anselmoo Jan 21, 2025
20ff8a6
feat: :wrench: bump version to 1.2.0 and update tests
Anselmoo Jan 21, 2025
c045b0e
chore: :sparkles: update project configuration and improve build process
Anselmoo Jan 21, 2025
f2770da
feat: :sparkles: migrate CI workflow from Poetry to UV for dependency…
Anselmoo Jan 21, 2025
f766a16
fix: :white_check_mark: clean up file handling and remove unnecessary…
Anselmoo Jan 21, 2025
de57f17
fix: :white_check_mark: update pre-commit configuration to exclude uv…
Anselmoo Jan 21, 2025
f74e7c5
fix: :rotating_light: standardize YAML formatting in GitHub workflows…
Anselmoo Jan 21, 2025
90601c8
fix: :white_check_mark: remove quotes from cache-dependency-glob in C…
Anselmoo Jan 21, 2025
bd226fc
ci: :construction_worker: update trunk.yaml to latest plugin versions…
Anselmoo Jan 21, 2025
1585578
fix: :pencil2: correct command syntax in CI workflow for running tests
Anselmoo Jan 21, 2025
22ad107
fix: :memo: add uv.lock to labeler configuration for dependency tracking
Anselmoo Jan 21, 2025
98b43fe
ci: :construction_worker: enhance CI workflow for uv installation and…
Anselmoo Jan 21, 2025
8b6ec85
fix: :bug: add stacklevel argument to DeprecationWarning for clearer …
Anselmoo Jan 22, 2025
acaddb2
fix: :pencil2: update CI workflow to install any wheel file and run s…
Anselmoo Jan 22, 2025
d5e71ff
fix: :rotating_light: adjust stacklevel argument in DeprecationWarnin…
Anselmoo Jan 22, 2025
b033fcc
ci: :construction_worker: add uv build step to CI workflow for projec…
Anselmoo Jan 22, 2025
ebaaca7
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 22, 2025
3e2fef4
fix: :bug: add type ignore comment for AutoPeakDetection instantiatio…
Anselmoo Jan 22, 2025
52f181e
fix: :bug: remove type ignore comment for AutoPeakDetection instantia…
Anselmoo Jan 22, 2025
a7613e0
fix: :bug: add type ignore comment for AutoPeakDetection instantiatio…
Anselmoo Jan 22, 2025
ae6fd40
ci: :construction_worker: update CI workflow to rename project instal…
Anselmoo Jan 22, 2025
e35d491
feat: :art: update devcontainer configuration to use latest features …
Anselmoo Jan 22, 2025
60edc71
feat: :art: update devcontainer configuration to use latest versions …
Anselmoo Jan 22, 2025
e877b5a
fix: :bug: update devcontainer configuration to include Docker-in-Doc…
Anselmoo Jan 22, 2025
569c9cc
docs: :memo: update installation instructions to replace Poetry with …
Anselmoo Jan 22, 2025
be9d341
feat: :art: update GitHub Actions workflow to replace Poetry with uv …
Anselmoo Jan 22, 2025
1a5ee5c
ci: :white_check_mark: update GitHub Actions workflow to replace Poet…
Anselmoo Jan 22, 2025
e35ba00
docs: :memo: clean up reference links in documentation files
Anselmoo Jan 22, 2025
539407b
chore: :pencil: clean up formatting in CONTRIBUTING.md, codecov.yml, …
Anselmoo Jan 22, 2025
f421c63
fix: :bug: add stacklevel parameter to warning messages for better tr…
Anselmoo Jan 22, 2025
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
Prev Previous commit
Next Next commit
fix: 🚨 standardize YAML formatting in GitHub workflows and labeler co…
…nfiguration
Anselmoo committed Jan 22, 2025
commit f74e7c553aae1dff47496c29b2c3668b220d83b2
128 changes: 64 additions & 64 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,82 +1,82 @@
root:
- changed-files:
- any-glob-to-any-file: '*'
- changed-files:
- any-glob-to-any-file: "*"
codeowners:
- changed-files:
- any-glob-to-any-file: .github/CODEOWNERS
- changed-files:
- any-glob-to-any-file: .github/CODEOWNERS
codespaces:
- changed-files:
- any-glob-to-any-file: .devcontainer/**
- changed-files:
- any-glob-to-any-file: .devcontainer/**
dependencies:
- changed-files:
- any-glob-to-any-file:
- poetry.lock
- github/dependabot.yml
- changed-files:
- any-glob-to-any-file:
- poetry.lock
- github/dependabot.yml
documentation:
- changed-files:
- any-glob-to-any-file:
- docs/**
- Examples/**
- mkdocs.yml
- README.md
- INSTALLATION.md
- changed-files:
- any-glob-to-any-file:
- docs/**
- Examples/**
- mkdocs.yml
- README.md
- INSTALLATION.md
forms:
- changed-files:
- any-glob-to-any-file:
- .github/ISSUE_TEMPLATE/**
- .github/pull_request_template.md
- changed-files:
- any-glob-to-any-file:
- .github/ISSUE_TEMPLATE/**
- .github/pull_request_template.md
github-actions:
- changed-files:
- any-glob-to-any-file: .github/workflows/**
- changed-files:
- any-glob-to-any-file: .github/workflows/**
pre-commit:
- changed-files:
- any-glob-to-any-file:
- .pre-commit-config.yaml
- .pre-commit-hooks.yaml
- changed-files:
- any-glob-to-any-file:
- .pre-commit-config.yaml
- .pre-commit-hooks.yaml
python:
- changed-files:
- any-glob-to-any-file: "spectrafit/**/*.py"
- changed-files:
- any-glob-to-any-file: "spectrafit/**/*.py"
testing:
- changed-files:
- any-glob-to-any-file: "spectrafit/**/test_*.py"
- changed-files:
- any-glob-to-any-file: "spectrafit/**/test_*.py"
docker:
- changed-files:
- any-glob-to-any-file:
- Dockerfile
- .dockerignore
- .devcontainer/Dockerfile
- changed-files:
- any-glob-to-any-file:
- Dockerfile
- .dockerignore
- .devcontainer/Dockerfile
release:
- changed-files:
- any-glob-to-any-file: spectrafit/__init__.py
- changed-files:
- any-glob-to-any-file: spectrafit/__init__.py
vendor:
- changed-files:
- any-glob-to-any-file: vendor/**
- changed-files:
- any-glob-to-any-file: vendor/**
maintenance:
- changed-files:
- any-glob-to-any-file:
- .gitignore
- .github/dependabot.yml
- .github/release-drafter.yml
- .github/labeler.yml
- .github/workflows/label.yml
- .sonarcloud.properties
- .pre-commit-config.yaml
- .prettierignore
- .pylintrc
- .sonarcloud.properties
- .sourcery.yaml
- "pyproject.toml"
- changed-files:
- any-glob-to-any-file:
- .gitignore
- .github/dependabot.yml
- .github/release-drafter.yml
- .github/labeler.yml
- .github/workflows/label.yml
- .sonarcloud.properties
- .pre-commit-config.yaml
- .prettierignore
- .pylintrc
- .sonarcloud.properties
- .sourcery.yaml
- "pyproject.toml"
license:
- changed-files:
- any-glob-to-any-file:
- LICENSE
- THIRD_PARTY_LICENSES
- changed-files:
- any-glob-to-any-file:
- LICENSE
- THIRD_PARTY_LICENSES
security:
- changed-files:
- any-glob-to-any-file: SECURITY.md
- changed-files:
- any-glob-to-any-file: SECURITY.md
code-of-conduct:
- changed-files:
- any-glob-to-any-file: CODE_OF_CONDUCT.md
- changed-files:
- any-glob-to-any-file: CODE_OF_CONDUCT.md
changelog:
- changed-files:
- any-glob-to-any-file: CHANGELOG.md
- changed-files:
- any-glob-to-any-file: CHANGELOG.md
1 change: 0 additions & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -22,7 +22,6 @@ on:
repository_dispatch:
types: [create-pull-request]


jobs:
analyze:
name: Analyze
30 changes: 15 additions & 15 deletions .github/workflows/conda_check.yml
Original file line number Diff line number Diff line change
@@ -15,18 +15,18 @@ jobs:
max-parallel: 5

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
# - name: Install dependencies
# run: |
# conda env update --file environment.yml --name base
- name: Install spectrafit package
run: |
conda install -c conda-forge ${{ matrix.package }}
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
# - name: Install dependencies
# run: |
# conda env update --file environment.yml --name base
- name: Install spectrafit package
run: |
conda install -c conda-forge ${{ matrix.package }}
1 change: 0 additions & 1 deletion .github/workflows/docker-ci.yml
Original file line number Diff line number Diff line change
@@ -7,7 +7,6 @@ on:
repository_dispatch:
types: [create-pull-request]


jobs:
docker:
# Only if Dockerfile is changed
122 changes: 61 additions & 61 deletions .github/workflows/weekly-poetry-bot.yml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ name: Weekly Poetry Update

on:
schedule:
- cron: '0 0 * * 0' # Runs every Sunday at midnight
- cron: "0 0 * * 0" # Runs every Sunday at midnight
workflow_dispatch: # Allows manual triggering of the workflow

jobs:
@@ -13,76 +13,76 @@ jobs:
pull-requests: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
export PATH="$HOME/.local/bin:$PATH"
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
export PATH="$HOME/.local/bin:$PATH"

- name: Set date variable
id: date
run: echo "DATE=$(date +%Y%m%d%H%M)" >> $GITHUB_ENV
- name: Set date variable
id: date
run: echo "DATE=$(date +%Y%m%d%H%M)" >> $GITHUB_ENV

- name: Create new branch
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git checkout -b update-dependencies-${{ env.DATE }}
- name: Create new branch
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git checkout -b update-dependencies-${{ env.DATE }}

- name: Install dependencies
run: poetry install
- name: Install dependencies
run: poetry install

- name: Update dependencies
run: poetry update | tee poetry-update.log
- name: Update dependencies
run: poetry update | tee poetry-update.log

- name: Commit changes
run: |
git add poetry.lock
if git diff-index --quiet HEAD; then
echo "No changes detected, creating an empty commit."
git commit --allow-empty -m "chore(deps): :arrows_counterclockwise: no updates for ${{ env.DATE }}"
else
echo "Changes detected, creating a commit with update log."
if [ -f poetry-update.log ]; then
update_log=$(cat poetry-update.log)
- name: Commit changes
run: |
git add poetry.lock
if git diff-index --quiet HEAD; then
echo "No changes detected, creating an empty commit."
git commit --allow-empty -m "chore(deps): :arrows_counterclockwise: no updates for ${{ env.DATE }}"
else
update_log="No update log available."
echo "Changes detected, creating a commit with update log."
if [ -f poetry-update.log ]; then
update_log=$(cat poetry-update.log)
else
update_log="No update log available."
fi
git commit -m "$(echo -e "chore(deps): :arrows_counterclockwise: update dependencies ${{ env.DATE }}\n\n$update_log")"
fi
git commit -m "$(echo -e "chore(deps): :arrows_counterclockwise: update dependencies ${{ env.DATE }}\n\n$update_log")"
fi

- name: Push changes
run: |
gh auth setup-git
git push -f origin update-dependencies-${{ env.DATE }}
env:
GITHUB_TOKEN: ${{ secrets.WEEKLY_UPDATE }}
- name: Push changes
run: |
gh auth setup-git
git push -f origin update-dependencies-${{ env.DATE }}
env:
GITHUB_TOKEN: ${{ secrets.WEEKLY_UPDATE }}

- name: Create Pull Request via gh
run: |
gh pr create --title "chore(deps): :arrows_counterclockwise: update dependencies ${{ env.DATE }}" \
--body "This is an auto-generated pull request to update dependencies in \`poetry.lock\`. Updated packages: ${{ steps.update_log.outputs.log }}" \
--base main \
--head update-dependencies-${{ env.DATE }}
env:
GITHUB_TOKEN: ${{ secrets.WEEKLY_UPDATE }}
- name: Create Pull Request via gh
run: |
gh pr create --title "chore(deps): :arrows_counterclockwise: update dependencies ${{ env.DATE }}" \
--body "This is an auto-generated pull request to update dependencies in \`poetry.lock\`. Updated packages: ${{ steps.update_log.outputs.log }}" \
--base main \
--head update-dependencies-${{ env.DATE }}
env:
GITHUB_TOKEN: ${{ secrets.WEEKLY_UPDATE }}

- name: Add Label to Pull Request
run: |
pr_number=$(gh pr view --json number --jq '.number')
gh pr edit $pr_number --add-label "weekly-update"
env:
GITHUB_TOKEN: ${{ secrets.WEEKLY_UPDATE }}
- name: Add Label to Pull Request
run: |
pr_number=$(gh pr view --json number --jq '.number')
gh pr edit $pr_number --add-label "weekly-update"
env:
GITHUB_TOKEN: ${{ secrets.WEEKLY_UPDATE }}

- name: Merge Pull Request via gh
run: |
gh pr merge update-dependencies-${{ env.DATE }} --merge --auto
env:
GITHUB_TOKEN: ${{ secrets.WEEKLY_UPDATE }}
- name: Merge Pull Request via gh
run: |
gh pr merge update-dependencies-${{ env.DATE }} --merge --auto
env:
GITHUB_TOKEN: ${{ secrets.WEEKLY_UPDATE }}