Skip to content

Commit f698bec

Browse files
committed
Editing Sphinx docs, to create a more useful organization, add code examples, etc. Still in progress
1 parent d332e0c commit f698bec

File tree

3 files changed

+72
-44
lines changed

3 files changed

+72
-44
lines changed

docs/source/contribute.rst

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,55 @@
1-
Contribute to Documentation
1+
Contributing
22
============================
33

4+
You can help with ODM2 Python API by contributing code, helping with the documentation, and engaging the team via GitHub issues (questions, solutions, etc).
5+
6+
7+
Installing the development version from the development branch on github
8+
----------------------------------
9+
10+
Note: We follow the `Gitflow workflow <https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow>`__ for development.
11+
12+
1. Download both ``requirements.txt`` and ``requirements-dev.txt``.
13+
14+
.. code-block:: bash
15+
16+
wget https://raw.githubusercontent.com/ODM2/ODM2PythonAPI/master/requirements.txt
17+
wget https://raw.githubusercontent.com/ODM2/ODM2PythonAPI/master/requirements-dev.txt
18+
19+
2. Create conda environment ``odm2api_dev`` from the two ``requirements*`` text files.
20+
21+
.. code-block:: bash
22+
23+
conda create -n odm2api_dev -c conda-forge python=2.7 --file requirements.txt --file requirements-dev.txt
24+
25+
3. Activate conda environment.
26+
- MacOSX/Linux:
27+
28+
.. code-block:: bash
29+
30+
source activate odm2api_dev
31+
32+
- Windows:
33+
34+
.. code-block:: bash
35+
36+
activate odm2api_dev
37+
38+
4. Install the latest commit from the development branch
39+
40+
.. code-block:: bash
41+
42+
pip install git+https://github.com/ODM2/ODM2PythonAPI.git@development#egg=odm2api
43+
44+
45+
Contribute to Documentation
46+
----------------------------------
47+
448
This guide is a reference on how to contribute to ODM2 Documentation effort
549
for the many `ODM2 Software Ecosystem <https://github.com/ODM2/odm2-software-ecosystem>`__.
650

751
Conventions
8-
-----------
52+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
953

1054
There are a few conventions that should be followed
1155
when writing docstrings within the code:
@@ -30,7 +74,7 @@ Please add any additional conventions that you think should be in place
3074
within `the github issue #106 <https://github.com/ODM2/ODM2PythonAPI/issues/106>`__.
3175

3276
Pull requests
33-
-------------
77+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3478

3579
Once changes has been in place within your forked copy of the repository
3680
you are working on, please create a pull request to add your contribution
Lines changed: 23 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1-
Installation
1+
Get Started
22
============
33

4+
5+
Install the latest release as a conda package from conda-forge
6+
----------------------------------------------
7+
8+
conda
9+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10+
411
The easiest and most reliable way to install the ODM2 Python API
512
(``odm2api``) is using the `Conda package management
613
system <https://conda.io/docs/>`__ via either
@@ -21,8 +28,8 @@ To activate a conda environment, say, "myenv":
2128
changes have been made to support Python 3.x, but they haven't been
2229
tested thoroughly.
2330

24-
Latest release, from conda-forge anaconda.org channel
25-
----------------------------------------------
31+
Install the conda package
32+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2633

2734
The `latest release <https://github.com/ODM2/ODM2PythonAPI/releases>`_ is available
2835
on the `conda-forge anaconda.org channel <https://anaconda.org/conda-forge/odm2api>`_
@@ -43,39 +50,16 @@ To create a new environment "myenv" with the ``odm2api`` package:
4350
conda create -n myenv -c conda-forge python=2.7 odm2api
4451

4552

46-
Installing the development version from the ``development`` branch on github
47-
----------------------------------
48-
49-
Note: We follow the `Gitflow workflow <https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow>`__ for development.
50-
51-
1. Download both ``requirements.txt`` and ``requirements-dev.txt``.
52-
53-
.. code-block:: bash
54-
55-
wget https://raw.githubusercontent.com/ODM2/ODM2PythonAPI/master/requirements.txt
56-
wget https://raw.githubusercontent.com/ODM2/ODM2PythonAPI/master/requirements-dev.txt
57-
58-
2. Create conda environment ``odm2api_dev`` from the two ``requirements*`` text files.
59-
60-
.. code-block:: bash
61-
62-
conda create -n odm2api_dev -c conda-forge python=2.7 --file requirements.txt --file requirements-dev.txt
63-
64-
3. Activate conda environment.
65-
- MacOSX/Linux:
66-
67-
.. code-block:: bash
68-
69-
source activate odm2api_dev
70-
71-
- Windows:
72-
73-
.. code-block:: bash
74-
75-
activate odm2api_dev
76-
77-
4. Install the latest commit from the development branch
78-
79-
.. code-block:: bash
80-
81-
pip install git+https://github.com/ODM2/ODM2PythonAPI.git@development#egg=odm2api
53+
Code examples
54+
----------------------------------------------
55+
56+
57+
58+
59+
Sample Jupyter notebooks
60+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
61+
62+
Also mention the associated SQLite ODM2 databases. And the conda environment file.
63+
64+
https://github.com/ODM2/ODM2PythonAPI/blob/master/Examples/WaterQualityMeasurements_RetrieveVisualize.ipynb
65+
https://github.com/ODM2/ODM2PythonAPI/blob/master/Examples/TimeSeries_RetrieveVisualize.ipynb

docs/source/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ A Python-based application programmer's interface for the `Observations Data Mod
77
:maxdepth: 2
88
:caption: Contents:
99

10-
installing
10+
getstarted
1111
modules
1212
odm2models
13-
credits
1413
contribute
14+
credits
1515

1616
Indices and tables
1717
==================

0 commit comments

Comments
 (0)