The current tox setup results in an 'editable-wheel' install which,
while it works, generates unhelpful warnings. Switch to the 'editable'
type which is what you got under tox <= 4.
While we are reducing noise in the logs, correctly setup
openstack_elections.templates as a module. We need it as a module as
we rely on Jinja2 to be able to use the module loader to locate the
templates.
Change-Id: Icbdca2f72c0777c587d6f95b3fab1911be179f97
tox.ini started failing with Tox4 which had some
incompatible changes. One of the reason for failure
is due to the skipsdist = True with usedevelop and it
seems it was never supported.
Change-Id: If70b1a8b17bd925b04b35366ff80fd5dacf19c3c
The docs requirements migrated to doc/requirements.txt
we need not install things from requirements.txt.
Change-Id: I7990b24861546bcc54f3286e57e22b8acd270382
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
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>
So as to increase transparency of the candidate verification checks,
add a --verbose option to all of the various candidate checking
command scripts. Supplying it once returns check result URLs for
clarity, while adding it twice also displays the query URLs used.
Set double verbosity for the check review tox testenv, to aid
election officials in reviewing nominees for valid candidacy.
Also update the Gerrit and Git URLs for the OpenDev transition and
correct a couple of docstrings for utility functions.
Change-Id: I5f6fa4e2c2c6058ba5090078bbdf9dd9f31f692e
When running 'tox' on a system where 'python3' is any version of python
other that 3.5 tox will complain that the py35 testenv isn't py35 ...
for example:
[tony@thor election]$ tox -r
/usr/lib/python3.7/site-packages/tox/config.py:570: UserWarning: conflicting basepython version (set 37, should be 35) for env 'py35';resolve conflict or set ignore_basepython_conflict proposed_version, implied_version, testenv_config.envname
/usr/lib/python3.7/site-packages/tox/config.py:570: UserWarning: conflicting basepython version (set 37, should be 27) for env 'py27';resolve conflict or set ignore_basepython_conflict proposed_version, implied_version, testenv_config.envname
docs recreate: /home/tony/tmp/election/.tox/docs
<snip>
________________________________________________ summary _________________________________________________
docs: commands succeeded
linters: commands succeeded
py35: commands succeeded
py27: commands succeeded
congratulations :)
[tony@thor election]$ for py in .tox/py*/bin/python ; do $py --version ; done
Python 3.7.3
Python 3.7.3
As you can see the py35 and py27 interpreters are both in fact py37.
Update tox.ini to that we can enforce python3 but still test on py35 and
py37. While ther update the default envlist to remove py27 as that will
always fail since I20184300f0a6cb6d230428cafc49f1b917376380 merged.
As we're using ignore_basepython_conflict we need to set the tox
minvcersion to 3.1.0 as that's the earliest version with that support
Change-Id: Ia23682a285f6ee539dbeb9e1eb790cad8575da25
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