Skip to content

Commit 1a71323

Browse files
authored
trim down github instructions.
I removed a bunch of text and added links to more github help pages.
1 parent e7c4526 commit 1a71323

File tree

1 file changed

+11
-27
lines changed

1 file changed

+11
-27
lines changed

CONTRIBUTING.md

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ Code:
4040
```python
4141
import numpy as np
4242
import matplotlib as mpl
43+
import matplotlib.pyplot as plt
4344
import astropy.units as u
4445
import astropy.coordinates as coord
4546
from astropy.io import fits
@@ -83,14 +84,10 @@ This tutorial goes from a downloading a data file, doing something to it, and vi
8384
Procedure
8485
---------
8586

86-
If you are unfamiliar with git, you should first get familiar with git and
87-
github. There are a number of resources available for learning git, but a good
88-
place to start is with the [github interactive tutorial](http://try.github.io/).
89-
You should also get familiar with using pull requests and forks on github:
90-
https://help.github.com/articles/using-pull-requests
87+
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.
9188

92-
To create and contribute 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
9491
machine (replace <GITHUB USERNAME> with your github username)::
9592

9693
git clone git@github.com:<GITHUB USERNAME>/astropy-tutorials.git
@@ -107,30 +104,19 @@ branch:
107104
mkdir tutorials/Spectral-Line-Fitting
108105

109106
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.
121108

122109
You will also need to edit the notebook file metadata.
123110
(IPython notebook --> edit menu --> edit notebook metadata)
124-
The metadata contains any extra information about the tutorial you may want to add.
125111
The metadata must contain, at minimum, the following fields:
126112

127113
- link_name (the name of the link which will appear in the list of tutorials)
128-
- author
114+
- author list
129115
- date (month year, e.g. 'July 2013')
130116

131117
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).
132118

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.
134120
Almost always this will include a specific version of `astropy`, and perhaps other affiliated packages.
135121
You do this by placing a file called `requirements.json` in the directory that contains the tutorial notebook file.
136122
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'):
140126

141127
git push origin Spectral-Line-Fitting
142128

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.
146131

147132
Data Files
148133
----------
@@ -153,10 +138,9 @@ If your tutorial includes large data files (where large means >~ 1 MB), we
153138
don't want them in the astropy/astropy-tutorials git repository, as that will
154139
drastically slow down cloning the repository. Instead, we encourage use of the
155140
`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:
158142

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
160144
directory (e.g., ``tutorials/My-tutorial-name/mydatafile.fits``). Those who
161145
are reviewing your tutorial will have to download them, but they would need
162146
them anyway, so it's ok. _IMPORTANT_: when you add or modify data files, make

0 commit comments

Comments
 (0)