Skip to content
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

Review documentation #59

Merged
merged 38 commits into from
Dec 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
c8e19d8
Review formatting of the changelog and include it in the source
RKrahl May 10, 2020
0862cda
Minor changes to the documentation.
RKrahl May 10, 2020
235a5d3
Merge branch 'develop' into doc
RKrahl May 17, 2020
2807908
Merge branch 'develop' into doc
RKrahl Feb 21, 2021
886c254
Add an example on how to implement an or-like dependency. Ref. #53, #57
RKrahl Dec 24, 2021
2ad740b
Minor edit in docstring
RKrahl Dec 24, 2021
76145ef
Merge branch 'develop' into doc
RKrahl Dec 24, 2021
0e7ef81
Merge branch 'develop' into doc
RKrahl Dec 25, 2021
77b9c1e
Fix typos in the documentation
RKrahl Dec 25, 2021
5adffde
Add a documentation section on logical combinations of dependencies
RKrahl Dec 25, 2021
a8cb125
Add test for the logical combinations of dependencies example
RKrahl Dec 25, 2021
65dc1f5
Document that the dependency marker may be applied to a class as a
RKrahl Dec 25, 2021
b945b95
Add a warning that the documented solution for logical combinations of
RKrahl Dec 27, 2021
291b7bb
Merge branch 'develop' into doc
RKrahl Dec 29, 2021
1d88f4d
Start writing a debugging guide
RKrahl Dec 26, 2021
58ff4ff
Expand the debugging example, including several samples of potential
RKrahl Dec 27, 2021
10f9e61
Add detailed discussion of the example in the debugging guide
RKrahl Dec 28, 2021
46e6a8f
Merge branch 'doc' into doc-debug
RKrahl Dec 31, 2021
9bf329b
Add test for the debugging example
RKrahl Dec 29, 2021
190b920
Merge branch 'doc-debug' into doc
RKrahl Dec 31, 2021
b913403
Skip test_debugging in Python 2.7
RKrahl Dec 31, 2021
1a1cfda
Remove spurious white space
RKrahl Dec 31, 2021
87c06c5
Typo in comment
RKrahl Dec 31, 2021
c77ae89
Require enum34 for the tests with Python 2.7
RKrahl Dec 31, 2021
e9b55fa
Add a hint on pytest-order to the install instructions
RKrahl Jan 9, 2022
979f01b
Merge branch 'develop' into doc
RKrahl Feb 17, 2022
c4b801e
Merge branch 'develop' into doc
RKrahl Dec 30, 2023
3408212
Add GitHub action to check ReST input files
RKrahl Dec 30, 2023
44f1efd
Add sphinx_copybutton extension
RKrahl Dec 30, 2023
f9600db
Merge branch 'develop' into doc
RKrahl Dec 31, 2023
3648042
Restrict running ReST lint on push to branches develop and master
RKrahl Dec 31, 2023
695ea27
Update install instructions
RKrahl Dec 31, 2023
eb48f32
Fixup 695ea27: trailing whitespace
RKrahl Dec 31, 2023
463227e
Review README and bump copyright year
RKrahl Dec 31, 2023
346a344
Move the changelog to the end, after the API reference
RKrahl Dec 31, 2023
f11cf56
Rewrite introduction to the debugging guide
RKrahl Dec 31, 2023
e2edf54
Explicitely set language to 'en'
RKrahl Dec 31, 2023
38baf8c
Update changelog
RKrahl Dec 31, 2023
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
17 changes: 17 additions & 0 deletions .github/workflows/rst-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Check ReST input files
on:
push:
branches:
- develop
- master
pull_request:
jobs:
doc8:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: doc8-check
uses: deep-entertainment/doc8-action@v4
with:
scanPaths: "doc/src"
1 change: 1 addition & 0 deletions .rtd-require
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
git-props
pytest >=3.7.0
setuptools
sphinx-copybutton
sphinx_rtd_theme
216 changes: 216 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,216 @@
Changelog
=========

dev (not yet released)
~~~~~~~~~~~~~~~~~~~~~~

Documentation
-------------

+ `#39`_, `#41`_, `#59`_: Review documentation

Incompatible changes
--------------------

+ Drop support for Python 2.

