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

Better discovery of manifest location #123

Merged
merged 1 commit into from
Sep 12, 2023
Merged

Conversation

dogversioning
Copy link
Contributor

This PR addresses #108 by recursively searching for manifest files, rather than assuming the user is running this search in a specific place.

Checklist

  • Consider if documentation (like in docs/) needs to be updated
  • Consider if tests should be added
  • Run pylint if you're making changes beyond adding studies
  • Update template repo if there are changes to study configuration

return manifest_studies


def get_studies_by_manifest_path(path: PosixPath) -> dict:
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems like something I would go to os.walk for, but PosixPath is doing a lot of the work for you too. 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's def more than one way to do this - I'm making a conscious decision over in this to use pathlib.PosixPath when there's rough equivalence just so there's one pattern for someone to pick up.

@dogversioning dogversioning merged commit cfdbefb into main Sep 12, 2023
3 checks passed
@dogversioning dogversioning deleted the mg/manifest_path_finding branch September 12, 2023 16:14
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.

2 participants