Commit Graph

15 Commits

Author SHA1 Message Date
Hervé Beraud c08aed239d Use unittest.mock instead of mock
The mock third party library was needed for mock support in py2
runtimes. Since we now only support py36 and later, we can use the
standard lib unittest.mock module instead.

Change-Id: I0b5e9e60b00204f938d23fc4ff8e020ebb4afa43
2020-09-15 17:44:21 +00:00
Andreas Jaeger 546b046800 Switch to newer openstackdocstheme version
Switch to openstackdocstheme 2.2.1 version. Using
this version will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems

Update Sphinx version as well.

Disable openstackdocs_auto_version to not auto-version the documents.

Disable openstackdocs_auto_name to use 'project' variable as name.

Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.

openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.

See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html

Remove python 2.7 stanza from setup.py, cleanup tox.ini for python3,
update hacking version and fix problem found.

Change-Id: Ic0721e60f6583abb52bb665fbf113c8017318e2c
2020-06-10 16:59:45 +02:00
Andreas Jaeger e3ccd8c862 Update hacking for Python3
The repo is Python 3 now, so update hacking to version 2.0 which
supports Python 3.

Change-Id: I3d857320e06ffef7e00d8cc6261f24bc1bff991a
2020-03-28 12:36:34 +01:00
Sean McGinnis eb4fcd7bf0 Use doc-only requirements
Doc requirements are not needed for unit test runs. This moves doc
requirements into the recommended doc/requirements.txt location and
updates the tox target to pull from there.

Change-Id: I06761a6090d64ae1be5065727f7f56ede14c8d13
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-03-26 10:16:58 -05:00
Thierry Carrez 39137e66d6 Inherit openstackdocstheme for governance.o.o
All governance subwebsites switched from using an old
oslosphinx-based theme to inheriting from openstackdocstheme
instead. Also switch the election website for consistency.

Depends-On: https://review.openstack.org/611761
Change-Id: I3ec2ff2bc2ec6683919ea6541fd657cdc8723df8
2018-10-19 03:52:27 +00:00
Zuul 6d5c4f4f3a Merge "Switch to stestr" 2018-07-25 21:39:25 +00:00
Tony Breeds 51a07ff74f Add a testing fixture to capture outputs during test runs
And use the new fixture for all Election tests

Change-Id: I3b431f33f5f47db0e755670e4a5ef971dfdc8d04
2018-07-25 16:13:00 +10:00
Vu Cong Tuan 94fbee1ec8 Switch to stestr
According to Openstack summit session [1],
stestr is maintained project to which all Openstack projects should migrate.
Let's switch to stestr as other projects have already moved to it.

[1] https://etherpad.openstack.org/p/YVR-python-pti

Change-Id: I255684ebe0c2d59c4141eeec12ac346bfcf477b2
2018-07-05 13:31:26 +07:00
Tony Breeds f8a5d5bdbb Update requirements to be in line with current versions
Change-Id: I48a39a91921255784bc9635da2f2e06acab593ea
2017-10-02 09:07:47 +11:00
Tony Breeds 7da752110a Switch to hacking and fix errors
./doc/source/_exts/candidates.py:20:1: H306  imports not in alphabetical order (jinja2.filesystemloader, jinja2.environment.environment)
./doc/source/_exts/events.py:17:1: H306  imports not in alphabetical order (os, calendar)
./doc/source/_exts/events.py:21:1: H306  imports not in alphabetical order (jinja2.filesystemloader, jinja2.environment.environment)
./openstack_election/check_candidacy.py:62:29: E126 continuation line over-indented for hanging indent
./openstack_election/utils.py:27:1: H306  imports not in alphabetical order (yaml, re)
./openstack_election/cmds/close_election.py:90:9: H232  Python 3.x incompatible octal 755 should be written as 0o755
./openstack_election/tests/test_utils.py:25:21: E126 continuation line over-indented for hanging indent
./tools/new-election.py:18:31: H301  one import per line
./tools/new-election.py:27:5: H233  Python 3.x incompatible use of print operator
./tools/new-election.py:31:5: H233  Python 3.x incompatible use of print operator
./tools/new-election.py:41:5: H233  Python 3.x incompatible use of print operator

Co-Authored-By: Nguyen Hung Phuong <phuongnh@vn.fujitsu.com>
Change-Id: Idd9bc1f1f92da1658e6da2af588c575ee0ba2cb0
2016-10-07 13:35:46 +11:00
Tony Breeds b285d3dd9c Make openstack_election look more like a python module
Currently the code in this repo is half modular have series of scripts.
Migrate the code to be more modular.  The main benefit to this is
testing is easier.

Testing is added in a followup patch

Change-Id: Ic1262436147ecdb818ee259e2e85fca8df09d722
2016-09-12 15:35:40 +10:00
Tony Breeds df4eb69e66 Add a linters tox environment
The linters tox environment will run yamllint and flake8.

Also fix a few trivial issues so the new target passes

Change-Id: Ifa1e9379f7d1d1996f2cfb84233bce8b502979bb
2016-09-12 15:12:55 +10:00
Tony Breeds ad1744671d Add updates from global-requirements
Change-Id: I5766cb59650a9fa6fb8e2326c7986316d37bcc1c
2016-03-11 13:45:45 +11:00
Tony Breeds cdbc906dc9 Validate extra-atcs
Change-Id: I7c3324d73a4fc18329270f845aba6904d3f9a539
2016-03-11 13:45:10 +11:00
Tristan Cacqueray fe3378c68f Cargo-culting doc building from openstack/ossa
* Directories tree for mitaka projects
* Tools to check candidacy
* Generate candidates lists

Change-Id: I784bc4a3a06d3d7506df6d2ef7e6b0362f7696b9
2015-09-10 13:32:36 -04:00