You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The process for contributing a tutorial includes the github [fork](https://help.github.com/articles/working-with-forks/), [branch, push, pull request](https://help.github.com/articles/proposing-changes-to-your-work-with-pull-requests/) workflow.
91
88
92
-
To create andcontribute a new tutorial, you will first need to fork the
93
-
astropy-tutorials repository on github and clone this fork locally to your
89
+
To contribute a new tutorial, first fork the
90
+
astropy-tutorials repository and clone it locally to your
94
91
machine (replace <GITHUBUSERNAME>with your github username)::
All files used by the tutorial -- e.g., example data files, the IPython
110
-
notebook file itself -- should go in this directory. Now you can start writing
111
-
the tutorial! Change directories into this new path and start up an
112
-
IPython notebook server:
113
-
114
-
cd tutorials/Spectral-Line-Fitting
115
-
ipython notebook --matplotlib inline
116
-
117
-
Create a new notebook file, and write away! (Following the Content Guidelines above.)
118
-
Remember to place any extra files
119
-
used by the tutorial in the directory with the notebook file, and place them
120
-
under git version control.
107
+
notebook file itself -- should go in this directory.
121
108
122
109
You will also need to edit the notebook file metadata.
123
110
(IPython notebook --> edit menu --> edit notebook metadata)
124
-
The metadata contains any extra information about the tutorial you may want to add.
125
111
The metadata must contain, at minimum, the following fields:
126
112
127
113
- link_name (the name of the link which will appear in the list of tutorials)
128
-
- author
114
+
- authorlist
129
115
- date (month year, e.g. 'July 2013')
130
116
131
117
Here is an example of one of these files: [FITS-header.ipynb](https://github.com/astropy/astropy-tutorials/blob/master/tutorials/FITS-header/FITS-header.ipynb) (be sure to hit the "raw" button to see the metadata).
132
118
133
-
You will also need to specify any python packages that the tutorial depends on.
119
+
Please specify any python packages that the tutorial depends on via the `requirements.json`file.
134
120
Almost always this will include a specific version of `astropy`, and perhaps other affiliated packages.
135
121
You do this by placing a file called `requirements.json`in the directory that contains the tutorial notebook file.
136
122
To see in example of that, have a look at [requirements.json](https://github.com/astropy/astropy-tutorials/blob/master/tutorials/FITS-header/requirements.json).
@@ -140,9 +126,8 @@ fork of the repository on github (by default, named 'origin'):
140
126
141
127
git push origin Spectral-Line-Fitting
142
128
143
-
Then you will file a pull request against the main `astropy-tutorials`
144
-
repository for review.
145
-
129
+
[Open a pull request](https://help.github.com/articles/creating-a-pull-request/) against the main `astropy-tutorials`
130
+
repository in order for the community to review the new tutorial.
146
131
147
132
Data Files
148
133
----------
@@ -153,10 +138,9 @@ If your tutorial includes large data files (where large means >~ 1 MB), we
153
138
don't want them in the astropy/astropy-tutorials git repository, as that will
154
139
drastically slow down cloning the repository. Instead, we encourage use of the
155
140
`astropy.utils.download_files` function, and will host data files on the
156
-
http://data.astropy.org server. To make this easy, use the following procedure
157
-
when you have large data files.
141
+
http://data.astropy.org server. To do this, use the following procedure:
158
142
159
-
* When writing your tutorial, just include the files in your tutorial's
143
+
* When writing your tutorial, include the files in your tutorial's
160
144
directory (e.g., ``tutorials/My-tutorial-name/mydatafile.fits``). Those who
161
145
are reviewing your tutorial will have to download them, but they would need
162
146
them anyway, so it's ok. _IMPORTANT_: when you add or modify data files, make
0 commit comments