Skip to content

Migrate to poetry for better dependency management #194

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

Closed
wants to merge 4 commits into from

Conversation

AntoniaSzecsi
Copy link

Issue #, if available:

Description of changes:

Target (OCI, Managed Runtime, both):

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Summary of the changes:

  • Migrated to Poetry: Replaced pip-based dependency management with Poetry for better dependency resolution and lock files

  • Fixed Docker builds and integration tests: Resolved Poetry installation issues and ensuring consistent Python version usage in the docker files.

  • Migrated from pylint to ruff: Updated linting configuration for faster and easily customisable code analysis.

  • Created dev.py: Added a development script according to industry templates with clean command structure.

  • Cleaned setup.py: Reformatted and simplified build configuration for better maintainability.

pyproject.toml Outdated
Comment on lines 56 to 60
"PLR0913", # Too many arguments
"E722", # Bare except
"PLW0603", # Global statement
"UP031", # % formatting vs f-strings
"E402", # Module import not at top
Copy link
Member

Choose a reason for hiding this comment

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

Could you help me understand the reasoning behind ignoring these rules? I'm curious if there's a specific use case or limitation that made this necessary

@@ -0,0 +1,88 @@
#!/usr/bin/env python3
Copy link
Member

Choose a reason for hiding this comment

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

Here's what's happening: Makefile (a build tool) calls this script (a build tool) which calls poetry (another build tool). This layering feels a bit complex. Do you think there's an opportunity to simplify the flow?

Or could you help me understand why we have this?

Copy link
Author

Choose a reason for hiding this comment

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

Yes, true, the workflow is a little complex, but the purpose was to make the MakeFile as minimal and simple looking as possible. But surely, we can directly call the poetry from the MakeFile and get rid completely of the dev.py
I used dev.py as there are some github templates with it

@PartiallyUntyped
Copy link
Contributor

Summary from yesterday; remove dev.py. For mypy, check out pyre for typechecking.

AntoniaSzecsi and others added 2 commits August 1, 2025 10:48
* Add docstrings checking with ruff and implement the fixes

* Fix build and test invocations of RIE

* Format file according to linter requirements

* Remove ignore rules and move docstring logic to dev file

---------

Co-authored-by: AntoniaSzecsi <lszecsi@amazon.com>
@PartiallyUntyped PartiallyUntyped deleted the lszecsi/refactoring-poetry branch August 6, 2025 11:44
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.

3 participants