Skip to content

Commit

Permalink
Merge branch 'dev-guide-update' into 'master'
Browse files Browse the repository at this point in the history
Update README and dev guide

Closes #73 and #62

See merge request LMSAL_HUB/aia_hub/aiapy!71
  • Loading branch information
wtbarnes committed Jul 16, 2020
2 parents 9dec4f7 + 07bc343 commit ef98596
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 30 deletions.
5 changes: 3 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ aiapy is available through the Python Package Index and can be installed via `pi
pip install aiapy
Additionally, you can install the current development version from GitLab,
This is the recommended way to obtain and install aiapy. Alternatively, you can
install the current development version from GitLab,

.. code-block:: shell
git clone --recursive https://gitlab.com/LMSAL_HUB/aia_hub/aiapy.git
git clone https://gitlab.com/LMSAL_HUB/aia_hub/aiapy.git
cd aiapy
pip install -e .
Expand Down
27 changes: 15 additions & 12 deletions docs/develop.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Developing aiapy
This page outlines how to setup your Python environment to develop
aiapy as well as some basic best practices for collaborative development.
These instructions are adapted from the
`SunPy developer's guide <https://docs.sunpy.org/en/latest/dev_guide/index.html>`_.
`SunPy developer's guide`_.
This guide is by no means complete or definitive. If you feel like something
is missing or incorrect, please
`create an issue <https://gitlab.com/LMSAL_HUB/aia_hub/aiapy/issues>`_
Expand Down Expand Up @@ -70,7 +70,7 @@ Next, install the needed dependencies,
.. code-block:: shell
cd aiapy
pip install -r requirements/requirements-dev.txt
pip install -e .[test,docs]
This includes all of the dependencies for the package as well as `pytest` for
running tests and `sphinx` for building the docs. Finally, install the
Expand All @@ -84,7 +84,7 @@ To make sure everything is working alright, you can run the tests,

.. code-block:: shell
python setup.py test
pytest --remote-data=any
See testing_ for more details regarding running the tests.

Expand Down Expand Up @@ -129,23 +129,24 @@ locally. To run the tests,

.. code:: shell
python setup.py test --remote-data
pytest --remote-data=any
This will generate report showing which tests passed and which failed (if any).
Dropping the `--remote-data` flag will skip tests that require a network
connection. aiapy uses the `pytest <https://pytest.org/en/latest/>`_ framework
in the context of the astropy package template for discovering and running
all of the tests. See the
`Astropy testing guidelines <https://docs.astropy.org/en/stable/development/testguide.html>`_
for additional details.
for discovering and running all of the tests.

Additions to the codebase should be accompanied by appropriate
tests such that the test coverage of the entire package does not decrease.
You can check the test coverage by running,

.. code:: shell
python setup.py test --remote-data --coverage
pytest --remote-data=any --cov aiapy
Additionally, the test suite, including the documentation build and code
style checks can be run with `tox <https://tox.readthedocs.io/en/latest/>`_. See the
`SunPy developer's guide`_ for more information on running the test suite with `tox`.

Tests should be added to the directory in the appropriate subpackage, e.g.
for `calibrate`, the tests should be placed in `calibrate/tests`. Your
Expand Down Expand Up @@ -182,7 +183,8 @@ You can build and test the documentation locally by running,

.. code:: shell
python setup.py build_docs
cd docs
make html
This will run Sphinx on the restructured text files in order to create the
HTML version of the documentation.
Expand All @@ -191,8 +193,9 @@ The built documentation, in HTML format, is in `docs/_build/html`.
Best Practices
--------------

All contributors to the aiapy codebase should follow
`SunPy developer's guide <https://docs.sunpy.org/en/latest/dev_guide/index.html>`_.
All contributors to the aiapy codebase should follow the `SunPy developer's guide`_.
This guide lays out a set of best practices for contributing, reviewing,
testing, and documenting code. All contributions to aiapy must adhere to the
`Python in Heliophysics Community Standards <https://doi.org/10.5281/zenodo.2529130>`_.

.. _`SunPy developer's guide`: https://docs.sunpy.org/en/latest/dev_guide/index.html
15 changes: 0 additions & 15 deletions requirements/requirements-dev.txt

This file was deleted.

1 change: 0 additions & 1 deletion requirements/requirements.txt

This file was deleted.

0 comments on commit ef98596

Please sign in to comment.