Skip to content

Initial implementation of "planemo depbash" #310

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

Closed
wants to merge 68 commits into from

Conversation

peterjc
Copy link
Contributor

@peterjc peterjc commented Sep 28, 2015

As described on issue #303, this implements a new planemo depbash command for converting tool_dependencies.xml install recipes into bash scripts.

There is a lot that could be done better, or added, including:

  • refactor to use a visitor pattern instead of my .to_bash() methods
  • expand the command line API with options for paths and filenames
  • complete the action coverage (especially the R/Python/Perl environments)
  • avoid collisions in the download cache which currently assumes unique filenames

Is this suitable to merge as is, or does it need further work?

Does anyone have a better idea for the command name? I have no strong attachment to "depbash" (dependencies to bash script).

I have no objections to squashing down the git commit history here.

P.S. I have considered determining dependencies is out of scope for this work.

TODO:
- Testing
- Escaping/quoting filenames
- Implement missing actions
- Exceptions rather than errors as bash commands?
- Expose as a planemo command
Running "bash install.sh" would not alter environment variables
in the caller's scope.

Using "source install.sh" does alter the caller's environment
variables, but "exit" or any error in strict mode will end the
user's terminal session.

Idea here is "bash install.sh" will download and install the
tool, and also create "env.sh" for use in "source env.sh" within
the Galaxy tool dependency framework.
Was going to call this 'planemo shed2bash' or similar, but easier
to run the installation from Python than writing a bash script?
Also wrap env actions as conditional.
This is going to be very useful while working on implementing
the rest of 'planemo depbash'.
TODO: Also use an MD5 checksum of the URL here?
@peterjc
Copy link
Contributor Author

peterjc commented Oct 1, 2015

After some frustration leading to this hack peterjc@7073505 I finally got the basic tests to pass on TravisCI.

Should I do any branch history cleanup, or leave this as it is for any merge?

@peterjc
Copy link
Contributor Author

peterjc commented Oct 7, 2015

Minor update to fix the tests since the contents of tests/repos/ changed on the master.

@jmchilton Would you prefer a cleaned-up history? Or just do a --squash merge?

@jmchilton
Copy link
Member

My preference would be this be squashed into a single commit with a nice commit message if you are offering 😄, I don't really enforce this and don't always do it myself and so I have no problem with it being merged as is.

peterjc added a commit that referenced this pull request Oct 7, 2015
This is a squashed commit of pull request #310 for issue #303,
for converting tool_dependencies.xml install recipes into bash
scripts.

There is a lot that could be done better, or added, including:

- refactor to use a visitor pattern instead of my .to_bash() methods
- expand the command line API with options for paths and filenames
- setting defaults like download cache via ~/.planemo.yml
- complete the action coverage (especially the R/Python/Perl environments)
- avoid collisions in the download cache which currently assumes unique filenames

However, this is enough to help with automating dependency
installation in a continuous integration setup like TravisCI.
@peterjc
Copy link
Contributor Author

peterjc commented Oct 7, 2015

Thanks @jmchilton - done as a squashed merge: f798c7e

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.

5 participants