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

Update project doc with new possible options #2220

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

romain-intel
Copy link
Contributor

No description provided.

saikonen
saikonen previously approved these changes Jan 22, 2025
Copy link
Collaborator

@saikonen saikonen left a comment

Choose a reason for hiding this comment

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

looks good, though are any of the options actually 'new' ?

still needs some fix for stubs.

The branch to use. If not specified, the branch is set to
`user.<username>` unless `production` is set to `True`. This can
also be set on the command line using `--branch` as a top-level option.
It is an error to specify `branch` in the decorator and on the command line.
Copy link
Collaborator

Choose a reason for hiding this comment

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

at the moment we don't throw an error - i wasn't even aware that we had started to support branch and production in the decorator

Copy link
Collaborator

@saikonen saikonen Jan 22, 2025

Choose a reason for hiding this comment

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

had to doublecheck that this is actually a new feature for the decorator and not something old. This was part of #2200 last week: https://github.com/Netflix/metaflow/pull/2200/files#diff-64f160cf84ca8cd829d2bf85bf48c7276d10b030524fe2631c79bc4d35f2c4f3R93

current master does raise an error if trying to specify branch both through top-level, and in the decorator, so the docstring is correct. Same applies for specifying production

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes -- new feature due to configs. This allows you to be able to configure everything in the project decorator from a config whereas before you could just set the name.

@@ -26,6 +26,24 @@ class ProjectDecorator(FlowDecorator):
projects that use the same production scheduler. The name may
contain only lowercase alphanumeric characters and underscores.

branch : Optional[str]
The branch to use. If not specified, the branch is set to
`user.<username>` unless `production` is set to `True`. This can
Copy link
Collaborator

@savingoyal savingoyal Jan 22, 2025

Choose a reason for hiding this comment

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

technically the branch is still <username>, the project branch name is user.<username>

Copy link
Collaborator

Choose a reason for hiding this comment

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

True, although not sure if we have explicitly documented project_branch anywhere in the user docs. For most intents and purposes, the value that's visible/exposed to the users is the project_branch.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right. From a user's pov, the stuff in between your project name and the flow name is user. I'm happy to change the wording but thought that it would be nice to document somewhere.

talsperre
talsperre previously approved these changes Jan 24, 2025
@romain-intel romain-intel dismissed stale reviews from talsperre and saikonen via cd2e07e January 31, 2025 18:48
@romain-intel romain-intel force-pushed the fix/update_project_doc branch from 21597c8 to cd2e07e Compare January 31, 2025 18:48
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.

4 participants