-
Notifications
You must be signed in to change notification settings - Fork 3
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
Package python scripts #75
base: main
Are you sure you want to change the base?
Conversation
I noticed some problems with paths in |
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 a lot @SarahAlidoost , this already looks very nice! I have left a couple of comments on the pyproject.toml
, I think we should aim to have the python package installed with a CLI to access the functionalities of the tool. This PR already brings it quite close to this goal, since it already installs dependencies automatically.
However, to make it fully working directly from the installed CLI, we need to fix a couple of things: there seems to be a circular import between the two Python files, and, most importantly, we need to figure out a global absolute path where to store the config files. I think these aspects might involve some small refactoring of the code, so I would address these in a new PR.
src/runJupyterDaskOnSLURM.py
Outdated
import installJDOnSLURM #Functions to install or uninstall JDOnSLURM | ||
|
||
config_path = './config/platforms/platforms.ini' | ||
# get the parent pat of the current file | ||
parent_path = Path(__file__).resolve().parent |
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.
By adding one level to the dir above, I guess this would need to be updated?
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.
I replaced it with config_path = Path.home() / ".config/platforms/platforms.ini"
and in the user-guide.md, I asked users to create it.
user-guide.md
Outdated
|
||
```shell | ||
python runJupyterDaskOnSLURM.py --add_platform | ||
python src/runJupyterDaskOnSLURM.py --add_platform |
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.
Also here, one more level should be added.
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.
the command python src/runJupyterDaskOnSLURM.py
is now replaced by jupyter-dask-on-slurm
.
Co-authored-by: Francesco Nattino <[email protected]>
Co-authored-by: Francesco Nattino <[email protected]>
Co-authored-by: Francesco Nattino <[email protected]>
@fnattino Thanks a lot, very helpful suggestions. I addressed your comments and also fixed the circular dependencies. Here is a summary of the changes:
To test the installation in this branch, do I found the documentation of |
closes #71