1 of 17

Deploying your CC3D simulation as a nanoHub tool

2 of 17

Things you’ll need

  1. A nanoHub account https://nanohub.org/register/
  2. A github account https://github.com/join?ref_cta=Sign+up
  3. Have gitbash https://git-scm.com/downloads/ (or some other git program)
  4. And configure it https://docs.github.com/en/github/getting-started-with-github/set-up-git
  5. Your cc3d project (cc3d file and /Simulation/ contents)
  6. To be able to run `python` from the command line
  7. You can use the python that comes with cc3d by using the whole path to the python executable in the command window

3 of 17

Steps Overview

1. Fork template repository

https://github.com/JulianoGianlupi/cc3d-nanoHub-tool-maker

2. Clone forked repository to your local machine

3. Test tool_maker.py

4. Choose a short handle for your tool

(cannot be changed!)

5. Use tool_maker.py with the destination dir = forked repo dir

6. Commit and push all local repo changes

7. Make sure that the files in bin/ and middleware/ are executable

8. Go to NanoHub and get your tool started

https://nanohub.org/tools/create

9. Fill the form: Tool name == short handle; github repository; rapture

10. Make the landing page

11. “My code is committed, working, and ready to be installed “

12. Issue a ticket requesting an upgrade to Debian 10 environment.

“My tool, short-handle, needs to be upgraded to Debian 10 environment”

13. Wait a few days and test your tool

15. Give the go-ahead to make the tool live

Your tool gets a DOI!!

4 of 17

Fork template repository

  • Give it a nice name (no spaces)
  • A short description (“this repo host nanoHub tool x”)
  • Set it to public

1. Fork template repository

https://github.com/JulianoGianlupi/cc3d-nanoHub-tool-maker

5 of 17

Clone forked repository to your local machine

2. Clone forked repository to your local machine

6 of 17

Test tool_maker.py & choose a short handle

  1. Open a terminal and navigate to the folder containing the tool helper
  2. Let’s first see what the script tool_maker.py needs by telling python to run it

It asks for (in order)

  • A short tool name: 3-15 alphanumeric characters, no spaces, no special characters. This will be part of the URL of your tool, it doesn’t need to be fancy, but this name is unchangeable! Choose wisely. You’ll need to paste it to nanoHub later, so remember it
  • The full path to the repository you made for your tool (the one we just cloned) (folder1/folder2/…/parent-of-your-repo/repo/)
  • The full path to where your cc3d file and Simulation folder are:

/c/folderA/…/project-folder/

Project.cc3d

Simulation/

3. Test tool_maker.py

4. Choose a short handle for your tool

(cannot be changed!)

7 of 17

Use tool_maker.py with the destination

dir = forked-repo-dir

tool_maker.py asks for (in order)

  • A short tool name: 3-15 alphanumeric (no special) characters, no spaces. This will be part of the URL of your tool, it doesn’t need to be fancy, but this name is unchangeable! Choose wisely. You’ll need to paste it to nanoHub later, so remember it
  • The full path to the cloned forked repository you made (/c/folder1/folder2/…/parent-of-your-repo/repo/)
  • The full path to where your cc3d file and Simulation folder are:

/c/folderA/…/project-folder/

Project.cc3d

Simulation/

Let’s issue the creation command, e.g.:

python.exe tool_maker.py cc3dFppDemo D:\nanoHub\tools-by-TJ\nh-cc3d-fpp-demo D:\nanoHub\tools-by-TJ\FocalPointPlasticityDemo

4. Choose a short handle for your tool

(cannot be changed!)

5. Use tool_maker.py with the destination dir = forked repo dir

8 of 17

Commit and push all local repo changes

  • From git bash navigate to your repo folder

6. Commit and push all local repo changes

9 of 17

Commit and push all local repo changes

  • From git bash navigate to your repo folder
  • Let’s see the repo status by `git status`

6. Commit and push all local repo changes

10 of 17

Commit and push all local repo changes

  • From git bash navigate to your repo folder
  • Let’s see the repo status by `git status`
  • Add everything to be tracked and uploaded by `git add .`

6. Commit and push all local repo changes

11 of 17

Commit and push all local repo changes

  • From git bash navigate to your repo folder
  • Let’s see the repo status by `git status`
  • Add everything to be tracked and uploaded by `git add .`
  • `git status` again to see what was added

6. Commit and push all local repo changes

12 of 17

Getting the project online: everything needs a reason

  • Now everything is almost ready to be uploaded, in git-like services you have to say why you are uploading something with a commit message
    • `git commit -m “getting the tool started”`
  • Now we can upload them by `git push`. Let’s see it online

6. Commit and push all local repo changes

13 of 17

Your project is online!

14 of 17

Make sure that the files in bin/ and middleware/ are executable

  • The tool maker has created a few scripts that need to be executable for the tool to work on nanoHub, the 2 .sh scripts in /bin/ and the invoke file in middleware. We can check if they have execution privileges by opening them in github
  • If a file hosted on github is executable it will say so on the upper left corner of the file. So, we know that they are not
  • Go back to the git bash and let’s fix that
  • From the bash (in your tool repo folder) you’ll have to

` git update-index --chmod=+x middleware/invoke`

` git update-index --chmod=+x bin/*.sh`

  • Now let’s add the change in the scripts to the repo, give it a commit message, and push
  • `git add middleware/invoke`
  • `git add bin/*.sh `

3. `git commit -m “run permission” `

4. `git push`

7. Make sure that the files in bin/ and middleware/ are executable

15 of 17

Go to NanoHub and get your tool started�https://nanohub.org/tools/create

  • Go to https://nanohub.org/tools/create
  • Fill the form. The important parts of the form are the “Tool Name” and where your tool is hosted.
  • Tool Name is the short tool name from before! They must be the same!

8. Go to NanoHub and get your tool started

https://nanohub.org/tools/create

9. Fill the form: Tool name == short handle; github repository; rapture

16 of 17

Telling nanoHub how to find our project and how to display it

  • We hosted our tools on github, so select that and paste the same URL we used to clone the repository
  • And finally, the publishing option (i.e., how NH will display our tool) must be rapture
  • All set to click “Register Tool”
  • If the website hangs now do not refresh the page or exit, just wait. But this is a sign of something going wrong on nanoHub’s side of things. If this happens with you issue a ticket ASAP https://nanohub.org/support/tickets
  • Will be able to check on your tool and what’s its publishing status by visiting

https://nanohub.org/tools/<short tool name>/status

8. Go to NanoHub and get your tool started

https://nanohub.org/tools/create

17 of 17

Describing your tool and final steps

  • We’ve already uploaded the project code to github, so you can click “My code is committed, working, and ready to be installed”
  • Now you need to “Make the page that describes your tool”
    • In “powered by” put CompuCell3D
  • You are asked to add tags to your tool. You can add anything that fits and would make your tool more searchable but do include: CompuCell3D, CC3D
  • It can take a couple of days for your tool to be 100% published
    • keep checking a couple times per day for updates
    • Issue a ticket if they take longer
  • You’ll have an opportunity to run the tool in NH before making it public
  • Recently NanoHub made changes and now you have to issue a ticket requesting an upgrade to Debian 10 environment
    • My tool, short-handle, needs to be upgraded to Debian 10 environment

10. Make the landing page

12. Issue a ticket requesting an upgrade to Debian 10 environment.

“My tool, short-handle, needs to be upgraded to Debian 10 environment”

11. “My code is committed, working, and ready to be installed “