A collection of ipywidgets and scripts adapted to the Ghub tool creation process.
Still a work-in-progress project that isn't a standalone Python package, therefore to make use of the code found here
this repository must be added as a git submodule(https://git-scm.com/book/en/v2/Git-Tools-Submodules) to an existing git repository.
Suppose your project awesome-proj is located in ~/the/path/to/my/awesome-proj
:
- switch to your project's main directory: eg (bash)
$ cd ~/the/path/to/my/awesome-proj
- add the submodule:
$ git submodule add git@github.com:GhubGateway/ghub-utils.git
To import ghub-utils.ghub_utils
inside your project, its absolute path must first be added to your Python Path. To do that you must first locate your environment's Python site-packages
folder:
-
inside any Python instance, run the following code:
import site
site.getusersitepackages()
The path will look similar to:/home/user/anaconda3/envs/some_env/lib/python3.7/site-packages
Next copy the path file ghub-utils/ghub_utils.pth
into the site-packages folder.
Finally locate the absolute path to your project's ghub-utils
directory path/to/your/project/ghub-utils
and copy into site-packages/ghub_utils.pth
ghub-utils/ghub_utils
is now ready to be imported and used as any package.
The ghub-utils submodule can be updated at any time like any other git repository:
$ cd path/to/your/project/ghub-utils/
$ git pull
NOTE: when cloning repositories from github with an existing submodule, remember to add the flag --recursive
, eg. git clone git@github.com:ruskirin/initmip-cluster.git --recursive
. For full solutions see: https://stackoverflow.com/q/11358082