Skip to content

Commit ecb0736

Browse files
tomschrscls19fr
authored andcommitted
Doc: improve Usage section (#143)
* Change titles to using verb instead of noun * Adding version information in docs/conf.py Currently, the version of semver is imported (using from semver import __version__). To avoid importing semver, version string could be managed through bumpversion2. However, this is out of scope for this PR. * Improve entry page * Improve main title with semver's version and a catchy phrase * Move the |latest-version| placeholder to the other placeholders like build status, downloads etc. * Remove the "Welcome bla" heading as it introduces a lonly section and it is mostly useless * Add a short explanation about the "version style" major.minor.patch (cited from semver.org) * Reference the other parts with just the filename (with the .rst extension) and without the title. The title is automatically retrieved from the file, no need to repeat it. This makes the overall doc more consistent. * Change py.test -> pytest * Fix #142: Improve usage documentation * Use descriptive titles (verb+ing) to better find the topic * Structure the content with (sub)sections * Try to structure the different sections with list if there are different options to make it more readable * Document other, possible unknown features * Silence flake8 with "noqa: E402"
1 parent a598059 commit ecb0736

File tree

5 files changed

+283
-49
lines changed

5 files changed

+283
-49
lines changed

docs/conf.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import sys
2121
sys.path.insert(0, os.path.abspath('..'))
2222

23+
from semver import __version__ # noqa: E402
2324

2425
# -- General configuration ------------------------------------------------
2526

@@ -57,9 +58,9 @@
5758
# built documents.
5859
#
5960
# The short X.Y version.
60-
version = ''
61+
version = __version__
6162
# The full version, including alpha/beta/rc tags.
62-
release = ''
63+
release = version
6364

6465
# The language for content autogenerated by Sphinx. Refer to documentation
6566
# for a list of supported languages.

docs/development.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
How to Contribute
2-
-----------------
1+
Contributing to semver
2+
======================
33

44
When you make changes to the code please run the tests before pushing your
55
code to your fork and opening a `pull request`_:
@@ -8,7 +8,7 @@ code to your fork and opening a `pull request`_:
88
99
python setup.py test
1010
11-
We use `py.test`_ and `tox`_ to run tests against all supported Python
11+
We use `pytest`_ and `tox`_ to run tests against all supported Python
1212
versions. All test dependencies are resolved automatically, apart from
1313
virtualenv, which for the moment you still may have to install manually:
1414

@@ -24,5 +24,5 @@ You can use the ``clean`` command to remove build and test files and folders:
2424
2525
2626
.. _pull request: https://github.com/k-bx/python-semver/pulls
27-
.. _py.test: http://pytest.org/
27+
.. _pytest: http://pytest.org/
2828
.. _tox: http://tox.testrun.org/

docs/index.rst

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,33 @@
1-
Semver |latest-version|
2-
=======================
1+
Semver |version| -- Semantic Versioning
2+
=======================================
33

4-
|build-status| |python-support| |downloads| |license|
4+
|build-status| |latest-version| |python-support| |downloads| |license|
55

66
.. python-semver documentation master file, created by
77
sphinx-quickstart on Tue May 1 16:51:19 2018.
88
You can adapt this file completely to your liking, but it should at least
99
contain the root `toctree` directive.
1010
11-
Welcome to python-semver's documentation!
12-
=========================================
11+
A Python module for `semantic versioning`_. Simplifies comparing versions.
12+
13+
The module follows the ``MAJOR.MINOR.PATCH`` style:
14+
15+
* ``MAJOR`` version when you make incompatible API changes,
16+
* ``MINOR`` version when you add functionality in a backwards compatible manner, and
17+
* ``PATCH`` version when you make backwards compatible bug fixes.
18+
19+
Additional labels for pre-release and build metadata are supported.
20+
21+
1322

1423
.. toctree::
1524
:maxdepth: 2
16-
:caption: Contents:
25+
:caption: Contents
1726

18-
Install <install.rst>
19-
Usage <usage.rst>
20-
Development <development.rst>
21-
API <api.rst>
22-
23-
A Python module for `semantic versioning`_. Simplifies comparing versions.
27+
install
28+
usage
29+
development
30+
api
2431

2532

2633
.. |latest-version| image:: https://img.shields.io/pypi/v/semver.svg
@@ -41,7 +48,7 @@ A Python module for `semantic versioning`_. Simplifies comparing versions.
4148
.. _semantic versioning: http://semver.org/
4249

4350

44-
Indices and tables
51+
Indices and Tables
4552
==================
4653

4754
* :ref:`genindex`

docs/install.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Installation
2-
------------
1+
Installing semver
2+
=================
33

44
For Python 2:
55

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy