This patch replaces the sphinx-testing package using the SphinxTestApp
provided by the Sphinx package.
The sphinx-testing package is deprecated and should be replaced with
the sphinx.testing package that's bundled with Sphinx.
Change-Id: I60b4d1a8b83dc35c394e29d746a2fbb3ff744c1a
flake8 new release 3.8.0 added new checks and gate pep8
job start failing. hacking 3.0.1 fix the pinning of flake8 to
avoid bringing in a new version with new checks.
Though it is fixed in latest hacking but 2.0 and 3.0 has cap for
flake8 as <4.0.0 which mean flake8 new version 3.9.0 can also
break the pep8 job if new check are added.
To avoid similar gate break in future, we need to bump the hacking min
version.
- http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014828.html
Change-Id: I3433e903d2a1484d97c3eeed21955324fe8a33a9
Introduced changes:
- pre-commit config and rules
- Add pre-commit to pep8 gate, Flake8 is covered in the pre-commit hooks.
- Applying fixes for pre-commit compliance in all code.
Also commit hash will be used instead of version tags in pre-commit to
prevend arbitrary code from running in developer's machines.
pre-commit will be used to:
- trailing whitespace;
- Replaces or checks mixed line ending (mixed-line-ending);
- Forbid files which have a UTF-8 byte-order marker (check-byte-order-marker);
- Checks that non-binary executables have a proper
shebang (check-executables-have-shebangs);
- Check for files that contain merge conflict strings (check-merge-conflict);
- Check for debugger imports and py37+ breakpoint()
calls in python source (debug-statements);
- Attempts to load all yaml files to verify syntax (check-yaml);
- Run flake8 checks (flake8) (local)
For further details about tests please refer to:
https://github.com/pre-commit/pre-commit-hooks
Change-Id: Ib2e545d2dc93e18055ade232599e76f319a44e6b
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.
Fix problems found by updated hacking version.
Change-Id: I4a4ec207f87d3afb58b6427825ce9b3872823008
During the investigaion of the mailing list thread [1],
it turns out that our test does work with sphinx-testing<1.0.1
and requires sphinx-testing==1.0.1.
read_text() method is from sphinx_testing.path.path class but
str is returned as app.outdir in test setUp() with sphinx-testing<1.0.1.
[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-March/013653.html
Change-Id: I35d6d4bed2e069a51794cc2a9baa8288869d894e
- Moved to py3 by default
- Moved to testr
- Updated docs venv to match PTI
- Fixed a slight py3 compat issue
- Added py35 and py36 jobs
Change-Id: Id3a8c1c30ecfe9b6538bff6357aecca7ecd0ed81
Signed-off-by: Graham Hayes <gr@ham.ie>
Since pbr already landed and the old version of hacking seems not
work very well with pbr>=2, we should update it to match global
requirement.
Partial-Bug: #1668848
Change-Id: I6c7fc3cf730a5a1fcb4b40ccc406808e224dc30b
We currently have a pending conflict over the Sphinx version in g-r,
so sync with g-r manually. Overall I would suggest that this project
should follow g-r
Change-Id: I0bf1af38945ba3e52098a925ea31f6f1dc3f3fbd
This creates an simple stab at a pattern for building testing for
os-api-ref. The basic theory is that we'll create a set of example
directories that are full doc trees with markup. We can then build
them and test the HTML output.
HTML output testing is done using BeautifulSoup so we can get
normalized HTML snippets regardless of whitespace and wrapping.
Change-Id: Idf582d62a4353db74b31183869f80bbf01b5d0f0
This trims test-requirements.txt. This is still overkill given that
there are no tests besides pep8 that run, but it's closer to what I
expect we'll land at.
Change-Id: I4e8a1e1d9877372eeaa3f78cb57a99d4636a0e97