Skip to content

Commit dbcb5a1

Browse files
committed
Merge pull request #149 from hamishwillee/tmp_contributing_updates
Update contributions section with how to set up a dev environment
2 parents 07d7503 + eec0acd commit dbcb5a1

10 files changed

+217
-38
lines changed

docs/about/index.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,16 @@
22
Introducing DroneKit-Python
33
===========================
44

5-
This section provides an overview of DroneKit-Python's functionality, licensing, supported companion computers, and how you can contribute.
5+
This section provides an overview of DroneKit-Python's functionality, licensing, and supported companion computers.
66

77
After reading, you will understand what the kit offers and the opportunities it provides. You will also know where to go if you have further questions for suggestions for improvement.
88

99

1010
.. toctree::
11-
:maxdepth: 1
11+
:maxdepth: 4
1212

1313
overview
1414
release_notes
15-
contributing
1615
license
1716

1817

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
.. _contributing_api:
2+
3+
=======================
4+
Contributing to the API
5+
=======================
6+
7+
This article provides a high level overview of how to contribute changes to the DroneKit-Python source code.
8+
9+
.. tip::
10+
11+
We highly recommend that changes and ideas are `discussed with the project team
12+
<https://github.com/diydrones/dronekit-python/issues>`_ before starting work!
13+
14+
15+
Submitting changes
16+
==================
17+
18+
Contributors should fork the main `diydrones/dronekit-python/ <https://github.com/diydrones/dronekit-python>`_
19+
repository and contribute changes back to the project master branch using pull requests
20+
21+
* Changes should be :ref:`tested locally <contributing-test-code>` before submission.
22+
* Changes to the public API should be :ref:`documented <contributing-to-documentation>` (we will provide subediting support!)
23+
* Pull requests should be as small and focussed as possible to make them easier to review.
24+
* Pull requests should be rebased against the main project before submission to make integration easier.
25+
26+
27+
28+
.. _contributing-test-code:
29+
30+
Test code
31+
=========
32+
33+
Test code should be used to verify new and changed functionality. Changes to DroneKit can be tested locally by
34+
rebuilding your git branch and running it against SITL. The links below provide information on how
35+
to set up a development environment on your development computer:
36+
37+
* :ref:`dronekit_development_linux`
38+
* :ref:`dronekit_development_windows`
39+
40+
.. note:: At time of writing (June 2015) we do not yet have formal acceptance tests (unit tests, system tests).
41+
42+
We recommend that you provide your test script as a gist, and run any the
43+
:ref:`DroneKit-Python Examples <example-toc>` that are relevant.
44+
45+
For example, the addition of a new API item for retrieving a vehicle attribute would need test code for
46+
getting, setting (if applicable) and printing the attribute. An easy way to create this would be to
47+
update and run :ref:`example-vehicle-state`.
48+
49+
50+

docs/about/contributing.rst renamed to docs/contributing/contributions_documentation.rst

Lines changed: 35 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,37 @@
1-
.. _contributing:
2-
3-
============
4-
Contributing
5-
============
6-
7-
DroneKit is an open-source project. We welcome any contribution that will improve the API — adding new features and making it easier to use.
8-
9-
10-
Getting started
11-
================
12-
13-
The dronekit-python project is `hosted on Github here <https://github.com/diydrones/dronekit-python/>`_. This where you get the source code, and is the best place to raise `bug reports and enhancement suggestions <https://github.com/diydrones/dronekit-python/issues>`_.
14-
15-
.. tip:: Before starting new work, first create an issue in Github so it can be tracked and discussed!
1+
.. _contributing-to-documentation:
162

17-
In addition to creating defect reports, a good starting point is to work on the `open issues <https://github.com/diydrones/dronekit-python/issues>`_ on Github. In particular, :ref:`documentation issues <contributing-to-documentation>` can be resolved without a deep knowledge of the code, and will help you learn more about the project.
3+
=================================
4+
Contributing to the Documentation
5+
=================================
186

7+
One of the best ways that you can help is by improving this documentation. Here we explain
8+
the documentation system, how to build the documents locally, and how to submit your changes.
199

20-
How to submit changes
21-
=====================
2210

23-
Contributors should fork the main project Github repository and contribute changes back to the project using pull requests:
11+
Documentation system overview
12+
=============================
2413