Bug fixes and minor changes
---------------------------

+ `#40`_: add logging.
+ `#50`_, `#51`_: test suite incompatibility with pytest 6.2.0.
+ `#58`_: declare the type of automark_dependency ini-option correctly
as bool.

Internal
--------

+ `#75`_: review build tool chain.

.. _#39: https://github.com/RKrahl/pytest-dependency/issues/39
.. _#40: https://github.com/RKrahl/pytest-dependency/issues/40
.. _#41: https://github.com/RKrahl/pytest-dependency/issues/41
.. _#50: https://github.com/RKrahl/pytest-dependency/issues/50
.. _#51: https://github.com/RKrahl/pytest-dependency/pull/51
.. _#58: https://github.com/RKrahl/pytest-dependency/pull/58
.. _#59: https://github.com/RKrahl/pytest-dependency/pull/59
.. _#75: https://github.com/RKrahl/pytest-dependency/pull/75

0.5.1 (2020-02-14)
~~~~~~~~~~~~~~~~~~

Bug fixes and minor changes
---------------------------

+ Fix failing documentation build.

0.5.0 (2020-02-14)
~~~~~~~~~~~~~~~~~~

New features
------------

+ `#3`_, `#35`_: add a scope to dependencies.
(Thanks to JoeSc and selenareneephillips!)

Incompatible changes
--------------------

+ Require pytest version 3.7.0 or newer.

Bug fixes and minor changes
---------------------------

+ `#34`_: failing test with pytest 4.2.0 and newer.

+ Use setuptools_scm to manage the version number.

.. _#35: https://github.com/RKrahl/pytest-dependency/pull/35
.. _#34: https://github.com/RKrahl/pytest-dependency/issues/34
.. _#3: https://github.com/RKrahl/pytest-dependency/issues/3

0.4.0 (2018-12-02)
~~~~~~~~~~~~~~~~~~

Incompatible changes
--------------------

+ Require pytest version 3.6.0 or newer. This implicitly drops
support for Python 2.6 and for Python 3.3 and older.

Bug fixes and minor changes
---------------------------

+ `#24`_, `#25`_: get_marker no longer available in pytest 4.0.0.
(Thanks to Rogdham!)

+ `#28`_: Applying markers directly in parametrize is no longer
available in 4.0.

.. _#28: https://github.com/RKrahl/pytest-dependency/issues/28
.. _#25: https://github.com/RKrahl/pytest-dependency/pull/25
.. _#24: https://github.com/RKrahl/pytest-dependency/issues/24

0.3.2 (2018-01-17)
~~~~~~~~~~~~~~~~~~

Bug fixes and minor changes
---------------------------

+ `#5`_: properly register the dependency marker.

+ Do not add the documentation to the source distribution.

.. _#5: https://github.com/RKrahl/pytest-dependency/issues/5

0.3.1 (2017-12-26)
~~~~~~~~~~~~~~~~~~

Bug fixes and minor changes
---------------------------

+ `#17`_: Move the online documentation to Read the Docs.

+ Some improvements in the documentation.

.. _#17: https://github.com/RKrahl/pytest-dependency/issues/17

0.3 (2017-12-26)
~~~~~~~~~~~~~~~~

New features
------------

+ `#7`_: Add a configuration switch to implicitly mark all tests.

+ `#10`_: Add an option to ignore unknown dependencies.

Incompatible changes
--------------------

+ Prepend the class name to the default test name for test class
methods. This fixes a potential name conflict, see `#6`_.

If your code uses test classes and you reference test methods by
their default name, you must add the class name. E.g. if you have
something like:

.. code-block:: python

class TestClass(object):

@pytest.mark.dependency()
def test_a():
pass

@pytest.mark.dependency(depends=["test_a"])
def test_b():
pass

you need to change this to:

.. code-block:: python

class TestClass(object):

@pytest.mark.dependency()
def test_a():
pass

@pytest.mark.dependency(depends=["TestClass::test_a"])
def test_b():
pass

If you override the test name in the :func:`pytest.mark.dependency`
marker, nothing need to be changed.

Bug fixes and minor changes
---------------------------

+ `#11`_: show the name of the skipped test.
(Thanks asteriogonzalez!)

