spaCy icon indicating copy to clipboard operation
spaCy copied to clipboard

Example of env section in project.yml

Open polkaYK opened this issue 1 year ago • 2 comments

Which page or section is this issue related to?

https://spacy.io/usage/projects#project-yml

Maybe it's just me, but I couldn't understand how to use env section in project.yml. Documentation says:

A dictionary of variables, mapped to the names of environment variables that will be read in when running the project. For example, ${env.name} will use the value of the environment variable defined as name.

I couldn't figure out the exact syntax

env:
  name: name

and struggled to find an example; I found it only on Stack Overflow.

Maybe consider adding the env section into explosion/projects/v3/pipelines/tagger_parser_ud/project.yml that is provided as an example in the docs. If you think it's worth it, I can submit a PR.

Best, Yevhen

polkaYK avatar Jul 14 '22 22:07 polkaYK

I think we just don't really use this feature much, even ourselves. I had never used it before anyway.

The env section could look like this:

env:
  ENV_PATH: "PATH"

And a command:

  - name: "echo-path"
    script:
      - "echo ${env.ENV_PATH}"

I don't think it makes sense to add it to the tagger_parser_ud project, but a better example in the main docs would be useful if you'd like to submit a PR?

adrianeboyd avatar Jul 15 '22 07:07 adrianeboyd

I see env section is a bit redundant but I've recently thought about using it, so maybe someone else also might. I will make a PR soon.

polkaYK avatar Jul 15 '22 10:07 polkaYK

This is resolved by #11677.

adrianeboyd avatar May 05 '23 06:05 adrianeboyd

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

github-actions[bot] avatar Jun 05 '23 00:06 github-actions[bot]