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

Address shared snippets/code in pathogen builds #2

Open
tsibley opened this issue Jun 30, 2018 · 2 comments
Open

Address shared snippets/code in pathogen builds #2

tsibley opened this issue Jun 30, 2018 · 2 comments

Comments

@tsibley
Copy link
Member

tsibley commented Jun 30, 2018

Not sure what the best approach is here, there are several, but we should eventually address things like: https://github.com/nextstrain/zika/blob/master/Snakefile#L4-L23

@tsibley
Copy link
Member Author

tsibley commented Jul 2, 2018

After consideration, my current thought is to create a nextstrain-build Python package which provides a module structure like:

nextstrain/
  build/
    __init__.py
    config.py
    ...

which is expected to be installed. This would let Snakefiles import useful functions like:

from nextstrain.build.config import field_map

Thoughts?

@tsibley
Copy link
Member Author

tsibley commented Jul 2, 2018

augur version checking could be wrapped up into a routine in this nextstrain-build package, for example:

from nextstrain.build.util import assert_augur_version

assert_augur_version("3.0.0")

tsibley added a commit that referenced this issue Jul 2, 2018
This is more standard (e.g. follows the 12 factor app pattern) and, as
Trevor noted¹, is encouraged by lots of services like Travis CI and
Heroku and EC2.  It also means credentials are not visible in the output
of `ps`, which is important for running on shared hosts.

Unresolved is how to programmatically describe the requirements on the
"envdir" module.  This is an unresolved question for build requirements
in general.²  It may be that we sidestep that by accessing envdir
through a nextstrain.build module that's always required to be
available, as described in a proposal for refactoring shared functions.³

¹ #4
² #3
³ #2
@tsibley tsibley removed their assignment May 10, 2019
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

1 participant