159 Commits

Author SHA1 Message Date
Jeremy Stanley
0e7cfb670b Replace empty IRC nicks in governance updates
In order to make the governance updates consistent with how empty
IRC nicks were indicated in projects.yaml previously, replace empty
values with the string "No nick supplied" instead.

Change-Id: I67cf2586f300dc65a23c80fef7d142bbe00eaafb
2019-09-05 20:27:34 +00:00
Jeremy Stanley
e57d8da921 Add appointment placeholders in governance updates
When no candidate is supplied for a PTL position, replace the PTL
entry for that project with a placeholder pending subsequent
governance changes in which the TC will set appointments.

Change-Id: I24ab692425f57d53669bc69094e72e744c868a25
2019-09-05 20:24:24 +00:00
Jeremy Stanley
c48852e3bb Detect values of None in utils.get_irc()
The intent for the get_irc() function is to return an empty string
when no nick is found, but the API tends to provide a null (None)
value explicitly. When this happens, convert it to the empty string
too.

Change-Id: I9b62b1d722136246d1987a1a45ca771bdc02579c
2019-09-05 20:22:39 +00:00
Jeremy Stanley
ebcd45e865 Py3K support for governance update script
Remove some string/binary conversion calls from the governance
update script which were only relevant for Python 2.7. We run these
under tox with a default Python 3.x interpreter now.

Change-Id: Icd2c8614d2bd5b9b2a1624afdfc6e6a1512346f9
2019-09-05 19:46:11 +00:00
Jeremy Stanley
444227b338 Add tc to combined_nominations_last_days template
Brown bag fix for an oversight, add the [tc] subject tag on the
combined_nominations_last_days E-mail announcement template.

Change-Id: I95ecb094abbb26efc6ab40885550e47aaf62f617
2019-09-02 17:11:21 +00:00
Jeremy Stanley
d6aaf5486b Add a combined_nominations_last_days E-mail template
This is a bit of a mashup from the individual TC and PTL election
templates for the nominations_last_days event.

Change-Id: I1ff77ccceb3fc19015c237a53dfe97dc9127eeda
2019-09-02 13:09:04 +00:00
Jeremy Stanley
b44422b2e1 Update subjects for election-specific subject tags
Add the [ptl] and [tc] ML topic tags to all relevant E-mail template
subject header lines.

Change-Id: I4c8a6fa0147f884d1818c9960e723d0716234a8a
2019-08-29 16:21:55 +00:00
Jeremy Stanley
b61367ab36 Add a combined_nominations_kickoff E-mail template
When running TC and PTL elections concurrently, include instructions
and information about candidacy and electorate requirements for
both in the kickoff event E-mail.

Change-Id: I6bc3116053c676eb579c607c515c2eaee9ca9785
2019-08-29 16:21:52 +00:00
Jeremy Stanley
106660bbd3 Add nomination start info to open season templates
In the E-mail templates for opening the election season, incorporate
information with the start date and time for nominations.

Change-Id: I51f9f6d6432668f9b8223d3d54f598098c33754b
2019-08-22 20:28:44 +00:00
Jeremy Stanley
d7ca2c31d7 Add To and Subject headers to all E-mail templates
Our election results announcement templates had headers for To and
Subject, but the bulk of our E-mail templates had neither. Update
the existing ones to reflect the transition from the openstack-dev
ML to openstack-discuss, and add appropriate headers to all other
templates lacking them.

Change-Id: Ic606143e1deb7d669f09e26cdfbe0a2bce103ad3
2019-08-22 20:18:47 +00:00
Jeremy Stanley
d6660368cf Update templates for the project structure reform
We haven't had "programs" since the 2014-12-02 OpenStack project
structure reform specification was approved by the OpenStack TC.
Update the terminology in our templates accordingly.

Change-Id: I3082f6c9d8d1d1ae0a26853589d8b54810c6e260
2019-08-22 19:45:08 +00:00
Jeremy Stanley
257ba09ace Add a combined_election_season E-mail template
When running TC and PTL elections concurrently, note that in the
open season message along with including the note about PTL
elections with no candidates.

Change-Id: I3a5674061f27c87b9d3006bcd24e3166488742bb
2019-08-22 19:34:05 +00:00
Jeremy Stanley
6ef4f4bc8f Emit an error for a missing E-mail template
Instead of silently doing nothing when asked to render a message for
an event with no available template, return nonzero and provide an
explanation.

Change-Id: I8b86ad1d90f8e83f0d37cade73a94be041b07ae7
2019-08-22 19:18:21 +00:00
Zuul
1f3c85991e Merge "Add new combined election type" 2019-06-06 15:47:03 +00:00
Zuul
0f65cbe6bb Merge "Custom projects in owners skips default legacy" 2019-06-03 16:02:11 +00:00
Zuul
b3b965d244 Merge "Add option to skip OSF member filter in owners" 2019-06-03 15:55:53 +00:00
Jeremy Stanley
9a79f8bdb7 Custom projects in owners skips default legacy
When supplying -p/--projects to the owners script for a custom
projects list, assume this means not to apply the default legacy
projects list. If -l/--legacy is also supplied, the indicated custom
legacy projects are still incorporated into the results.

