Skip to content

Conversation

@PeerHerholz
Copy link

This PR proposes a change to jupytext based notebook - .py file conversions that make version control, etc. easier. Jupytext was added to requirements.txt. Furthermore a few typos and wording related things were fixed.

This PR proposes a change to jupytext based notebook - .py file conversions that make version control, etc. easier. Jupytext was added to `requirements.txt`. Furthermore a few typos and wording related things were fixed.
@djarecka
Copy link
Contributor

@PeerHerholz - don't have experience with jupytex. How this will work with binder? Could we test automatically all cells?

@PeerHerholz
Copy link
Author

Hi,

you can check the version build from my branch here: Binder. Manual tests on my end seemed to work fine. The .py files are automatically converted to notebooks upon opening. The automatic tests were something I wanted to ask you about... Without having looked into it a lot, I think we could set something up using a Dockerfile where .py are converted to notebooks and then tested, given that you want to keep the tests as they currently are.

@djarecka
Copy link
Contributor

djarecka commented Aug 4, 2020

oh, I see, Binder works great! Thanks @PeerHerholz !

But I'm still thinking about the general idea... I understand that I'd always have to edit the python files and than check how does it look like in the jupyter, is that right? I'm wondering if this wouldn't be annoying (or just time consuming) when working on the notebooks. You have experience with it?

I totally agree that version control is an issue with the notebooks, but because these are tutorials, and not the analyses anyone will publish, I assume I don't have to check the differences very carefully. If it works, it's fine.

@satra - any thoughts on this?

@satra
Copy link
Contributor

satra commented Aug 5, 2020

I understand that I'd always have to edit the python files and than check how does it look like in the jupyter, is that right?

this is not the case with jupytext - you edit in jupyter-lab - but it will always save as a py file (given the change in metadata). you can also set it up to save both formats, but i don't think that's necessary if jupytext is a dependancy.

so i'm +1 for this change.

@djarecka
Copy link
Contributor

djarecka commented Aug 5, 2020

oh, ok - so the conversion is automatic both way, that's great.

regarding the testing - i've been using pytest with nbval for notebooks, but we don't have to use it if we want to keep just the python files. I believe any automatic testing will be fine for the tutorial.

@effigies
Copy link
Contributor

effigies commented Jul 6, 2022

Looks like this got included in #26.

@effigies effigies closed this Jul 6, 2022
@djarecka
Copy link
Contributor

djarecka commented Jul 6, 2022

we finally improved the notebook format by moving to jupyter book in #26, so closing this now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants