41 Commits

Author SHA1 Message Date
Tristan Cacqueray
e6d699de43 Show Pike PTL candidate list
Change-Id: I1279ad2f67a9f50a9485f79c1f75477ac0b2025c
2017-01-17 09:01:58 +00:00
Tony Breeds
faca18b891 Use anonymous links for candidates
When building docs if a single candidate runs for PTL of multiple projects
sphinx will generate warnings like:

 .../openstack/election/doc/source/ocata/ptl.rst:3: WARNING: Duplicate explicit target name: "tony breeds (tonyb)".
 .../openstack/election/doc/source/ocata/ptl.rst:3: WARNING: Duplicate explicit target name: "tony breeds (tonyb)".
 .../openstack/election/doc/source/ocata/ptl.rst:3: WARNING: Duplicate explicit target name: "tony breeds (tonyb)".

Make the candidate links anonymous to avoid those warnings.

Even though it can't be a problem for the TC make those links anonymous for
consistency

Change-Id: I5a812db7f9ac1438b79db0cd8c77f8850c1922bf
2017-01-05 12:57:03 +11:00
Tony Breeds
a3ac4a90f8 Support for running tools under python3
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
2017-01-05 12:57:03 +11:00
Tristan Cacqueray
5ddf83e255 Prepare Pike PTL election
Change-Id: I8cfecd165bf7e3741d08e53e30f3637d2914a458
2016-12-21 08:53:23 +00:00
Tristan Cacqueray
df232c3074 Refactor all parameters to configuration.yaml
This change moves parameter from utils.py and index.rst to the
configuration.yaml. Moreover this change does:

* Use ISO 8601 dateformat in configuration
* Change events extension to use datetime instead of calendar
* Add a configuration extension to render doc substitutions

Change-Id: Ie35cb9ae2c334814afaa36b3afd606c8bcf62616
2016-11-09 03:24:26 +00:00
Tristan Cacqueray
4d473dc0bd Refactor timeline structure
This change modifies the timeline structure to describe a
start and end date instead of two different events.

Moreover this change adds:
* the number of days remaining until the next event.
* a 'next' status when current event haven't started yet

Change-Id: Ib76b0315a7409a8442c1be6f8341b0596c1d56ae
2016-11-09 03:18:01 +00:00
Tristan Cacqueray
c97fdd8b65 Render rst file to doc/source
This change renders dynamic rst file to doc/source instead of candidate directory
so that they gets published by infra docs jobs. This is just to be able to access
the source rst file on docs-draft.openstack.org host.

Change-Id: I2435531d091ff051338c4ba9a495834d6653ab68
2016-11-09 03:12:51 +00:00
Jenkins
bd45d98c79 Merge "Switch to hacking and fix errors" 2016-10-17 22:02:23 +00:00
Jenkins
9e372524a0 Merge "Fix flake8 issues" 2016-10-17 22:01:12 +00:00
Jenkins
7c9e2987c4 Merge "Change openstack election contact channel" 2016-10-17 21:57:20 +00:00
Tristan Cacqueray
09b47fea08 Add TC results
Change-Id: I5df7d84d6075074dd40fe2408bd2930ffd89d54b
2016-10-09 23:46:19 +00: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
8f8df0c950 Fix flake8 issues
linters runtests: commands[0] | yamllint configuration.yaml
 configuration.yaml
   1:1       warning  missing document start "---"  (document-start)

 linters runtests: commands[1] | flake8
 ./doc/source/_exts/candidates.py:17:1: F401 'urllib' imported but unused

Change-Id: I3cd150940f8dbf6d8f828f69361689cbf417fd98
2016-10-06 11:21:04 +11:00
Nate Johnston
6bad6a8e4e Change openstack election contact channel
Per previous discussions, the proper contact point for Openstack
election questions should be the #openstack-dev IRC channel, not
the #openstack-election IRC channel.

Change-Id: I86c4eeecf601b33c96325cad3a39bdd31a9e922b
2016-10-04 19:51:54 +00:00
Tristan Cacqueray
72e0775ae7 Add close-election utility and archive rendering
* close-election [ptl|tc] generate a yaml archive in doc/source
* docs render the results pages based on the archive
* add documentation about the whole election officials process

Change-Id: I8f737f33befc1e8af52dac9c059f73e2874eb5f8
2016-09-30 01:41:47 +00:00
Jenkins
20ef03f214 Merge "Move build_candidates_list to module" 2016-09-28 05:08:53 +00:00
Tristan Cacqueray
b00ff36d79 Move build_candidates_list to module
Change-Id: Ie5af6ae71bb98c3978f9b1892601bfdc4fb9855a
2016-09-28 02:02:16 +00:00
Tristan Cacqueray
511d28b016 Fix Monasca's candidate ircname
Change-Id: I5e43796f5299ae5481b357ef21e61aa6562df715
2016-09-26 01:09:05 +00:00
Tristan Cacqueray
d461c157af Only force first letter of fullname to be upper
This change enforce the first and last component
of a fullname to start with an uppercase letter.
This is to keep user's custom capitalisation such as:

* middle name should be lower-case
* keep in-middle uppercase such as "McGinnis"

Change-Id: Ifdad9f05c0d74d18396e9b06bd57c1c0f391be8d
2016-09-26 00:34:16 +00:00
Tristan Cacqueray
54c26df7d8 Close PTL election and add results
Change-Id: I83ef84f1e0728b54bd30b980a7d2c8caaed20fc6
2016-09-25 23:58:38 +00:00
Tony Breeds
7bb5f567ec Save the candidates email address
Currently we don't need to do this thing but it's the only piece of data
missing that prevents us from scripting an updte to projects.yaml in the
openstack/governance repo

Change-Id: Ia346cef333158f4a6f2c57e519d4ad58045e3a1a
2016-09-21 10:31:21 +10:00
Tristan Cacqueray
257d3e3e08 Add configuration.yaml
This change refactor events.yaml into something more generic and
usable by openstack_election module

Change-Id: I26e25cb31c60645742baba1e73f8da9043029381
2016-09-14 11:25:07 +00:00
Tony Breeds
7178c7b1e1 Escape `'s in strings.
Samuel Cassiba's IRC 'sc`' contains a ` which has special meaning in RST
Escape the URL and strings as passed to sphinx to render correctly.

Note: if we discover similarly problematic characters we'll need to create a
more comprehensive escape function.

Change-Id: I4634457b7251ca96fde91b48a09538fccb721374
2016-09-13 01:04:05 +00:00
Tristan Cacqueray
6698ffe6a4 Use gerrit fullname in list rendering
This change improves candidate list rendering using gerrit to retrieve fullname.
The list rendering now uses the openstack_election libraries and some part
have been refactored accordingly.

Change-Id: Iccba3e4c529740758323b51548a2144fc7c77879
2016-09-12 08:37:13 +00:00
Jenkins
033f72c4a1 Merge "Move PreferredEmailDeadLine to Sept 18" 2016-09-12 00:49:56 +00:00
Tristan Cacqueray
60ce5da122 Move PreferredEmailDeadLine to Sept 18
Change-Id: I6082c6f96203de30b9ba8c95f8f830263bc67274
2016-09-10 09:30:57 +00:00
Tristan Cacqueray
2709992456 Refactor sphinx candidate list rendering
This change now uses the new schema to render candidate
list including ircname.

Moreover this change introduces an exceptions.txt file to
manage candidacies exception where a candidate isn't the
git commit author of a candidacy statement. In such case
the candidacy needs to be manually verified and the candidate
fullname needs to be added to the exceptions.txt.

Change-Id: I2e59f4880d34cdb09321dbc110ecf5a103f81dff
2016-09-09 14:29:23 +00:00
Tristan Cacqueray
176a434465 Import wiki content
Change-Id: I3aea9f141299668d837f728a216809d955ab52d2
2016-09-02 07:38:52 +00:00
Tristan Cacqueray
be2a3afc4c Prepare Ocata election
This change also includes a new tool to automate election preparation

Change-Id: I98049db7c0b665992d408c78e62e99f4a36e3a60
2016-09-02 07:36:29 +00:00
Tristan Cacqueray
636ff1ea64 Prepare TC round
Change-Id: I765cc4d088738d519b73619c166781d0bdbf28e3
2016-03-24 16:39:05 -04:00
Jenkins
a852872399 Merge "Not use deprecated library function os.popen()" 2016-03-15 15:46:18 +00:00
Jenkins
f526acec43 Merge "Add 'draft' banner and show events status in timeline" 2016-03-11 03:46:20 +00:00
Tony Breeds
154bedd5bd Fix PEP8 Errors
Change-Id: Ieb831fbb2c27e0b6428227845dfa9b7a7c7fa2bf
2016-03-11 13:45:16 +11:00
Tristan Cacqueray
e8a09b0b7d Add 'draft' banner and show events status in timeline
Change-Id: I383b5b67e09d84a64ef234727dae8b973c13599d
2016-03-10 20:49:20 -05:00
Tristan Cacqueray
7b3f1e73ef Prepare Newton election
Change-Id: I848039ab206c270f5dfa07e534900393467e0a47
2016-03-03 16:32:53 -05:00
Tristan Cacqueray
e7f05ce2c4 Add events timeline and clock timer
This changes add a new 'events' extensions to manage
events timeline. Events are described in the events.yaml file.

The 'events' extensions will generate an rst document with:
* Timer clock for upcoming event
* Tabulated events list

Change-Id: Ib5c9d96663bd2197beea7aab226a3d46bc82067c
2016-02-24 10:47:54 +11:00
ting.wang
368dc1ae0b Not use deprecated library function os.popen()
os.popen() is deprecated since python 2.6.
Resolved with use of subprocess module.

Change-Id: Id0dd898bffe7521eb55044ec62bf24a7d59b6641
2016-01-14 15:18:10 +08:00
Tristan Cacqueray
5fe5d0a0b8 Minor improvements to docs job output
Change-Id: I5523d430d4d3eeb771da931f62cb4cc1936e313b
2015-09-13 09:36:42 -04:00
Tristan Cacqueray
1fbae32077 Make sure candidate names are properly capitalized
Change-Id: I3f7ef0571f0b598739dea22d9a9bfd37603bd7af
2015-09-11 11:03:11 -04:00
Tristan Cacqueray
3f3a30a819 Fix candidate name's space
Change-Id: Iea4f6feb0af64e078c37e8c957ca7c0ea4b8adef
2015-09-10 21:26:31 -04: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