-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
location where testscripts will be written #199
Comments
Hmm, so what if the configuration file isn't relative to the site path? |
Well for now, I take it user has to run |
You are envisioning the use case of a site / cluster that does maintain recipes in one location. For a user that is using buildtest on his or her system, it's more of an annoyance to require files to be in the root. It's much more likely they would want to run a one off test, right in their current directory, or even on travis! What if, instead of enforcing that test output goes to this root, we do akin to what snakemake does, and create a local You know, snakemake already supports all of these executors (from SLURM to LSF to cloud executors) plus environment modules, conda...
Serious question - have you considered modifying snakemake to create tests? What is snakemake lacking? |
Is this still an issue? Note that we now use site. You previously mentioned that you don't want to write test results here (but instead in a local .buildtest folder relative to where the test is run) - should we rename the title of this issue to discuss this? I think it's actually a great idea - when I use snakemake I run from a local directory, and a .snakemake folder has the results that I need - right there and easy to find. This seems like a better design than what we are currently doing, and I'd like to change it. It makes sense that if I run buildtest in a folder with test files, I want the output to be right there for me to interact with - I shouldn't have to go poking around some monstrous folder hidden in my home. |
Sorry for the confusion, i have updated the issue. The intent of this ticket was to decide where to write the tests. The test paths need to be unique but I am open to new path. The simple approach i had in mind was take the subdirectory relative to ~/.buildtest/site up to the config file and insert that in Just to be clear this has nothing to do with where tests-configs (YAML) are stored, we already have that solved. |
I am hugely in support of following snakemake and writing the test files (and logs, run, etc.) in a local directory, .buildtest to the run, unless the user specifies something different. |
Assigning myself - we've discussed this on slack, here is an overview of what will be updated ClientI would want the test directory to be generated wherever the user runs it, as default. For example, if I'm in my repository with a script hello-world.yml and I run as follows: buildtest build -c hello-world.yml I'd want the structure to be created:
and actually that works much more nicely than the global config, because we can name the test subdirectories according to the yaml file name they are derived from. If that's done in some global folder there is huge chance of name conflict. I think it's much more likely users will do a command like I just showed above, relative to a file in a local directory. The whole need to maintain this central thing at $HOME/.buildtest makes sense for config, and maybe for some kind of global site, but not for the single user running one off tests. And then let's say I want to run the test and have the output go somewhere else (other than .buildtest) I would do: buildtest build -c hello-world.yml --testdir ~/mytests/anotherplace OrganizationRight now the tests were generated under .buildtest/testdir based on the name (Key) in the yaml:
but you can imagine that this breaks easily -what if there is a duplicate name? How do we link back to the file? So for my proposed changes, the structure would be updated to be:
So that I can very intuitively see hello-slurm.yml, and then know that my tests are run in .buildtest, and if I want to find the tests for hello-slurm.yml I look in... the hello-slurm folder! And then the keys of the file are the next level. I have assigned myself, will make some time this week to implement. |
I think we are done here too! Closing issue. |
@vsoch The location of the test configuration directory for a particular build can take the relative path of configuration file to build the test path. The relative path is relative to
~/.buildtest/site
sincebuildtest get
will clone repos in that sub-directory.The current setting for testdirectory is defined in
settings.yml
as followsSo if user specifies the following
buildtest build -c ~/.buildtest/site/github.com/HPC-buildtest/tutorials/compilers/hello.f.yml
then the test directory will be the followingtest directory:
$HOME/.buildtest/testdir/github.com/HPC-buildtest/tutorials/compilers/
test path:
$HOME/.buildtest/testdir/github.com/HPC-buildtest/tutorials/compilers/hello.f.yml.SUBTEST-NAME.sh
We can optionally have output and error file for each sub-test.
Output:
$HOME/.buildtest/testdir/github.com/HPC-buildtest/tutorials/compilers/hello.f.yml.SUBTEST-NAME.out
Error:
$HOME/.buildtest/testdir/github.com/HPC-buildtest/tutorials/compilers/hello.f.yml.SUBTEST-NAME.err
The text was updated successfully, but these errors were encountered: