Skip to content

Commit

Permalink
Merge pull request #163 from 0Hughman0/migrate-binder
Browse files Browse the repository at this point in the history
Migrate binder to 0.3.0, thanks to the migration tool!
  • Loading branch information
0Hughman0 authored Aug 26, 2024
2 parents fe5cf6b + 93c9ace commit 3e75f1e
Show file tree
Hide file tree
Showing 29 changed files with 42 additions and 44 deletions.
4 changes: 2 additions & 2 deletions binder/Home.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
}
],
"source": [
"from project import project\n",
"from cas_project import project\n",
"\n",
"print(project.project_folder)\n",
"print(project.hierarchy)"
Expand Down Expand Up @@ -408,7 +408,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.8"
"version": "3.8.18"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion binder/WorkPackages/.wps/WP1.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"description":"Optimizing sample synthesis.\n\nThe first line of any description is taken as the 'info' which is displayed in the browser columns.","started":"29/08/2023","conclusion":"A moderate success.\n\nThe first line of the conclusion is taken as the outcome.","key":"text"}
{"description": "Optimizing sample synthesis.\n\nThe first line of any description is taken as the 'info' which is displayed in the browser columns.", "started": "2023-08-29 00:00:00", "conclusion": "A moderate success.\n\nThe first line of the conclusion is taken as the outcome.", "key": "text"}
2 changes: 1 addition & 1 deletion binder/WorkPackages/.wps/WP2.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"description":"Integrating sample into device.\n\n*Markdown* is also _rendered_ in the tier preview panel.\n\nIncluding...\n\n$y = \\sin(x)$\n\nMaths!","started":"29/08/2023","conclusion":""}
{"description": "Integrating sample into device.\n\n*Markdown* is also _rendered_ in the tier preview panel.\n\nIncluding...\n\n$y = \\sin(x)$\n\nMaths!", "started": "2023-08-29 00:00:00", "conclusion": ""}
2 changes: 1 addition & 1 deletion binder/WorkPackages/WP1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
],
"source": [
"from project import project\n",
"from cas_project import project\n",
"\n",
"wp = project.env('WP1')\n",
"wp.gui.header()"
Expand Down
2 changes: 1 addition & 1 deletion binder/WorkPackages/WP1/.exps/WP1.1.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"description":"Replicating reported method.","started":"29/08/2023","conclusion":"Reported method is nonsense.\n\nThere must be a missing step to the synthesis.\n"}
{"description": "Replicating reported method.", "started": "2023-08-29 00:00:00", "conclusion": "Reported method is nonsense.\n\nThere must be a missing step to the synthesis.\n"}
2 changes: 1 addition & 1 deletion binder/WorkPackages/WP1/.exps/WP1.2.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"description": "Trying to use more beans.\n\nWP1.1's approach wasn't great. WP1.1d indicated could be due to a lack of beans, so going to try improving.", "started": "29/08/2023"}
{"description": "Trying to use more beans.\n\nWP1.1's approach wasn't great. WP1.1d indicated could be due to a lack of beans, so going to try improving.", "started": "2023-08-29 00:00:00"}
2 changes: 1 addition & 1 deletion binder/WorkPackages/WP1/WP1.1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
],
"source": [
"from project import project\n",
"from cas_project import project\n",
"\n",
"exp = project.env('WP1.1')\n",
"exp.gui.header()"
Expand Down
2 changes: 1 addition & 1 deletion binder/WorkPackages/WP1/WP1.1/.smpls/WP1.1a.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"description":"First attempt.","started":"29/08/2023","conclusion":"Not bad! Looked a bit gray though.","cook_time":100}
{"description": "First attempt.", "started": "2023-08-29 00:00:00", "conclusion": "Not bad! Looked a bit gray though.", "cook_time": 100}
2 changes: 1 addition & 1 deletion binder/WorkPackages/WP1/WP1.1/.smpls/WP1.1b.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"description":"Trying longer cook time.\n\nFirst attempt was good. Looked a bit gray. Will trying doing for longer.","started":"29/08/2023","cook_time":12}
{"description": "Trying longer cook time.\n\nFirst attempt was good. Looked a bit gray. Will trying doing for longer.", "started": "2023-08-29 00:00:00", "cook_time": 12}
2 changes: 1 addition & 1 deletion binder/WorkPackages/WP1/WP1.1/.smpls/WP1.1c.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"description": "Increasing cook time.\n\n1.1b was a bit too far under.", "cook_time": "32", "started": "29/08/2023"}
{"description": "Increasing cook time.\n\n1.1b was a bit too far under.", "cook_time": "32", "started": "2023-08-29 00:00:00"}
2 changes: 1 addition & 1 deletion binder/WorkPackages/WP1/WP1.1/.smpls/WP1.1d.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"description": "Just a bit more.\n\n1.1c looking good but not quite.", "cook_time": "42", "started": "29/08/2023"}
{"description": "Just a bit more.\n\n1.1c looking good but not quite.", "cook_time": "42", "started": "2023-08-29 00:00:00"}
2 changes: 1 addition & 1 deletion binder/WorkPackages/WP1/WP1.1/WP1.1a.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"import matplotlib.pyplot as plt\n",
"from PIL import Image\n",
"\n",
"from project import project\n",
"from cas_project import project\n",
"\n",
"smpl = project.env('WP1.1a')\n",
"smpl.gui.header()"
Expand Down
2 changes: 1 addition & 1 deletion binder/WorkPackages/WP1/WP1.1/WP1.1b.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"import matplotlib.pyplot as plt\n",
"from PIL import Image\n",
"\n",
"from project import project\n",
"from cas_project import project\n",
"\n",
"smpl = project.env('WP1.1b')\n",
"smpl.gui.header()"
Expand Down
2 changes: 1 addition & 1 deletion binder/WorkPackages/WP1/WP1.1/WP1.1c.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
],
"source": [
"from project import project\n",
"from cas_project import project\n",
"\n",
"smpl = project.env('WP1.1c')\n",
"smpl.gui.header()"
Expand Down
2 changes: 1 addition & 1 deletion binder/WorkPackages/WP1/WP1.1/WP1.1d.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"import matplotlib.pyplot as plt\n",
"from PIL import Image\n",
"\n",
"from project import project\n",
"from cas_project import project\n",
"\n",
"smpl = project.env('WP1.1d')\n",
"smpl.gui.header()"
Expand Down
4 changes: 2 additions & 2 deletions binder/WorkPackages/WP1/WP1.2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
],
"source": [
"from project import project\n",
"from cas_project import project\n",
"\n",
"exp = project.env('WP1.2')\n",
"exp.gui.header()"
Expand Down Expand Up @@ -46,4 +46,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}
2 changes: 1 addition & 1 deletion binder/WorkPackages/WP1/WP1.2/.smpls/WP1.2a.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"description": "First attempt.\n\nGot tips from a colleague. ", "started": "29/08/2023"}
{"description": "First attempt.\n\nGot tips from a colleague. ", "started": "2023-08-29 00:00:00"}
4 changes: 2 additions & 2 deletions binder/WorkPackages/WP1/WP1.2/WP1.2a.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
],
"source": [
"from project import project\n",
"from cas_project import project\n",
"\n",
"smpl = project.env('WP1.2a')\n",
"smpl.gui.header()"
Expand Down Expand Up @@ -46,4 +46,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}
4 changes: 2 additions & 2 deletions binder/WorkPackages/WP2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
],
"source": [
"from project import project\n",
"from cas_project import project\n",
"\n",
"wp = project.env('WP2')\n",
"wp.gui.header()"
Expand Down Expand Up @@ -46,4 +46,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}
6 changes: 6 additions & 0 deletions binder/cas_project.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from cassini import Project, DEFAULT_TIERS

