Support config files#127
Conversation
ed9a8b5 to
4fec91c
Compare
|
This one we can merge for me, I tested, and it's still working. Config files are optional, in principle you can also do without, and there are sensible defaults for everything. The only thing for which I cannot add a universally good default is the root, that, if not specified in any other way, it is assumed to be the current folder. If a path is specified by the user, it is(/should be) never overwritten by the defaults. More or less all the paths are customizable by the user (except those internal to the python package). An example configuration file, |
|
@cschwan can you try to run? If it's working, you can even merge :) |
|
It's not working (yet): |
|
Where did you test? The dependency is spelled out in |
|
To be fair, it's a new dependency, to which I delegated the annoying task of taking care of conventions. |
This was a fresh install on |
|
Okay, maybe you're still using Since it was confusing, and even wrong occasionally, I removed it. Perhaps I should update the However, now the installation is up to the user, but is kept very simple:
So you can choose: |
|
Notice that installation includes the python package alone, while for |
|
I finally got some time to try it out. Please have look at my comments:
|
About "Non Python dependencies" you're perfectly right: I've just taken them out of the
True, but there are two obstacles that are currently preventing me to fill it:
The moment these two conditions are satisfied, I can instantly make a release, and at the same time fill the "Installation" section with the actual instructions.
The same thing can be accessed through Lacking the release,
This I thought to have already fixed, but maybe I did it locally and didn't push. Thanks for spotting it! |
|
@cschwan what do we need to merge this? If there is some to be improved, but we can live with, I'd merge and put it in a separate issue. |
Co-authored-by: Felix Hekhorn <felixhekhorn@users.noreply.github.com>
|
@alecandido apart from some minor problems/comments - what else do we need to close this asap? |
I guess to be able to run: #127 (comment) @scarlehoff can you try to run the same with |
Co-authored-by: Juan M. Cruz-Martinez <juacrumar@lairen.eu>
|
Sorry, maybe I've just been late to understand: if 3214c40 was the only error, so much the better. @scarlehoff I agree about CI, please open a dedicated issue (I'd not solve in this old enough PR). |
Still not able to run it, for an actual configuration related problem. I'm debugging. The moment this will, run, I'm fine with merging. |
|
Problem solved in 26a4d9b, if you @scarlehoff and @felixhekhorn agree, we can merge :) |
|
I'm getting which might well be a problem in |
Let me try a few edge cases so I can keep complaining :P |
|
@felixhekhorn I know, I've just found as well, I'm debugging it. The problem seems to be that is not able to load the output (that by the way I switched to tar, but the problem is just the same with YAML), since it seems is missing that piece of information on But then, I believe we're not dumping it correctly, most likely at the level of individual ESF. I guess I used too much PineAPPL in all latest projects, and that one have not been maintained recently... |
|
@felixhekhorn I found the bug, and I'm releasing a hotfix: it was related to the usage of @classmethod
def from_document(cls, raw):
sup = super().from_document(raw)Essentially,
So, when we were constructing a Could you please add a test in |
|
In the meanwhile, the fixed version v0.11.3 has been released, and I'm now running |
Co-authored-by: Juan M. Cruz-Martinez <juacrumar@lairen.eu>
Co-authored-by: Juan M. Cruz-Martinez <juacrumar@lairen.eu>
Co-authored-by: Juan M. Cruz-Martinez <juacrumar@lairen.eu>
|
@scarlehoff I fixed or edge case above, can you check if you are now able to find other ones? Otherwise, I would merge. |
|
Thank you for reviewing! |
This should close #125 and close #108.
At the moment, it is impossible to install
runcardsrunneras apippackage, because it's pointing to paths relative to its source for assets.This PR introduces configuration files in order to make it possible.
In order of priority it should read from:
I'm skipping environment variables for the time being, not to add further complications.
I proposed some time ago to have a unique config files for all our programs, divided in sections, see https://github.com/NNPDF/fktables/issues/4.
Currently, this is almost the only one that needs configurations, and it's the one for which are most urgently needed.
So I'll name it with a stupid but not-so-ambiguous name (not because it's clever, but simply because it's long), i.e.
runcardsrunner.toml, hopefully will be easy enough in future to change this name.I'm using
tomlbecause it's getting traction in the python community (considerpyproject.toml), and I chose the same library vendored bypip(namelytomli), that it has been currently proposed for addition into standard library, see PEP 680.