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: Support passing extra args to poetry export #584

Conversation

morganchorlton3
Copy link
Contributor

@morganchorlton3 morganchorlton3 commented Jun 11, 2024

Description

I have added support to pass additional poetry arguments into the source paths

{
      path                 = "../pyproject.toml"
      poetry_install   = true
      additional_poetry_args= ["--with", "dev", ...]
}

closes #500

Motivation and Context

I have a project with a mono-repo approach with multiple lambda functions in the project, I have some separate list of dependencies defined in my pyproject.toml. I want to install additional dependencies for certain lambda functions for example

Lambda function 1 deps:
...

Lambda function 2 deps:
....

Common function deps:
....

I could then install the common deps for all lambda functions and then install specific deps for each lambda functions.

Breaking Changes

None that i am aware off

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s) (I can do this if it would help, what would be the best to update/ should i add a new example?)

I have tested these changes locally with a local project deploying a lambda with and without groups defined

I am happy to do additional testing if required.

  • I have executed pre-commit run -a on my pull request (see screenshot)

1

@morganchorlton3 morganchorlton3 changed the title Added Poetry Groups Support feat: Added Poetry Groups Support Jun 11, 2024
@antonbabenko antonbabenko requested a review from pdecat June 11, 2024 13:11
@pdecat
Copy link
Contributor

pdecat commented Jun 11, 2024

How about simplifying things a bit, and just accept a poetry_args string that's directly added to the poetry command?

@morganchorlton3
Copy link
Contributor Author

Hi @pdecat yeah I can make that change

@morganchorlton3
Copy link
Contributor Author

morganchorlton3 commented Jun 11, 2024

How about simplifying things a bit, and just accept a poetry_args string that's directly added to the poetry command?

Change applied 👍

README.md Outdated Show resolved Hide resolved
package.py Outdated Show resolved Hide resolved
package.py Outdated Show resolved Hide resolved
Copy link
Contributor

@pdecat pdecat left a comment

Choose a reason for hiding this comment

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

LGTM overall! One last comment about the naming.

Copy link
Contributor

@pdecat pdecat left a comment

Choose a reason for hiding this comment

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

🚀

@pdecat
Copy link
Contributor

pdecat commented Jun 12, 2024

PR should be renamed, e.g. feat: Support passing extra args to poetry export .

@antonbabenko antonbabenko changed the title feat: Added Poetry Groups Support feat: Support passing extra args to poetry export Jun 12, 2024
@antonbabenko antonbabenko merged commit 3aa288f into terraform-aws-modules:master Jun 12, 2024
30 checks passed
antonbabenko pushed a commit that referenced this pull request Jun 12, 2024
## [7.6.0](v7.5.0...v7.6.0) (2024-06-12)

### Features

* Support passing extra args to poetry export ([#584](#584)) ([3aa288f](3aa288f))
@antonbabenko
Copy link
Member

This PR is included in version 7.6.0 🎉

@morganchorlton3 morganchorlton3 deleted the feat/add_support_for_poetry_groups branch June 12, 2024 08:04
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Poetry support for groups dependencies
3 participants