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

feature: 'included_by' list #128

Open
majidaldo opened this issue Nov 10, 2021 · 2 comments
Open

feature: 'included_by' list #128

majidaldo opened this issue Nov 10, 2021 · 2 comments

Comments

@majidaldo
Copy link
Contributor

I have a use case where I want to (programmatically) refer to envs that had included the subject environment (inverse of deps/'is_included' ).

Example: create one 'jupyter notebook' environment for all envs that include the subject env.

@prusse-martin
Copy link
Member

prusse-martin commented Nov 10, 2021

Let me see if I did get that right.

Given 3 files:

# aaa.devenv.yml
name: AAA
include:
  - another.devenv.yml
# bbb.devenv.yml
name: BBB
include:
  - another.devenv.yml
# another.devenv.yml
name: ANOTHER

Do you want an option:

$ conda devenv '**/*.devenv.yml' --if-include=another.devenv.yml --execute echo from '{name}'
from AAA
from BBB

?

@majidaldo
Copy link
Contributor Author

Let me see if I did get that right.

Given 3 files:

# aaa.devenv.yml
name: AAA
include:
  - another.devenv.yml
# bbb.devenv.yml
name: BBB
include:
  - another.devenv.yml
# another.devenv.yml
name: ANOTHER

Do you want an option:

$ conda devenv *.devenv.yml --if-include=another.devenv.yml --execute echo from {name}
from AAA
from BBB

?

Not far off. Sorry I meant to have the counterpart for is_included. I just wanted to have a feature in the 'compilation' step, just a variable, and not have conda devenv do anything new (although integrating what your deps pkg can do would be nice).

I want something that allows me to:

# another.devenv.yml
name: ANOTHER

includes:
{{for e in included_by:
- e
{{endfor}}

gives:

name: another
includes:
 - aaa.devenv.yml
 - bbb.devenv.yml

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

No branches or pull requests

2 participants