25-
* Ideas should be discussed with the project team first (using an issue)
26-
* Pull requests should be as small and focussed as possible to make them easier to review
27-
* Rebase your code against the main project before submission to make integration easier
14+
The documentation source files are `stored in Github <https://github.com/diydrones/dronekit-python/tree/master/docs>`_.
15+
The content is written in plain-text files (file-extension :file:`.rst`) using
16+
`reStructuredText <http://sphinx-doc.org/rest.html>`_ markup, and is compiled into HTML using the
17+
`Sphinx Documentation Generator <http://sphinx-doc.org/index.html>`_.
2818

19+
Submitting changes
20+
==================
2921

22+
The process and requirements for submitting changes to the documentation are **the same** as when
23+
:ref:`contributing to the source code <contributing_api>`.
3024

31-
.. _contributing-to-documentation:
25+
As when submitting source code you should fork the main project Github repository and
26+
contribute changes back to the project using pull requests. The changes should be tested
27+
locally (by :ref:`building the docs <contributing_building_docs>`) before being submitted.
3228

33-
Contributing to the API documentation
34-
=====================================
29+
See :ref:`contributing_api` for more information.
3530

36-
One of the best ways that you can help is by improving this documentation.
31+
.. _contributing_building_docs:
3732

38-
The documentation source files are `stored in Github <https://github.com/diydrones/dronekit-python/tree/master/docs>`_. The content is written in plain-text files (file-extension :file:`.rst`) using `reStructuredText <http://sphinx-doc.org/rest.html>`_ markup, and is compiled into HTML using the `Sphinx Documentation Generator <http://sphinx-doc.org/index.html>`_. As with any other contributions to this project, you should fork the main project Github repository and contribute changes back to the project using pull requests.
33+
Building the docs
34+
=================
3935

4036
We've made it very easy to get started by providing a `Vagrant <https://www.vagrantup.com/>`_ based setup for :program:`Sphinx`. Using :program:`Vagrant` you can work with source files on your host machine using a familiar :program:`git` client and text editor, and then invoke :program:`Sphinx` in the :program:`Vagrant` VM to compile the source to HTML.
4137

@@ -88,14 +84,20 @@ The instructions below explain how to get the documentation source, and build it
8884
vagrant resume #Restart the VM
8985
vagrant ssh -c "cd /vagrant/docs && make html" #Build files when needed.
9086

91-
92-
* After making changes, follow the normal process to submit them to the project (i.e.commit and push them to your fork on Github, and then create a pull request on Github to the project repository).
9387

94-
95-
96-
97-
88+
Style guide
89+
===========
90+
91+
.. tip::
92+
93+
This guide is evolving. The most important guidance we can give is
94+
to *copy the existing style of reference, guide and example material*!
95+
9896

97+
#. Use US English for spelling.
9998

99+
#. Use emphasis sparingly (italic, bold, underline).
100100

101+
#. Use `Sphinx semantic markup <http://sphinx-doc.org/markup/inline.html#other-semantic-markup>`_ to mark up *types* of text (key-presses, file names etc.)
101102

103+
#. Use double backticks (``) around ``inline code`` items.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
.. _dronekit_development_linux:
2+
3+
===================================
4+
Building DroneKit-Python on Linux
5+
===================================
6+
7+
The setup for *developing* DroneKit-Python on Linux is almost the same as for *using*
8+
DroneKit-Python. We therefore recommend that you start by following the instructions in :ref:`Getting Started <getting_started_installing_dronekit_linux>`.
9+
10+
When you've got DroneKit and a vehicle (simulated or real) communicating, you can
11+
then build and install your own fork of DroneKit, as discussed below.
12+
13+
14+
Fetch and build DroneKit source
15+
===============================
16+
17+
#. Fork the `dronekit-python <https://github.com/diydrones/dronekit-python>`_ project on Github.
18+
19+
#. Run the following commands to clone and build DroneKit (in the directory of your choice):
20+
21+
.. code:: bash
22+
23+
git clone https://github.com/<your_fork_of_dronekit>/dronekit-python.git
24+
cd ./dronekit-python
25+
sudo python setup.py build
26+
sudo python setup.py install
27+
28+
29+
Updating DroneKit
30+
=================
31+
32+
Navigate to your local git fork, pull the latest version, and rebuild/install:
33+
34+
.. code:: bash
35+
36+
cd ./<path-to-your-dronekit-fork>/dronekit-python
37+
git pull
38+
sudo python setup.py build
39+
sudo python setup.py install
40+
41+
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
.. _dronekit_development_windows:
2+
3+
===================================
4+
Building DroneKit-Python on Windows
5+
===================================
6+
7+
The setup for *developing* DroneKit-Python on Windows is almost the same as for *using*
8+
DroneKit-Python. We therefore recommend that you start by following the instructions in the :ref:`get-started` and/or
9+
:ref:`quick-start`.
10+
11+
When you've got DroneKit and a vehicle (simulated or real) communicating, you can
12+
then build and install your own fork of DroneKit, as discussed below.
13+
14+
15+
Fetch and build DroneKit source
16+
===============================
17+
18+
#. Fork the `dronekit-python <https://github.com/diydrones/dronekit-python>`_ project on Github.
19+
20+
#. Open the *WinPython Command Prompt*. Run the following commands to clone and build DroneKit (in the directory of your choice):
21+
22+
.. code:: bash
23+
24+
git clone https://github.com/<your_fork_of_dronekit>/dronekit-python.git
25+
cd dronekit-python
26+
python setup.py build
27+
python setup.py install
28+
29+
30+
31+
Updating DroneKit
32+
=================
33+
34+
Navigate to your local git fork, pull the latest version, and rebuild/install:
35+
36+
.. code:: bash
37+
38+
cd <path-to-your-dronekit-fork>/dronekit-python
39+
git pull
40+
python setup.py build
41+
python setup.py install
42+
43+

