Open arm61 opened 6 years ago
Ideally the code needs to go in a directory code
, at the same level as notebooks_plain
etc. That way we shouldn't need to copy it over into the notebooks_rendered
directory and it can be referenced in the same way (../code/plot_style.py
).
Or at least that's how I originally imagined it, same with pictures going in (../images/
)
Can't you just put them in them in a separate/sub-directory?
Though why do you want to hide the notebook from your students?
From: Andrew McCluskey notifications@github.com Sent: 01 November 2018 09:53 To: arc-bath/template_jupyter Cc: James Grant; Mention Subject: [arc-bath/template_jupyter] including a python script incorrectly counts number of episodes (#2)
I have a python script for formatting plots in my notebooks plain directory however the build system seems to want to turn this into an episode (click "Next" on this page to see what I mean https://arm61.github.io/sim_and_scat/05_episode.html).
Any thoughts on a better way to do this such that the build system doesn't do this?
@james-grant1https://github.com/james-grant1 @JDBetteridgehttps://github.com/JDBetteridge
- You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/arc-bath/template_jupyter/issues/2, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AdRlkqYqz8OWU0Y7e4isoLulaGH_xXifks5uqsSUgaJpZM4YGGJk.
having it in a subdirectory means that I would need an __init__.py
to find it no? then I would still have the problem as this would then be compiled...
the file I am hiding is simply a plot styling thing that would be too much of a unnecessary load for the scope of the course
for now can you try
import sys
sys.path.insert(0,'../code')
import plot_style
and see if that works?
(and move plot_style.py
to a directory code
at the same level as notebooks_plain
)
It should work. Just a bit clumsy looking. I might just have default styled plots instead.
-- Cheers arm
Sent from my iPhone
On 1 Nov 2018, at 12:45, JDBetteridge notifications@github.com<mailto:notifications@github.com> wrote:
for now can you try
import sys sys.path.insert(0,'../code') import plot_style
and see if that works?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/arc-bath/template_jupyter/issues/2#issuecomment-435016069, or mute the threadhttps://github.com/notifications/unsubscribe-auth/APCySTLWo1F2aLF-27jNdt9qvzZ1iZzYks5uqt7SgaJpZM4YGGJk.
I agree, this could be added to the local resources, like the bash/LaTeX magic, but I haven't yet thought about plotting
No worries. Just an idea for how to improve a pinch 🙂
-- Cheers arm
Sent from my iPhone
On 1 Nov 2018, at 12:54, JDBetteridge notifications@github.com<mailto:notifications@github.com> wrote:
I agree, this could be added to the local resources, like the bash/LaTeX magic, but I haven't yet thought about plotting
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/arc-bath/template_jupyter/issues/2#issuecomment-435017989, or mute the threadhttps://github.com/notifications/unsubscribe-auth/APCySTeRxTwkudIKbemdr81YhrZAMpsrks5uquDhgaJpZM4YGGJk.
Actually, this is still going to be an issue, since we're generating a __pycache__
directory when the python code is run that it adds to the index.
Since we currently do
contents.remove('.ipynb_checkpoints')
at the moment, it won't take much to remove all directories. The issue then is we have to duplicate everything in the notebooks_plain
directory for the rendered notebooks to work. This will require some more thought.
Having a separate directory in the root would seem to make sense then the pycache can be explicitly ignored, a new episode advising users how to include code snippets would also then be useful.
Other things that I’ve come across since starting to move the vc lesson over:
Option to give setup its own page? Key points summary/Links/Glossary page Software requirements
Looks like we might kick off some issues …
From: JDBetteridge notifications@github.com Sent: 01 November 2018 12:05 To: arc-bath/template_jupyter template_jupyter@noreply.github.com Cc: James Grant R.J.Grant@bath.ac.uk; Mention mention@noreply.github.com Subject: Re: [arc-bath/template_jupyter] including a python script incorrectly counts number of episodes (#2)
Actually, this is still going to be an issue, since we're generating a pycache directory when the python code is run that it adds to the index.
Since we currently do
contents.remove('.ipynb_checkpoints')
at the moment, it won't take much to remove all directories. The issue then is we have to duplicate everything in the notebooks_plain directory for the rendered notebooks to work. This will require some more thought.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/arc-bath/template_jupyter/issues/2#issuecomment-435020376, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AdRlkkKDFXQkCc5s-BJH0KksWtvpWppjks5uquNmgaJpZM4YGGJk.
I have a python script for formatting plots in my notebooks plain directory however the build system seems to want to turn this into an episode (click "Next" on this page to see what I mean https://arm61.github.io/sim_and_scat/05_episode.html).
Any thoughts on a better way to do this such that the build system doesn't do this?
@james-grant1 @JDBetteridge