Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Introduce new topics for doc #351

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ We recommend the following workflow:
a. Write test cases and run the complete test suite, see :ref:`testsuite`
for details.

b. Write a changelog entry, see section :ref:`changelog`.
b. Write a changelog entry, see section :ref:`add-changelog`.

c. If you have implemented a new feature, document it into our
documentation to help our reader. See section :ref:`doc` for
Expand Down Expand Up @@ -214,7 +214,7 @@ documentation includes:
edge cases.


.. _changelog:
.. _add-changelog:

Adding a Changelog Entry
------------------------
Expand Down
2 changes: 2 additions & 0 deletions changelog.d/350.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Restructure usage section. Create subdirectory "usage/" and splitted
all section into different files.
4 changes: 4 additions & 0 deletions changelog.d/351.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Introduce new topics for:

* "Migration to semver3"
* "Advanced topics"
File renamed without changes.
10 changes: 10 additions & 0 deletions docs/advanced/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Advanced topics
===============



.. toctree::

deal-with-invalid-versions
create-subclasses-from-version
display-deprecation-warnings
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ def parse(cls, version: str) -> "SemVerWithVPrefix":
"""
if not version[0] in ("v", "V"):
raise ValueError(
"{v!r}: not a valid semantic version tag. Must start with 'v' or 'V'".format(
"{v!r}: not a valid semantic version tag. "
"Must start with 'v' or 'V'".format(
v=version
)
)
Expand Down
2 changes: 2 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.. _change-log:

.. include:: ../CHANGELOG.rst
4 changes: 3 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ Semver |version| -- Semantic Versioning

install
usage/index
migratetosemver3
migration/index
advanced/index
development
api

Expand All @@ -31,6 +32,7 @@ Semver |version| -- Semantic Versioning
changelog
changelog-semver2


Indices and Tables
==================

Expand Down
9 changes: 9 additions & 0 deletions docs/migration/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Migrating to semver3
====================


.. toctree::
:maxdepth: 1

migratetosemver3
replace-deprecated-functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
Migrating from semver2 to semver3
=================================

This chapter describes the visible differences for
This document describes the visible differences for
users and how your code stays compatible for semver3.

Although the development team tries to make the transition
to semver3 as smooth as possible, at some point change
is inevitable.

For a more detailed overview of all the changes, refer
to our :ref:`changelog`.
to our :ref:`change-log`.


Use Version instead of VersionInfo
Expand Down
4 changes: 0 additions & 4 deletions docs/usage/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,3 @@ Using semver
determine-version-equality
compare-versions-through-expression
get-min-and-max-of-multiple-versions
deal-with-invalid-versions
replace-deprecated-functions
display-deprecation-warnings
create-subclasses-from-version
1 change: 1 addition & 0 deletions tests/coerce.py
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import semver

sys.path.insert(0, "docs/usage")
# sys.path.insert(0, "docs/usage")

from coerce import coerce # noqa:E402
from semverwithvprefix import SemVerWithVPrefix # noqa:E402
Expand Down
1 change: 1 addition & 0 deletions tests/semverwithvprefix.py