docs/contributing/getting_started.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.. _contributing_getting_started:
2+
3+
=======================
4+
How you can Contribute
5+
=======================
6+
7+
One of the best ways you can contribute is to simply *use the API* and share your
8+
`bug reports and enhancement suggestions on Github <https://github.com/diydrones/dronekit-python/issues>`_.
9+
These can cover anything: from APIs that don't work properly through to needed features or documentation.
10+
11+
If you want to take a more active role, then a good place to start is with the project's
12+
`open issues <https://github.com/diydrones/dronekit-python/issues>`_ on Github. In particular,
13+
:ref:`documentation issues <contributing-to-documentation>` can be resolved without a deep knowledge of the code,
14+
and will help you learn more about the project.
15+
16+
If there is a feature that you want to add, then please do so! Before you start we highly recommend that
17+
you first create an issue in Github so it can be tracked and discussed!
18+

docs/contributing/index.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.. _contributing:
2+
3+
============
4+
Contributing
5+
============
6+
7+
DroneKit is an open-source project. We welcome any contribution that will improve the API and make it easier to use.
8+
9+
The articles below explain some of the :ref:`opportunities <contributing_getting_started>` for working on the project, how to :ref:`contribute to the API <contributing_api>` or the :ref:`documentation <contributing-to-documentation>`, and how to set up a :ref:`development environment on Linux <dronekit_development_linux>` or :ref:`Windows <dronekit_development_windows>`.
10+
11+
12+
.. toctree::
13+
:maxdepth: 1
14+
15+
getting_started
16+
contributions_api
17+
contributions_documentation
18+
developer_setup_windows
19+
developer_setup_linux
20+
21+
22+
23+
24+

docs/guide/getting_started.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Installing DroneKit
3434

3535
*DroneKit* can be installed on Linux, Windows and Mac OSX.
3636

37+
.. _getting_started_installing_dronekit_linux:
3738

3839
Installing DroneKit on Linux
3940
----------------------------
@@ -92,7 +93,7 @@ You will need remove *python-dateutil* as the installation comes bundled with a
9293

9394
The steps to install this package and our add-on modules are:
9495

95-
1. Run the correct `WinPython installer <http://sourceforge.net/projects/winpython/files/WinPython_2.7/2.7.6.4/>`_ for your platform (win32 vs win64)
96+
1. Run the correct `WinPython installer <http://sourceforge.net/projects/winpython/files/WinPython_2.7/2.7.6.4/>`_ (**v2.7**) for your platform (win32 vs win64)
9697

9798
2. Register the python that came from *WinPython* as the preferred interpreter for your machine:
9899

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ Contents:
2121
quick_start
2222
guide/index
2323
examples/index
24+
contributing/index
2425
API Reference <automodule>
2526

docs/quick_start.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Install Python and DroneKit
7373

7474
Install the *WinPython* package and DroneKit on your Windows computer:
7575

76-
5. Run the correct `WinPython installer <http://sourceforge.net/projects/winpython/files/WinPython_2.7/2.7.6.4/>`_ for your platform (win32 vs win64)
76+
5. Run the correct `WinPython installer <http://sourceforge.net/projects/winpython/files/WinPython_2.7/2.7.6.4/>`_ (**v2.7**) for your platform (win32 vs win64)
7777

7878
6. Open the folder where you installed WinPython, run *WinPython Control Panel* and choose **Advanced/Register Distribution** (to register it as the preferred interpreter for your machine):
7979

0 commit comments

Comments
 (0)