making an rst for a demo
Hello, I want to put together a demo for firedrake. I know that I need to use sphinx to make an rst file but I wondered whether there was a sample tex file that I could look at to copy the same format. Cheers, Francis ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637
Dear Francis,
On 15 Apr 2016, at 16:59, Francis Poulin <fpoulin@uwaterloo.ca> wrote:
Hello,
I want to put together a demo for firedrake.
Great!
I know that I need to use sphinx to make an rst file but I wondered whether there was a sample tex file that I could look at to copy the same format.
You can look at some of the existing demos which use this format (for example https://raw.githubusercontent.com/firedrakeproject/firedrake/master/demos/ma...) We don't write any tex directly. You can include latex in your rst file and it will be processed with mathjax (https://www.mathjax.org). Hope this makes sense, let us know if you have any other questions in this vein. Cheers, Lawrence
Thanks. Because I wrote my doc in a latex file I will use pandoc to convert the doc to rst. To make the update on github, I was thinking of using my firedrake installation folder. Is that a bad idea? If yes I can git clone the master branch, create a new branch, push the changes, and let you guys look it over and see if it's up to snuff. But since this is my first time posting something for firedrake I thought I'd ask about the protocol. Cheers, Francis
On 15 Apr 2016, at 18:29, Francis Poulin <fpoulin@uwaterloo.ca> wrote:
Thanks. Because I wrote my doc in a latex file I will use pandoc to convert the doc to rst.
Aha, I see.
To make the update on github, I was thinking of using my firedrake installation folder. Is that a bad idea?
No, that's fine. You will want to make a new local branch to commit your demo changes in. Because you don't have write access to the firedrake repository you won't be able to push that branch to github. You can fork the firedrake repo and add your fork as a new remote, you'll then be able to push to that and open a pull request from there. If you go down this route, you should probably make sure to switch back to master once you're done, otherwise firedrake-update may get confused (it just tries to update your current branch and doesn't switch branches for you).
If yes I can git clone the master branch, create a new branch, push the changes, and let you guys look it over and see if it's up to snuff.
This is also fine (if you don't want to mess around with the existing installed repo). But not in both cases you won't have write access to the main firedrake repo (so you'll need to fork either way). If this could be explained more clearly somewhere in our documentation, please let us know! Thanks, Lawrence
Thanks Lawrence. I just submitted a pull request. I am sure that the doc and script can both be polished off but I thought this might be a place to start. When looking around at other demos I see that not all of them have python scripts. See for example burgers. I made myself some notes that I am happy to share. Not sure where this would go though. If nothing else I will keep this around for my own benefit. Cheers, Francis How to suggest changes to Firedrake through github. 1) Go to github and fork the branch so you have your own personal copy. https://github.com/firedrakeproject/firedrake 2) Create a non-master branch to include your changes. Good to pick a name that describes what your branch is going to contribute, say mynewbranch. git checkout -b mynewbranch 3) Now you can do whatever changes you want to suggest. If you wanted to add a demo you should copy your demo files into a folder with an appropriate name. 4) After you have made your changes you can see what files are different. git status This is not necessary but good for you to realize what you've changed in case you forget something. 5) Add the files you want to include in the new version from the list above. To add one file you can do git add filetoadd If you want to add everything you can instead do git add -A 6) When you have included everything you want you can now commit the changes git commit 7) Now to push your changes from your computer to your github account git push 8) Finally, you go to the main firedrake page on github and you do a pull request. Note that you want to do this between branches. After all of this is done the group in charge of firedrake will make the appropriate changes. ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 ________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Lawrence Mitchell [lawrence.mitchell@imperial.ac.uk] Sent: Friday, April 15, 2016 1:42 PM To: firedrake@imperial.ac.uk Subject: Re: [firedrake] making an rst for a demo
On 15 Apr 2016, at 18:29, Francis Poulin <fpoulin@uwaterloo.ca> wrote:
Thanks. Because I wrote my doc in a latex file I will use pandoc to convert the doc to rst.
Aha, I see.
To make the update on github, I was thinking of using my firedrake installation folder. Is that a bad idea?
No, that's fine. You will want to make a new local branch to commit your demo changes in. Because you don't have write access to the firedrake repository you won't be able to push that branch to github. You can fork the firedrake repo and add your fork as a new remote, you'll then be able to push to that and open a pull request from there. If you go down this route, you should probably make sure to switch back to master once you're done, otherwise firedrake-update may get confused (it just tries to update your current branch and doesn't switch branches for you).
If yes I can git clone the master branch, create a new branch, push the changes, and let you guys look it over and see if it's up to snuff.
This is also fine (if you don't want to mess around with the existing installed repo). But not in both cases you won't have write access to the main firedrake repo (so you'll need to fork either way). If this could be explained more clearly somewhere in our documentation, please let us know! Thanks, Lawrence
participants (2)
- 
                
                Francis Poulin
- 
                
                Lawrence Mitchell