Change-Id: I383317c8fdac3f6d8cfa2972326ff9fb9f64ab39
2019-05-28 15:12:25 +00:00
Jeremy Stanley
9aec3509aa Add option to skip OSF member filter in owners
Passing -m or --nonmember (-n is already taken) to the owners script
will cause it to include contributors who aren't OSF members when
creating electoral rolls.

Change-Id: Ia79ad0bc09b14b37f3288d018c680f9283f4a510
2019-05-28 15:12:08 +00:00
Tony Breeds
c6406fdbd5 Add new combined election type
This type is for when TC and PTL elections must overlap.  There is a
built in assumption that each "phase" of an election:
 - Nominations
 - Campaigning
 - Election

are completely synchronous

NOTE: This change leaves the template-emails broken, as I do not add new
functions for combined_$email.  This is because I'd like to
If64c075b4a799574bc51ccd13019d472ee9a4b0e merge first, and I'd also like
to avoid to many rebases

Change-Id: Id39c50e71dc91bea8034ce443287463094e2f37f
2019-05-28 15:43:35 +10:00
Erik Hollembeak
ac97c1f1c7 Extract email bodies to Jinja templates
Change-Id: If64c075b4a799574bc51ccd13019d472ee9a4b0e
Story: 2005571
Task: 30757
2019-05-27 20:06:32 -07:00
Andy McCrae
fba623a4cd Clarify --help for setup-election-config tool
Add some basic info to make it clear how to use the
setup-election-config tool.

Change-Id: I43ee066394d1307540d22f977b071616870f2166
2019-05-04 17:43:27 +01:00
Andy McCrae
8e021580ad Only check Candidates during Active election
The CI jobs will fail outside of election time due to name mismatches,
but we don't need to run an election candidate CI job when there is no
active election.

Change-Id: I5b8d37d1c66fd96564741aa0aa69cc840ad39950
2019-05-04 17:37:54 +01:00
Jeremy Stanley
7c7da155e5 Consistent HTTPS for URLs in non-historical files
Update the URLs in various templates and generated content to
consistently use https:// instead of a mix of that and http://, and
while we're at it set the homepage for the Python package of this
repo to the election site rather than the OpenStack Foundation site.

Change-Id: I4fa53076ed9bcdf1545d9c4aa5e80dc5dad95210
2019-03-04 16:36:46 +00:00
Jeremy Stanley
23242b4b99 Correct upcoming release name in template URLs
The future_release expansion variable was being incorrectly set to
the name of the end release from the electorate contribution
timeframe. Its intended use however was redundant with the release
variable. Remove future_release entirely and just use release in
those templates.

Change-Id: I7df3592112d543b52b06c99bfbc05107bfde45f8
2019-03-04 16:17:09 +00:00
Zuul
c6bb2cf792 Merge "Use utils.is_tc_election()" 2019-02-23 13:42:58 +00:00
Zuul
77af30b77c Merge "Reduce the differences between TC and PTL elections" 2019-02-23 13:38:41 +00:00
Zuul
9d64a04b63 Merge "Remove functionally identical dictionary keys in PTL format" 2019-02-23 13:38:40 +00:00
Zuul
b9cb9f1325 Merge "Standardize the fmt args between TC and PTL templates" 2019-02-23 13:38:40 +00:00
Zuul
8efb1abbbc Merge "Add ptl_voting_last_days email template" 2019-02-23 13:38:06 +00:00
Zuul
f77928124f Merge "Add ptl_voting_kickoff email template" 2019-02-23 13:38:04 +00:00
Zuul
c26e1a08ad Merge "Add ptl_end_nominations email template" 2019-02-23 13:27:49 +00:00
Tony Breeds
48566f393c Add new owners options to the proxy
We currently have 2 CLI interfaces for generating change owners.
 - owners ; and
 - generate-rolls

And we maintain a shim to translate between calling arguments.  In
I45d6c4d4fd454ae426883006db1e58dbd373bbdf (Support custom local
projects and legacy projects) we added --legacy and --projects to
owners.  This change adds those options to the shim.

Change-Id: Ib38f26744e279f1271679ce1d075ad5a4e3ddb27
2019-02-20 15:04:02 +11:00
Tony Breeds
497c79c726 Use utils.is_tc_election()
It's what it's for after all ;P

