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

Allow setting venv destination in rule #56

Merged
merged 3 commits into from
Jun 3, 2024

Conversation

psalaberria002
Copy link
Contributor

Previously we could pass the directory as an argument when executing the target.

Now it is also possible to set the default destination directory in code.

@psalaberria002 psalaberria002 requested a review from a team as a code owner June 3, 2024 10:31
Copy link
Collaborator

@mark-thm mark-thm left a comment

Choose a reason for hiding this comment

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

Thanks — just one small change and happy to accept this.

@@ -33,6 +34,7 @@ def _venv_impl(ctx):

_venv = rule(
attrs = {
"destination_folder": attr.string(mandatory = True),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let’s assign the default value here

@@ -42,9 +44,10 @@ _venv = rule(
executable = True,
)

def create_venv(name, requirements_txt = None, target_compatible_with = None):
def create_venv(name, requirements_txt = None, target_compatible_with = None, destination_folder = "venv"):
Copy link
Collaborator

Choose a reason for hiding this comment

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

…and set default here for the arg to None

@mark-thm mark-thm enabled auto-merge (squash) June 3, 2024 16:33
@mark-thm mark-thm merged commit 16429d6 into theoremlp:main Jun 3, 2024
7 checks passed
@mark-thm
Copy link
Collaborator

mark-thm commented Jun 3, 2024

Thanks for the contribution and cleanup. This change will be included in a release later this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants