-
Notifications
You must be signed in to change notification settings - Fork 29
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
sim-cli: source simulation file from data directory #132
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK, adding a data dir is super useful (esp in the docker context).
I do think we should think about the power of defaults / making the "getting started" journey as simple as possible with this change, specifically:
- Assume
sim.json
to be the default simulation file unless otherwise specified. - Assume working directory to be the default data dir unless otherwise specified.
This makes for some quite nice options IMO:
sim-cli
-> looks for simulation file in{pwd}/sim.json
sim-cli my-sim.json
-> looks for simulation file at{pwd}/my-sim.json
sim-cli --data-dir=/Usr/simulations
-> looks for simulation file at/Usr/simulations/sim.json
sim-cli my-sim.json --data-dir=/Usr/simulations
-> looks for simulation file at/Usr/simulations/my-sim.json
I also really like having the selection option, which we can use to present other json
files if we can't find the default value we were expecting.
Changes proposed introduce simln data dir, but I did not configure this to work with docker set up. |
Sure @okjodom |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK, very nice improvement.
Just wondering about turning that arg into a flag, I can be convinced in either direction.
@Extheoisah could you take a look to make sure this is going to work for docker-land and then we'll merge? Also could use an update to the readme to explain these new snazzy features, I'm also happy to do that in a followup :) |
@sr-gi, in regards to your perspective against how this PR proposes to change how we source I'm excited about the new UX that always expects Comments one, two and three are easy resolved if we can agree to change/preserve UX for passing |
I'm open to being convinced if you and @carlaKC find this useful. It is just not the way I'd approach it |
a3a35ee
to
628ec8e
Compare
Simple is always good. And what we had was simple + limited. I def polished the UX change too much (should have scoped it to just data dir addition) but don't want to take it back because I think users will like it :p |
My 2c would be:
|
checked. trimmed out the extension completion |
I've got it working already. One question though is if we want to have a data-dir for the docker setup? By default, the simulation CSV files are saved in the results folder in docker in the root. thoughts? cc @carlaKC |
Can we treat the data dir treated as a volume and have the csv files saved |
Yup, just made a pr that does that. I've also fixed the docker volume setup. It wasn't updated when we removed the node type from the sim.json config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code comments non-blocking. Would just like to clarify readme further then gg.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧡 thanks for updating!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one non-blocking nit.
LGTM
Adds a simln data-dir cli param, but maintains the default value to cwd Sources the simulation file from this data dir Prompts the user to select a simulatin file if the default/configured file is not found
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 9975d8a
Introduces
SIM_LN_DATA_DIR
from whichsim-cli
sources simulation files and writes simulation outputs.