Change-Id: I29b8847a5a7db216f6309b1b560e128839302188
2019-02-19 15:38:42 +11:00
Tony Breeds
bb25c953cc Reduce the differences between TC and PTL elections
It turns out that structure of the TC and PTL elections is very similar
and therefore the template choices are basically the same.  Remove the
overly complex sub-parser and always use the election_type from the YAML
configuration.

Also many of the fmt_args where shared, or harmless to share between
each election type.  pull the similar items out and only adds the items
specific to each election type

Change-Id: Ifcc8a376e7d8d9a79ae7a9191cb2452f8cfbae43
2019-02-19 15:24:39 +11:00
Tony Breeds
be3149f569 Remove functionally identical dictionary keys in PTL format
While removing the duplication standardize on 'leaderless' as a term to
descibe projects without a defined leader (either a single candidate or
an election).  Also standardize on 'election' rather than 'poll'

num_projects_without_candidates and projects_no_candidates are
functionally identical so use a new 'leaderless_count' count instead

projects_polling and list_of_elections are functionally identical so
pick the latter as it aligns with the new terminology

Change-Id: I7aa96e2acb3eca496dda55ded2faddbb09bdbbd1
2019-02-19 15:24:01 +11:00
Tony Breeds
0fbf277a8f Standardize the fmt args between TC and PTL templates
nom_end_date => end_nominations
starting_release => start_release
ending_release => end_release

Change-Id: I02382a01775717c80412e1329c80edcbd988a680
2019-02-19 15:24:01 +11:00
Tony Breeds
7a83d4d675 Add ptl_voting_last_days email template
Change-Id: Ia068917d8465d199c202b2f5bc5387c6b1fb43c6
2019-02-19 15:24:01 +11:00
Tony Breeds
3559786f97 Add ptl_voting_kickoff email template
Change-Id: I1e39836f048b7241d2795ca4c24a2c31af10ec3f
2019-02-19 15:24:01 +11:00
Tony Breeds
77edccc0d7 Add ptl_end_nominations email template
Change-Id: Iaf8121320fadc618068f4840379e3406a100ea52
2019-02-19 15:24:01 +11:00
Tony Breeds
ffe1aa3c8b Add ptl_nominations_last_day email template
This consumes (and modifies) render-statistics.  Factoring this out will
be done at the end of the series

Change-Id: I878de8288f1ac047d844085f05261a6d3b1daac1
2019-02-19 15:23:57 +11:00
Tony Breeds
069e2828f7 Add ptl_nominations_kickoff email template
Change-Id: Ib4df1d61f549c496930b1e46370c1b328b33fa46
2019-02-19 15:21:08 +11:00
Tony Breeds
08cbef67fe Add first PTL template -- ptl_election_season
This slightly more complex than expected as we need to tie the template
to the config so we don't try to get_event() for TC events and fail.

This has been done in the least invasive way possible, we'll tidy things
up at the end of the series

Change-Id: Ib3c25072590507f347ee5ab3f3865eb4c991a34b
2019-02-19 15:21:08 +11:00
Tony Breeds
488c68a80c Typo fix s/cadidate/candidate/
Sorry :(

Change-Id: I4605c860d60c735c14f5f53f67e4dc74eeb0104b
2019-02-19 15:21:08 +11:00
Jeremy Stanley
921ece5f30 Correct candidacy instructions URL
Fix the heading identifier on the candidacy instructions URL in
E-mail templates.

Change-Id: I6044f6e8400320c4cbe2b7fe77a3d41fc0667b47
2019-02-19 03:00:14 +00:00
Jeremy Stanley
bb84857d15 Support custom local projects and legacy projects
Add --legacy and --projects options to the owners CLI, which make it
possible to specify local alternatives for the legacy.yaml and
projects.yaml files. This enables easily running the tool for
unofficial/non-OpenStack elections which use the same Gerrit and
similar rules for determining their electorates other than the
actual repository lists.

Change-Id: I45d6c4d4fd454ae426883006db1e58dbd373bbdf
2019-01-19 14:33:04 +00:00
Jeremy Stanley
549cc39319 Don't encode contributor names in invites
Now that we don't support Python 2.7 with this tooling, we can drop
the explicit encoding in invitee names. Without this change, they're
recorded as explicit byte sequences instead of normal UTF-8 strings.

Change-Id: I9e0220dbdb241ab6bd464fd5cdfcaf5f3e2a6399
2019-01-18 23:15:06 +00:00
Zuul
5ab6e158c1 Merge "Don't validate .placeholder" 2019-01-14 14:07:56 +00:00
Zuul
e21fb75c85 Merge "Add some testing for ci_check_all_candidate_files" 2019-01-14 14:07:55 +00:00
Zuul
80d8dd3a5c Merge "Move the ElectionTestCase into a base module" 2019-01-14 14:07:55 +00:00
Zuul
a85500ae9b Merge "Handle the case when the gap between summit and release is small" 2019-01-14 14:07:22 +00:00