project = Project(DEFAULT_TIERS, __file__)

if __name__ == '__main__':
project.launch()
3 changes: 2 additions & 1 deletion binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ dependencies:
- pip
- matplotlib
- pip:
- cassini
- cassini==0.3.0a4


4 changes: 2 additions & 2 deletions binder/postBuild
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ cd binder
mkdir ~/.jupyter
mv jupyter_jupyterlab_server_config.py ~/.jupyter/jupyter_lab_config.py

python -c "from project import project; project.setup_files()"
python -c "from project import project; project.setup_files()"
python -c "from cas_project import project; project.setup_files()"
python -c "from cas_project import project; project.setup_files()"
9 changes: 0 additions & 9 deletions binder/project.py

This file was deleted.

2 changes: 1 addition & 1 deletion binder/start
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

cd binder
export CASSINI_PROJECT='project.py:project'
export CASSINI_PROJECT='cas_project.py:project'
export PYTHONPATH=$PWD

exec "$@"
2 changes: 1 addition & 1 deletion binder/templates/Experiment/Experiment.tmplt-Copy1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
],
"source": [
"from project import project\n",
"from cas_project import project\n",
"\n",
"{{ tier.short_type }} = project.env('{{ tier.name }}')\n",
"{{ tier.short_type }}.gui.header()"
Expand Down
4 changes: 2 additions & 2 deletions binder/templates/Home/Home.tmplt.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
],
"source": [
"from project import project\n",
"from cas_project import project\n",
"\n",
"{{ tier.short_type }} = project.env('{{ tier.name }}')\n",
"{{ tier.short_type }}.gui.header()"
Expand Down Expand Up @@ -46,4 +46,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}
2 changes: 1 addition & 1 deletion binder/templates/Sample/Cooking.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"import matplotlib.pyplot as plt\n",
"from PIL import Image\n",
"\n",
"from project import project\n",
"from cas_project import project\n",
"\n",
"{{ tier.short_type }} = project.env('{{ tier.name }}')\n",
"{{ tier.short_type }}.gui.header()"
Expand Down
4 changes: 2 additions & 2 deletions binder/templates/Sample/Sample.tmplt.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
],
"source": [
"from project import project\n",
"from cas_project import project\n",
"\n",
"{{ tier.short_type }} = project.env('{{ tier.name }}')\n",
"{{ tier.short_type }}.gui.header()"
Expand Down Expand Up @@ -46,4 +46,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}
4 changes: 2 additions & 2 deletions binder/templates/WorkPackage/WorkPackage.tmplt.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
],
"source": [
"from project import project\n",
"from cas_project import project\n",
"\n",
"{{ tier.short_type }} = project.env('{{ tier.name }}')\n",
"{{ tier.short_type }}.gui.header()"
Expand Down Expand Up @@ -46,4 +46,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}

0 comments on commit 3e75f1e

Please sign in to comment.