Now that the last tool that needed python2 has been checked/fixed lets
remove all the python2 infrastructure and make all library users exit if
run under python2
Change-Id: I20184300f0a6cb6d230428cafc49f1b917376380
By default ci_check_all_candidate_files.py, does as it implies and
checks all candidates for the current election.
Add new operation modes for:
1. Checking all files for the current git commit '--HEAD'
2. Checking all files specified on the command line
We also add a voting job on the check pipeline only for validating
the current review. Local users are encouraged to use this as:
tox -e ci-checks-review ; or
tox -e ci-checks-review -- path/to/file
Change-Id: I0c82c59409bb58169840de42c02072aeae182b2b
Co-authored-by: Doug Hellmann <doug@doughellmann.com>
Use the new PTI docs building commands, these use "tox -e docs" for
building, also update the publishing job.
Update tox.ini to use sphinx-build directly as documented in the PTI.
Note that we have to disable warnings, otherwise building fails with:
doc/source/results/ocata/ptl.rst:3:Duplicate explicit target name: "tony breeds (tonyb)".
Be aware that with current pbr and Sphinx, warnings are disabled due to
change of parameter names - so, this keeps the status quo.
Depends-On: https://review.openstack.org/615501
Needed-By: https://review.openstack.org/615637
Change-Id: I4713f3a25e08056b7bce9812fa2cf62119330fcc
Set all the tox environments to be python3 *except* venv2.
Set the trove data mostly because we can.
Change-Id: Ib65e84c7da16683f70657a3bc8e9b9ccdb8f1c8a
I suggest we leave this as non-voting for this PTL election manually
verify the results. Once we're confident we can upgrade it to voting.
Change-Id: I01ad9c76ab68e8282acb4bcc66a2eb7c57596171
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
Instead of pulling owners.py from the system-config repo, start
using the local copy provided by the openstack_election package.
Change-Id: I180ef0e5ec880b46f0427c1c952b640a780b5732
If we run the tools (create-directories or check-all-candidacies) under
python3 they'll fail with silly errors (like[1]). This is because we
have a number of assumptions they we'll be running under python2 like:
- pickle.protocol: we done specify one so if we write a pickle file
from python3 we can't read it in python2.
- urllib and urlparse: those modules change paths in python 2 or 3 so
use the six helpers to get the bits we want.
- Explicitly write files in binary format
- Various str vs bytes issues
- dict().keys() returns dict_keys under python3 explictly cast that to
list()
After addressing these issues we can run the tools under either python2
or python3. To make this easy to check create explicit ven2 and venv3
test environments, leaving all other testenvs to use the system default.
[1] http://paste.openstack.org/show/593823/
Change-Id: I20334a52500847c810b486c9c8b108e75a5d6303
./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
This change refactor events.yaml into something more generic and
usable by openstack_election module
Change-Id: I26e25cb31c60645742baba1e73f8da9043029381
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
The linters tox environment will run yamllint and flake8.
Also fix a few trivial issues so the new target passes
Change-Id: Ifa1e9379f7d1d1996f2cfb84233bce8b502979bb