pepkit / peppy

Project metadata manager for PEPs in Python
https://pep.databio.org/peppy
BSD 2-Clause "Simplified" License
37 stars 13 forks source link

Imports: documentation unclear #434

Closed johnyaku closed 1 year ago

johnyaku commented 1 year ago

I am trying to wrap my head around how imports work. The behaviour does not seem to match my intuitions, or my reading of the documentation.

One or two concrete examples might help clarify this.

Potential examples include:

Some of these imports may not actually be possible at the moment. But without examples or more detailed explanations it is difficult to understand how this works.

Specifically, I am trying to separate "project config" from "path config" so that arbitrary file naming conventions and directory structures are specified in the latter by way of sample_modifers and derive specifications but project-level properties are stored in the former.

How can I achieve this?

(My config works if it is all in a single file)

nsheff commented 1 year ago

Thank you for raising this issue. I will try to clarify the docs.

First, can you tell me if this example satisfies your use case?

https://github.com/pepkit/example_peps/tree/master/example_imports2

I believe this is demonstrating your third use case.

johnyaku commented 1 year ago

This example repo is a gold mine. Thanks for alerting me to it!

Yes, that particular example illustrates the third use case, which is the main one that I'm interested in. This also gives me a better idea of how the config files are merged.

The docs could probably still do with a few extra sentences to clarify this, but even just linking to these examples would be a huge help.

Thanks again!