Skip to content

Commit 1316618

Browse files
committed
DOC: Update CONTRIBUTING
And don't use "linkcheck" on Travis-CI. This caused too many timeout errors (on valid links).
1 parent 4d6cd30 commit 1316618

File tree

3 files changed

+34
-9
lines changed

3 files changed

+34
-9
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ install:
1212
- pip install -r doc/requirements.txt
1313
script:
1414
- python -m pytest
15-
# This executes the example notebooks and checks for valid URLs:
16-
- python -m sphinx doc/ _build/ -b linkcheck
15+
# This executes the example notebooks:
16+
- python -m sphinx doc/ _build/ -b dummy

CONTRIBUTING.rst

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@ improvement, please create an issue or a pull request at
66
https://github.com/sfstoolbox/sfs-python/.
77
Contributions are always welcome!
88

9+
Development Installation
10+
^^^^^^^^^^^^^^^^^^^^^^^^
11+
912
Instead of pip-installing the latest release from PyPI, you should get the
1013
newest development version from Github_::
1114

1215
git clone https://github.com/sfstoolbox/sfs-python.git
1316
cd sfs-python
14-
python setup.py develop --user
17+
python3 setup.py develop --user
1518

1619
.. _Github: https://github.com/sfstoolbox/sfs-python/
1720

@@ -20,24 +23,48 @@ changes from the Github repository.
2023

2124
If you prefer, you can also replace the last command with::
2225

23-
pip install --user -e .
26+
python3 -m pip install --user -e .
2427

2528
... where ``-e`` stands for ``--editable``.
2629

30+
Building the Documentation
31+
^^^^^^^^^^^^^^^^^^^^^^^^^^
32+
2733
If you make changes to the documentation, you can re-create the HTML pages
2834
using Sphinx_.
2935
You can install it and a few other necessary packages with::
3036

31-
pip install -r doc/requirements.txt --user
37+
python3 -m pip install -r doc/requirements.txt --user
3238

3339
To create the HTML pages, use::
3440

35-
python setup.py build_sphinx
41+
python3 setup.py build_sphinx
3642

3743
The generated files will be available in the directory ``build/sphinx/html/``.
3844

45+
It is also possible to automatically check if all links are still valid::
46+
47+
python3 setup.py build_sphinx -b linkcheck
48+
3949
.. _Sphinx: http://sphinx-doc.org/
4050

51+
Running the Tests
52+
^^^^^^^^^^^^^^^^^
53+
54+
You'll need pytest_ for that.
55+
It can be installed with::
56+
57+
python3 -m pip install -r tests/requirements.txt --user
58+
59+
To execute the tests, simply run::
60+
61+
python3 -m pytest
62+
63+
.. _pytest: https://pytest.org/
64+
65+
Creating a New Release
66+
^^^^^^^^^^^^^^^^^^^^^^
67+
4168
New releases are made using the following steps:
4269

4370
#. Bump version number in ``sfs/__init__.py``
@@ -46,7 +73,7 @@ New releases are made using the following steps:
4673
#. Create an (annotated) tag with ``git tag -a x.y.z``
4774
#. Clear the ``dist/`` directory
4875
#. Create a source distribution with ``python3 setup.py sdist``
49-
#. Create a wheel distribution with ``python3 setup.py bdist_wheel --universal``
76+
#. Create a wheel distribution with ``python3 setup.py bdist_wheel``
5077
#. Check that both files have the correct content
5178
#. Upload them to PyPI with twine_: ``twine upload dist/*``
5279
#. Push the commit and the tag to Github and `add release notes`_ containing a

doc/conf.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@
4545
# Override kernel name to allow running with Python 2 on Travis-CI
4646
nbsphinx_kernel_name = 'python'
4747

48-
linkcheck_timeout = 10
49-
5048
autoclass_content = 'init'
5149
autodoc_member_order = 'bysource'
5250
autodoc_default_flags = ['members', 'undoc-members']

0 commit comments

Comments
 (0)