<commit_before>=================
Developer's Guide
=================

Overview
--------
This article describes the guidelines to be followed by developers working on
SunPy. You if you are thinking of contributing to SunPy please read the following
carefully.

Version Control
---------------

Source-code for SunPy is managed using `Git <http://git-scm.com>`_, 
a Distributed Version Control system. Code branches are hosted on 
`GitHub.com <http://github.com/sunpy/sunpy>`_, a free project hosting  website 
for Open-Source software.

Creating Your Own Repo 
^^^^^^^^^^^^^^^^^^^^^^^^

**Overview**

Each person contributing to SunPy should create their own code repository on
GitHub by forking the master repository or repo. All development is then done on that 
fork, using topic branches to isolate work on different features. New 
contributers can then initiate pull requests to have their code incorporated 
into the SunPy master repository. Regular contributers can become members of the 
`SunPy team <https://github.com/sunpy>`_ on GitHub. Code will be reviewed by regular 
contributors and comments will usually be provided before code is accepted.

**Getting Started**

Creating your own repo on GitHub is easy to do. If you followed the SunPy installation
instructions you should already have git installed. Go ahead and create a free account 
on `create an account on GitHub <https://github.com/signup/free>`_. Github has some 
`great resources to help <https://help.github.com/>`_. Here is a quick overview of the
process. 

**Adding an SSH key to GitHub**

Next, you need to tell GitHub who you are. In order to push any code to GitHub 
you need to create a public SSH key and associate it with your GitHub account. 
For instructions on how this is done, see the article on GitHub on 
`Setting up git <http://help.github.com/set-up-git-redirect>`_ under 
"Set Up SSH Keys". You only need to do this once, although if you plan to 
work from multiple computers you will need to go through the process for each 
computer you wish to work on. Once you have created your account and 
associated a public SSH key it, you are ready to go.

**Identifying yourself**

Begin by identifying yourself to GitHub and logging in to
GitHub: :: 

 git config --global user.name "<NAME>"
 git config --global user.email "<EMAIL>"
 
**Forking SunPy**

Each contributer to SunPy has their own copy of the SunPy master repo. When
working on the code, changes are made to this copied repo, and only when the
changes are completed, and have been verified to work, are they pull requested back
to the master repo. GitHub provides a simple mechanism to setup your own
personal repo by providing an option to `fork a repository 
<http://help.github.com/fork-a-repo/>`_. When you create a fork of a GitHub
project, a copy of the repo will automatically be created for you, and a link
will be provided which you can use to download the code to your machine and
begin working on it.

To begin, fork the main SunPy repo on GitHub by clicking on the `Fork` button 
on the `SunPy project page <https://github.com/sunpy/sunpy>`_

Next, you need to download the forked repository. Clone the fork to your 
local machine, edit and run: ::

 git clone https://github.com/your_username/sunpy.git 
 
By default your fork of the repo on GitHub is identified by the name `origin`.
In order to keep the fork up to date with the main repo, it is useful to add it
as a `remote` in git: ::<commit_msg>update to git instructions<commit_after>=================
Developer's Guide
=================

Overview
--------
This article describes the guidelines to be followed by developers working on
SunPy. You if you are thinking of contributing to SunPy please read the following
carefully.

Version Control
---------------

Source-code for SunPy is managed using `Git <http://git-scm.com>`_, 
a Distributed Version Control system. Code branches are hosted on 
`GitHub.com <http://github.com/sunpy/sunpy>`_, a free project hosting  website 
for Open-Source software.

Creating Your Own Repo 
^^^^^^^^^^^^^^^^^^^^^^^^

**Overview**

Each person contributing to SunPy should create their own code repository on
GitHub by forking the master repository or repo. All development is then done on that 
fork, using topic branches to isolate work on different features. New 
contributers can then initiate pull requests to have their code incorporated 
into the SunPy master repository. Regular contributers can become members of the 
`SunPy team <https://github.com/sunpy>`_ on GitHub. Code will be reviewed by regular 
contributors and comments will usually be provided before code is accepted.

**Getting Started**

Creating your own repo on GitHub is easy to do. If you followed the SunPy installation
instructions you should already have git installed. Go ahead and create a free account 
on `create an account on GitHub <https://github.com/signup/free>`_. Github has some 
`great resources to help <https://help.github.com/>`_. Here is a quick overview of the
process. 

**Adding an SSH key to GitHub**

Next, you need to tell GitHub who you are. In order to push any code to GitHub 
you need to create a public SSH key and associate it with your GitHub account. 
For instructions on how this is done, see the article on GitHub on 
`Setting up git <http://help.github.com/set-up-git-redirect>`_ under 
"Set Up SSH Keys". You only need to do this once, although if you plan to 
work from multiple computers you will need to go through the process for each 
computer you wish to work on. Once you have created your account and 
associated a public SSH key it, you are ready to go.

**Identifying yourself**

Begin by identifying yourself to GitHub and logging in to
GitHub: :: 

 git config --global user.name "<NAME>"
 git config --global user.email "<EMAIL>"
 
**Forking SunPy**

Each contributer to SunPy has their own copy of the SunPy master repo. When
working on the code, changes are made to this copied repo, and only when the
changes are completed, and have been verified to work, are they pull requested back
to the master repo. GitHub provides a simple mechanism to setup your own
personal repo by providing an option to `fork a repository 
<http://help.github.com/fork-a-repo/>`_. When you create a fork of a GitHub
project, a copy of the repo will automatically be created for you, and a link
will be provided which you can use to download the code to your machine and
begin working on it.

To begin, fork the main SunPy repo on GitHub by clicking on the `Fork` button 
on the `SunPy project page <https://github.com/sunpy/sunpy>`_

Next, you need to download the forked repository. Clone the fork to your 
local machine, edit and run: ::

 git clone git@github.com:your_username/sunpy.git
 
By default your fork of the repo on GitHub is identified by the name `origin`.
In order to keep the fork up to date with the main repo, it is useful to add it
as a `remote` in git: ::
{'fraction_non_alphanumeric': 0.07803052116325943, 'fraction_numerical': 0.0, 'mean_word_length': 4.026772793053546, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 9, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1632533', 'n_tokens_mistral': 1869, 'n_tokens_neox': 1757, 'n_words': 1061}