Skip to content

GhubGateway/ghub-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ghub-utils

A collection of ipywidgets and scripts adapted to the Ghub tool creation process.

Adding to other Projects

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:

  1. switch to your project's main directory: eg (bash)$ cd ~/the/path/to/my/awesome-proj
  2. 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.

Updating ghub-utils

The ghub-utils submodule can be updated at any time like any other git repository:

  1. $ cd path/to/your/project/ghub-utils/
  2. $ git pull

Cloning Repositories with Submodules

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

About

A collection of ipywidgets and scripts adapted to the Ghub tool creation process

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages