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

Rename root parameter for all Project methods to path #757

Closed
vyasr opened this issue May 6, 2022 · 6 comments · Fixed by #758
Closed

Rename root parameter for all Project methods to path #757

vyasr opened this issue May 6, 2022 · 6 comments · Fixed by #758

Comments

@vyasr
Copy link
Contributor

vyasr commented May 6, 2022

For consistency with the new terminology that we're standardizing on for both Job and Project, we should rename the root parameters of Project methods to path. This change affects get_project and init_project, as well as the Project constructor. Since we're moving forward with the breaking changes in #752, w should also change the signature of init_project to not require path to be a keyword-only argument. There may be other related changes as well that we need to consider, but I don't think there is any way to construct e.g. a Job at a specific path (we always construct by id or statepoint so I can't think of anything else that I might be missing right now.

Original comment
Do we want to keep the requirement that root is a keyword-only argument? All our previous discussions about compatibility layers are somewhat moot now, so I would be willing to revisit that.

It could even be named path for consistency with the new terminology. The more I think about it, it'd be really nice to call it path. :)

Originally posted by @bdice in #752 (comment)

@cbkerr
Copy link
Member

cbkerr commented May 7, 2022

Consider also replacing job.workspace() with something like job.path(). See #743

@vyasr
Copy link
Contributor Author

vyasr commented May 7, 2022

@cbkerr already done in #685 and #752 😉

@bdice
Copy link
Member

bdice commented May 7, 2022

I'm looking into this issue.

@bdice
Copy link
Member

bdice commented May 10, 2022

I opened #758 to address this.

@kidrahahjo
Copy link
Collaborator

Can we close this issue now?

@bdice
Copy link
Member

bdice commented May 28, 2022

I think all the public APIs are fixed, based on the docs: https://docs.signac.io/projects/core/en/next/search.html?q=root&check_keywords=yes&area=default

There are a few lingering uses of the name "root" or "root directory" but they're in the context of import/export or migrations but they're typically used for walking a filesystem, not a project path, so I don't think this naming guidance applies.

There are also references to "root" in the context of synced collections, like the root of a collection, but those certainly don't need to be changed.

Marking as closed unless others wish to make further refactors.

@bdice bdice closed this as completed May 28, 2022
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 a pull request may close this issue.

4 participants