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

Add a command-line option for selecting environments #352

Merged
merged 10 commits into from
Apr 13, 2016

Conversation

pv
Copy link
Collaborator

@pv pv commented Dec 9, 2015

Add a command-line option --environment (or -E) for selecting what environment type and Python version to run, overriding what is specified in the configuration file.

  • This is useful e.g. when the configuration file is checked in a repository, and run by multiple users, some of which have conda and some not.
  • Supercedes the --python option, and makes it possible to specify what Python executable to run using ExistingEnvironment (which was not possible previously).
  • Add tool_name to the hash-name of the environments, so that it's possible to have conda and virtualenv at the same time without conflicts.
  • Move calls to environment.get_environments to the top-level command classes. (Previously, environments were instantiated in Benchmarks for benchmark discovery.)

Some fine tuning may still be needed (although this is in principle complete)

@@ -311,7 +359,8 @@ def hashname(self):
"""
Get a hash to uniquely identify this environment.
"""
return hashlib.md5(self.name.encode('utf-8')).hexdigest()
full_name = "{0}-{1}".format(self.tool_name, self.name).encode('utf-8')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to just have tool_name included as part of the name property -- since tool_name is now required to uniquely identify the environment...

@mdboom
Copy link
Collaborator

mdboom commented Dec 10, 2015

Looks good, other than my one comment above.

@mdboom
Copy link
Collaborator

mdboom commented Mar 3, 2016

@pv: Sorry I've been incommunicado here for so long. Want to fix the minor issue, rebase and I'll merge?

@pv
Copy link
Collaborator Author

pv commented Mar 3, 2016

No problem, updated. The environment tool name is now included also in the result file names.

@pv
Copy link
Collaborator Author

pv commented Mar 3, 2016

@mdboom: can you enable rolling builds http://www.appveyor.com/docs/build-configuration#rolling-builds cf appveyor/ci#38 in appveyor, so that it behaves more sensibly vs. updated PRs? The option probably should be somewhere in the appveyor UI, can't be specified in config file...

@mdboom mdboom merged commit 1acf961 into airspeed-velocity:master Apr 13, 2016
@mdboom
Copy link
Collaborator

mdboom commented Apr 13, 2016

Merged.

I also enabled rolling builds on appveyor.

@pv pv deleted the env-select branch August 19, 2018 20:07
@HaoZeke HaoZeke mentioned this pull request Apr 23, 2023
32 tasks
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.

2 participants