Commit Graph

21 Commits

Author SHA1 Message Date
Daniel Garcia Moreno 06cd5abff4 Remove deprecated sphinx-testing dependency
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
2022-10-03 12:36:17 +02:00
zhoulinhui 859f766a2e Fix hacking min version to 3.0.1
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
2020-10-06 17:53:57 +08:00
Hervé Beraud 093c9f2f90 Adding pre-commit
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>
2020-09-15 15:00:05 +02:00
Zuul d4a68afadc Merge "Update sphinx-testing requirements to >=1.0.1" 2020-04-14 12:48:38 +00:00
Andreas Jaeger 8cb0072adb Update hacking for Python3
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
2020-03-30 12:01:47 +00:00
Akihiro Motoki b5ffcc302c Update sphinx-testing requirements to >=1.0.1
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
2020-03-29 12:54:17 +09:00
ZhijunWei 0228eb9ae3 Update hacking version
Use latest release 1.1.0 and compatible changes w.r.t pep8

Change-Id: I16071db752ab50d42127dca07d68130fea7474ce
2019-01-06 18:12:47 +08:00
Graham Hayes d6805491ed General overhaul of testing setup
- 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>
2018-06-18 14:36:12 +01:00
Andreas Jaeger 801515b979 Use openstackdocstheme
Get rid of oslosphinx, use openstackdocstheme instead like we do
in all other docs projects.

Change-Id: I4d9be1d6d02a075f36fc81e302b4ec8a92adf769
2018-01-21 16:01:40 +01:00
OpenStack Proposal Bot 165608b546 Updated from global requirements
Change-Id: Ic30151bd6b817adc01ca9ed1492f7060ec4daae8
2017-11-16 11:19:44 +00:00
OpenStack Proposal Bot 604294427e Updated from global requirements
Change-Id: I07ada0916c6b4b1d4eb705e41e19f2369febcd84
2017-09-13 12:59:56 +00:00
OpenStack Proposal Bot 01c4c9719b
Updated from global requirements
Change-Id: I265dc12ea83f23620bedba986fa13685b2ee9203
2017-05-16 17:32:32 +01:00
OpenStack Proposal Bot d66cb0fe62 Updated from global requirements
Change-Id: Ibbee70196b276c77a65239b5306b9959428450cd
2017-03-03 00:02:21 +00:00
ricolin 32f1083b85 [Fix gate]Update test requirement
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
2017-03-02 22:05:31 +08:00
OpenStack Proposal Bot f694119d39 Updated from global requirements
Change-Id: I40c90da5ecc00fc01cf7c18848d03ffef49244ab
2016-11-01 13:33:36 +00:00
Dirk Mueller 533589ccd0 Sync with global-requirements
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
2016-09-29 17:06:28 +02:00
Thomas Bechtold 34a7f1b668 Use beautifulsoup4 instead of bs4 in test-requirements.txt
beautifulsoup4 is already in global-requirements and bs4 is just a dummy
package.

Change-Id: Ief02165797f6aae47805656d50c249aaa3fe71ad
2016-09-05 10:51:02 +02:00
Ondřej Nový f9c23367fe Moved sphinx from test requirements to requirements
It's used in os_api_ref/__init__.py, so it's runtime dependency

Change-Id: I07212af95d04353966db5ddd73be652ec4b75d1e
2016-07-16 13:44:48 +02:00
Sean Dague 8fab9214df add first basic unit test
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
2016-05-26 06:31:51 -04:00
Sean Dague 8f42a7f842 trim test-requirements.txt
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
2016-05-13 19:54:23 -04:00
Sean Dague 6e03e0b62d Initial Cookiecutter Commit.
Change-Id: I28402285aaeecd4eb85415a39763b2798fcfa33c
2016-05-13 19:54:08 -04:00