+ `#13`_: Do not import pytest in setup.py to make it compatible with
pipenv.

+ `#15`_: tests fail with pytest 3.3.0.

+ `#8`_: document incompatibility with parallelization in
pytest-xdist.

+ Clarify in the documentation that Python 3.1 is not officially
supported because pytest 2.8 does not support it. There is no known
issue with Python 3.1 though.

.. _#15: https://github.com/RKrahl/pytest-dependency/issues/15
.. _#13: https://github.com/RKrahl/pytest-dependency/issues/13
.. _#11: https://github.com/RKrahl/pytest-dependency/pull/11
.. _#10: https://github.com/RKrahl/pytest-dependency/issues/10
.. _#8: https://github.com/RKrahl/pytest-dependency/issues/8
.. _#7: https://github.com/RKrahl/pytest-dependency/issues/7
.. _#6: https://github.com/RKrahl/pytest-dependency/issues/6

0.2 (2017-05-28)
~~~~~~~~~~~~~~~~

New features
------------

+ `#2`_: Add documentation.

+ `#4`_: Add a depend() function to add a dependency to a test at
runtime.

.. _#4: https://github.com/RKrahl/pytest-dependency/issues/4
.. _#2: https://github.com/RKrahl/pytest-dependency/issues/2

0.1 (2017-01-29)
~~~~~~~~~~~~~~~~

+ Initial release as an independent Python module.

This code was first developed as part of a larger package,
`python-icat`_, at Helmholtz-Zentrum Berlin für Materialien und
Energie.

.. _python-icat: https://github.com/icatproject/python-icat
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include CHANGES.rst
include LICENSE.txt
include MANIFEST.in
include README.rst
Expand Down
73 changes: 8 additions & 65 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,61 +15,10 @@
pytest-dependency – Manage dependencies of tests
================================================

This pytest plugin manages dependencies of tests. It allows to mark
some tests as dependent from other tests. These tests will then be
skipped if any of the dependencies did fail or has been skipped.


Download
--------

The latest release version can be found `at PyPI`__.

.. __: `PyPI site`_


System requirements
-------------------

+ Python 3.4 and newer.
+ `setuptools`_.
+ `pytest`_ 3.7.0 or newer.

Optional library packages:

+ `git-props`_

This package is used to extract some metadata such as the version
number out of git, the version control system. All releases embed
that metadata in the distribution. So this package is only needed
to build out of the plain development source tree as cloned from
GitHub, but not to build a release distribution.

+ `distutils-pytest`_ >= 0.2

Only needed to run the test suite.


Installation
------------

1. Download the sources, unpack, and change into the source directory.

2. Build (optional)::

$ python setup.py build

3. Test (optional)::

$ python setup.py test

4. Install::

$ python setup.py install

The last step might require admin privileges in order to write into
the site-packages directory of your Python installation.

This module is a plugin for the popular Python testing framework
`pytest`_. It manages dependencies of tests: you may mark some tests
as dependent from other tests. These tests will then be skipped if
any of the dependencies did fail or has been skipped.

Documentation
-------------
Expand All @@ -87,13 +36,10 @@ Copyright and License

- Copyright 2013–2015
Helmholtz-Zentrum Berlin für Materialien und Energie GmbH
- Copyright 2016–2020 Rolf Krahl

Licensed under the Apache License, Version 2.0 (the "License"); you
may not use this file except in compliance with the License. You may
obtain a copy of the License at
- Copyright 2016–2023 Rolf Krahl

http://www.apache.org/licenses/LICENSE-2.0
Licensed under the `Apache License`_, Version 2.0 (the "License"); you
may not use this file except in compliance with the License.

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -102,9 +48,6 @@ implied. See the License for the specific language governing
permissions and limitations under the License.


.. _PyPI site: https://pypi.org/project/pytest-dependency/
.. _setuptools: http://pypi.python.org/pypi/setuptools/
.. _pytest: http://pytest.org/
.. _git-props: https://github.com/RKrahl/git-props
.. _distutils-pytest: https://github.com/RKrahl/distutils-pytest
.. _Read the Docs site: https://pytest-dependency.readthedocs.io/
.. _Apache License: https://www.apache.org/licenses/LICENSE-2.0
Loading
Loading