-
Notifications
You must be signed in to change notification settings - Fork 123
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
vine: a manager argument to rename runtime directory #4041
base: master
Are you sure you want to change the base?
vine: a manager argument to rename runtime directory #4041
Conversation
The problem I can foresee is that if the users forget to change the argument Do we want to add a time-formatted suffix if there has been a directory with the specified |
We don't want to change the name of this directory once the manager is defined, though. As you pointed out, it may cause trouble if renamed once a log started, or files have been staged. Note that the env var only works at the start, changing it does not change the directory once is created. |
Yeah, I agree with you, so we can do it in two ways
@btovar Which one do you prefer? Is the conflict caused by this env var a problem that needs to be fixed? |
That's what |
I'm afraid that the distinction between the names/functions of these two is very small and it will cause confusion. |
My directory tree is like this:
Where |
I would prefer to avoid the use of environment variables. In my experience they lead to user confusion and troubleshooting difficulties. Better to make options explicit as command-line arguments or arguments to functions, so that users can clearly see where things are going and why. (Limited exceptions for things like |
Agreed about env vars. Here we are using them so that we can set the debug log path before the manager is created so that we can get debug info of the creation. In python a user would not see the env var, the issue would be apparent in C. We could add a static var so that it works in C, but that's horrible in its own way. |
@JinZhou5042 I see that the mess of names it's actually my fault and that you are just copying the names from C. We should look for a better name for runtime_dir so that it is clear is just for this manager, and that it is relative to the other path. |
Oh, now I'm understanding it deeper! @btovar Do you want me to proceed this PR with a better name, or address the underlying naming policies in a separate PR? |
let's keep this pr and find better names. |
Sounds good! |
Proposed Changes
Fix #3942
vine-run-info
%Y-%m-%dT%H%M%S
This provides the user with an easy way to rename their runtime directory by passing a
run_info_dir
argument to the manager.Though the users can set
VINE_RUNTIME_INFO_DIR
to rename it, it might be confusing that they can specify the runtime path by setting an argument but need to rely on a different wayos.environ["VINE_RUNTIME_INFO_DIR"]
for renaming the runtime directory.Merge Checklist
The following items must be completed before PRs can be merged.
Check these off to verify you have completed all steps.
make test
Run local tests prior to pushing.make format
Format source code to comply with lint policies. Note that some lint errors can only be resolved manually (e.g., Python)make lint
Run lint on source code prior to pushing.