Skip to content

Replace poetry, black, and flake8 by uv and ruff#6

Merged
BerndDoser merged 8 commits intoHITS-AIN:mainfrom
BerndDoser:ruff
May 26, 2025
Merged

Replace poetry, black, and flake8 by uv and ruff#6
BerndDoser merged 8 commits intoHITS-AIN:mainfrom
BerndDoser:ruff

Conversation

@BerndDoser
Copy link
Copy Markdown
Member

uv and ruff are extremely fast project management, Python linting, and code formatting tools written in Rust.
The pyproject.toml was updated to work with both poetry and uv. In the GitHub action workflow, poetry, black, and flake8 were replaced by uv and ruff.

@BerndDoser BerndDoser requested a review from Copilot May 26, 2025 11:15
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR replaces Poetry, Black, and Flake8 with uv and ruff by updating project dependencies, CI steps, and removing old config files.

  • Move from Poetry to uv for dependency management and test execution.
  • Replace Black and Flake8 linting/formatting with ruff in CI.
  • Remove obsolete .flake8 config and adjust project metadata.

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/test_gaia_converter.py Removed extraneous blank lines in test definitions
tests/test_fits_converter.py Removed extraneous blank lines in test definitions
src/pest/spherinator_data_preprocessing.py Reformatted assert statements and removed trailing spaces
pyproject.toml Added uv, moved/lifted pytest, added ruff dependency
.github/workflows/python-package.yml Switched from Poetry steps to uv and ruff in CI
.flake8 Removed old Flake8 configuration
devel/test_chunks.ipynb Quote style change in notebook
devel/show_parquet.ipynb Removed unused import cell from notebook
Comments suppressed due to low confidence (2)

devel/show_parquet.ipynb:150

  • [nitpick] The removal of the import cell in this notebook is unrelated to the main changes and adds noise; consider reverting or excluding notebook diffs in this scope.
"df = dataset.to_table().to_pandas()\n"

devel/test_chunks.ipynb:709

  • [nitpick] This notebook change only adjusts quoting style and does not affect functionality; consider excluding generated notebooks from this PR to reduce noise.
"pq.read_table(\"part-0.parquet\").to_pandas()"

Comment thread pyproject.toml Outdated
Comment thread pyproject.toml Outdated
@BerndDoser BerndDoser self-assigned this May 26, 2025
@BerndDoser BerndDoser requested a review from Copilot May 26, 2025 11:49
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the project’s tooling by replacing poetry, black, and flake8 with the faster uv and ruff tools while adjusting configuration files and workflows accordingly.

  • Removed extraneous blank lines and reformatted print statements and other expressions for conciseness.
  • Updated the pyproject.toml and workflow configurations to support uv and ruff integration.

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/test_gaia_converter.py Removed redundant blank lines in test functions.
tests/test_fits_converter.py Consolidated argument passing in test functions.
src/pest/spherinator_data_preprocessing.py Reformatted print statements and assertions for consistency.
src/pest/preprocessing.py Reduced multi-line expression to a single line.
src/pest/gaia_converter.py Minor formatting cleanup in lambda usage.
src/pest/fits_converter.py Reformatted metadata replacements to single lines.
pyproject.toml Updated dependencies and added ruff configuration sections.
devel/test_chunks.ipynb Adjusted source string quotes.
devel/show_parquet.ipynb Removed unused import lines.
.github/workflows/python-package.yml Modified steps to use uv and updated checkout action version.
.flake8 Removed as linting is now handled by ruff.

@BerndDoser BerndDoser merged commit 87d8a91 into HITS-AIN:main May 26, 2025
4 checks passed
@BerndDoser BerndDoser deleted the ruff branch May 26, 2025 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants