-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs: Add first draft for tutorial #4070
Conversation
Thanks @mbercx . Since this change also changes existing code and adds the workflow, I wonder if we should add this in a separate commit straight onto |
I have moved the changes to the I have also removed the |
@mbercx Sorry, this fell off my radar. Is this ready for my review? |
No worries! The text is ready for review, yes, but note that not all of the code snippets will work as e.g. the I have also used the |
Ok, that's not a problem, because I did not plan on testing the tutorial before we are further down the line anyways.
Good point, we had not established a convention for that yet. I suggest that we just use a double colon. Unless there are objections I will put that into the wiki page and ensure consistency prior to merging of the docs-revamp branch. |
The only question I have there is weather the double colon will robustly determine the correct language for the highlighting. Even if that is guaranteed, having an explicit |
It is assumed to be Python. If I understand this correctly then one would use On the other hand, |
Since we sometimes also have |
As someone who had little experience with reStructuredText before we started working on the docs revamp, I second this notion! Also, I just remembered that if we are using the |
Ok, then it's settled |
While we are at it, perhaps in the wiki, we want to add some extra clarification over writing code blocks,
Also in the guidelines
This seems like a weird symbol to use for itemized, since it is also used for emphasis/bold. Would |
Yes, this actually came up in another PR as well. I would just go ahead and copy your examples if you don't mind.
I just made a decision, I believe based on prevalence. I don't really think that using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really great! I think that having a tutorial like this will make the on-boarding of new users much, much easier. Thank you!
I've added plenty of suggestions to improve flow and wording and also to fix a few typos here and there. Additionally, I'd like to ask you to streamline some of the prompts:
- Make sure that the code-blocks are marked up as shown here.
- Make sure that the user always knows whether code is supposed to be executed in a script or within a Python interpreter. I found some ambiguity with respect to that.
Thanks a lot for the review, @csadorf! Although I'm not sure what connotation of handy you are referring to. ^^
As all code snippets are supposed to be run in the |
@mbercx Is this ready for another round of review? |
Yes! Sorry, I hadn't discovered the re-request review button yet. ^^ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! This is almost ready to merge.
Please also resolve the merge conflicts. |
First draft of the AiiDA tutorial. Next to adding the tutorial itself, I've also: * Changed the ArithmeticAddCalculation to set defaults for the resources and use a basic bash execution on the input files. * Added the MultiplyAddWorkChain for demonstration purposes. * Set the background-color of bash code snippets to aliceblue. * Added the sphinx-copybutton extension. This still needs to be improved, as currently all code snippets are provided with a copy button, and e.g. those with a Python prompt also copy this prompt.
Remove the MultiplyAddWorkChain class and the changes to the ArithmeticAddCalculation class from this branch, so they can be merged separately into the develop branch. Also remove the sphinx-copybutton extension for now, as this addition is being dealt with in another issue (aiidateam#4062).
Replace the literalinclude for the MultiplyWorkChain with a code-block as the module has been removed from this branch. Also, clean up the trailing whitespace.
Co-authored-by: Carl Simon Adorf <[email protected]>
Co-authored-by: Carl Simon Adorf <[email protected]>
Use proper code-block formatting for the different code-block types. Add aliceblue background color for console code-blocks. Add output for `verdi daemon status` command, as well as small fixes to the text.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very good! I found a few typos etc. and have one question, but overall I think we're close to done.
docs/source/tutorial/basic.rst
Outdated
|
||
.. code-block:: ipython | ||
|
||
In [1]: from aiida.workflows.multiplyadd import MultiplyAddWorkChain |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we use a factory function here instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! I didn't know how to add an entry point when I first wrote the tutorial. ^^ I've also added a short sentence on the WorkflowFactory
. Have a look and see if you think it's clear/sufficient.
Co-authored-by: Carl Simon Adorf <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 👍
Add a tutorial to teach new users basic AiiDA concepts. Co-authored-by: Chris Sewell <[email protected]> Co-authored-by: Carl Simon Adorf <[email protected]>
First draft of the AiiDA tutorial (See Issue #3981). Next to adding the tutorial itself, I've also:
aliceblue
.sphinx-copybutton
extension.Some outstanding issues/questions:
sphinx-copybutton
extension works fine, but perhaps it would be better if we can specify which code snippets the copy button is added to. Now using the copy button for many verdi shell snippets also copies the prompt. You can specify one prompt that is not included when copying the snippet contents, which I’ve currently set to ‘$
‘ for the terminal snippets.tutor
computer is now set up under$PWD/work
. I figured it might be nice to have them explore the contents of this directory at the end of the tutorial, so they can see how AiiDA uses the UUID to organise the directories.I have gone through the tutorial myself in 13 minutes (reading the text aloud to slow me down a bit). I think the size is ok at this point, but we might want to cut some parts (if possible) and still include an example on querying.