Skip to content

feat: 83 replace poetry co by uv and ruff #91

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

Open
wants to merge 34 commits into
base: main
Choose a base branch
from

Conversation

atstaeff
Copy link
Contributor

@atstaeff atstaeff commented Jun 9, 2025

No description provided.

@atstaeff atstaeff linked an issue Jun 9, 2025 that may be closed by this pull request
6 tasks
@atstaeff atstaeff marked this pull request as ready for review June 12, 2025 15:03
@atstaeff atstaeff requested review from a team as code owners June 12, 2025 15:03
@goloroden goloroden self-assigned this Jun 12, 2025
Copy link
Contributor Author

@atstaeff atstaeff left a comment

Choose a reason for hiding this comment

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

Hab eine .gitingore mit den wichtigsten Paramtern erstellt. Habe mir überlegt clean herauszunehmen aus dem makefile. Ich erwarte von jedem "Entwickler" das er das kann. :)

@goloroden
Copy link
Member

@atstaeff Das clean würde ich drinlassen, weil man dafür sonst von Hand wissen muss, wo was wann warum hinzugefügt wird. Und auch wenn man das kann, ist es unter Umständen nervige Handarbeit. Außerdem ist es angenehm, in jedem Repository, unabhängig von der verwendeten Technologie, ein make clean machen zu können.

@goloroden goloroden requested a review from Copilot June 28, 2025 08:09
Copy link

@Copilot 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 migrates the build and dependency management tooling from Poetry to uv while also standardizing code formatting (e.g. using double quotes) and updating configuration files. Key changes include updating import and quoting styles in many modules, refactoring the build and CI scripts, and adjustments to type annotations and error messages.

Reviewed Changes

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

File Description
tests/* Minor style updates (quote changes, formatting improvements)
eventsourcingdb/* Standardized string literals and updated error messages; refactored import order
Configuration files (pyproject.toml, Makefile) Updated dependency definitions and CI workflows to support uv, ruff, and bandit
Comments suppressed due to low confidence (1)

eventsourcingdb/read_events/read_events_options.py:24

  • Consider using the Bound object's to_json() method or explicitly converting 'type' to its enum value (e.g. self.lower_bound.type.value) for both lower_bound and upper_bound to ensure consistent JSON serialization.
            json["lowerBound"] = {"id": str(self.lower_bound.id), "type": self.lower_bound.type}

Comment on lines +26 to +27
uv sync
uv sync --dev
Copy link
Member

Choose a reason for hiding this comment

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

uv sync --dev genügt hier, da es nicht nur die Dev-Dependencies installiert, sondern auch die eigentlichen Dependencies.

Comment on lines +32 to +33
uv sync
uv sync --dev
Copy link
Member

Choose a reason for hiding this comment

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

Siehe oben.

Comment on lines +34 to +37
# IDE
.idea/
.vscode/
.ipynb_checkpoints/
Copy link
Member

Choose a reason for hiding this comment

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

Das gehört hier IMHO nicht rein – das sollte in der globalen .gitignore jeder Entwicklerin und jedes Entwicklers liegen (ansonsten sammelt sich hier im Lauf der Zeit nämlich eine Unmenge an Zeugs an, für IDEs, die keiner mehr benutzt).


.PHONY: analyze build clean format lock qa test
.PHONY: analyze build coverage format help lock qa security test typecheck clean
Copy link
Member

Choose a reason for hiding this comment

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

Da das jetzt hier ja ein bisschen länger wird, sollten wir das umbrechen (siehe zB hier: https://github.com/thenativeweb/eventsourcingdb-client-dotnet/blob/main/Makefile#L35-L40).

Copy link
Member

Choose a reason for hiding this comment

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

Die sollte nicht gelöscht werden.

"PTH123", # open() should be replaced by Path.open()

# Async
"ASYNC251", # Async functions should not call time.sleep
Copy link
Member

Choose a reason for hiding this comment

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

Was spricht gegen die empfohlene Lösung, asyncio.sleep zu verwenden?

"PERF401", # Use an async list comprehension to create a transformed list

# Style
"COM812", # Trailing comma missing
Copy link
Member

Choose a reason for hiding this comment

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

Wenn das empfohlen wird mit dem Trailing-Komma im Default, sollten wir das – denke ich – so machen.

"C901", # Function is too complex

# Performance
"PERF401", # Use an async list comprehension to create a transformed list
Copy link
Member

Choose a reason for hiding this comment

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

Was spricht gegen List-Comprehensions?

"PLR0912", # Too many branches
"PLR0913", # Too many instance attributes
"PLR0917", # Too many arguments
"SIM102", # Use a single if statement instead of nested if statements
Copy link
Member

Choose a reason for hiding this comment

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

Das würde ich nicht global ausschalten, sondern wenn, dann nur lokal.


# Import related
"F401", # Imported but unused
"TID252", # Prefer absolute imports over relative imports from parent modules
Copy link
Member

Choose a reason for hiding this comment

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

Was spricht dagegen, mit absoluten Importen zu arbeiten?

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.

Replace poetry & co. by uv and ruff
2 participants