libmozdata 0.1.83__tar.gz → 0.1.86__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. {libmozdata-0.1.83/libmozdata.egg-info → libmozdata-0.1.86}/PKG-INFO +1 -1
  2. libmozdata-0.1.86/VERSION +1 -0
  3. {libmozdata-0.1.83 → libmozdata-0.1.86}/libmozdata/BZInfo.py +10 -10
  4. {libmozdata-0.1.83 → libmozdata-0.1.86}/libmozdata/FXRevision.py +0 -1
  5. libmozdata-0.1.86/libmozdata/fx_trains.py +57 -0
  6. {libmozdata-0.1.83 → libmozdata-0.1.86}/libmozdata/phabricator.py +11 -2
  7. {libmozdata-0.1.83 → libmozdata-0.1.86}/libmozdata/release_calendar.py +53 -27
  8. {libmozdata-0.1.83 → libmozdata-0.1.86/libmozdata.egg-info}/PKG-INFO +1 -1
  9. {libmozdata-0.1.83 → libmozdata-0.1.86}/libmozdata.egg-info/SOURCES.txt +1 -0
  10. libmozdata-0.1.83/VERSION +0 -1
  11. {libmozdata-0.1.83 → libmozdata-0.1.86}/MANIFEST.in +0 -0
  12. {libmozdata-0.1.83 → libmozdata-0.1.86}/README.md +0 -0
  13. {libmozdata-0.1.83 → libmozdata-0.1.86}/libmozdata/FileStats.py +0 -0
  14. {libmozdata-0.1.83 → libmozdata-0.1.86}/libmozdata/HGFileInfo.py +0 -0
  15. {libmozdata-0.1.83 → libmozdata-0.1.86}/libmozdata/__init__.py +0 -0
  16. {libmozdata-0.1.83 → libmozdata-0.1.86}/libmozdata/bugzilla.py +0 -0
  17. {libmozdata-0.1.83 → libmozdata-0.1.86}/libmozdata/buildhub.py +0 -0
  18. {libmozdata-0.1.83 → libmozdata-0.1.86}/libmozdata/config.py +0 -0
  19. {libmozdata-0.1.83 → libmozdata-0.1.86}/libmozdata/connection.py +0 -0
  20. {libmozdata-0.1.83 → libmozdata-0.1.86}/libmozdata/handler.py +0 -0
  21. {libmozdata-0.1.83 → libmozdata-0.1.86}/libmozdata/hgmozilla.py +0 -0
  22. {libmozdata-0.1.83 → libmozdata-0.1.86}/libmozdata/lando.py +0 -0
  23. {libmozdata-0.1.83 → libmozdata-0.1.86}/libmozdata/modules.json +0 -0
  24. {libmozdata-0.1.83 → libmozdata-0.1.86}/libmozdata/modules.py +0 -0
  25. {libmozdata-0.1.83 → libmozdata-0.1.86}/libmozdata/patchanalysis.py +0 -0
  26. {libmozdata-0.1.83 → libmozdata-0.1.86}/libmozdata/redash.py +0 -0
  27. {libmozdata-0.1.83 → libmozdata-0.1.86}/libmozdata/release_owners.py +0 -0
  28. {libmozdata-0.1.83 → libmozdata-0.1.86}/libmozdata/socorro.py +0 -0
  29. {libmozdata-0.1.83 → libmozdata-0.1.86}/libmozdata/utils.py +0 -0
  30. {libmozdata-0.1.83 → libmozdata-0.1.86}/libmozdata/vcs_map.py +0 -0
  31. {libmozdata-0.1.83 → libmozdata-0.1.86}/libmozdata/versions.py +0 -0
  32. {libmozdata-0.1.83 → libmozdata-0.1.86}/libmozdata/wiki_parser.py +0 -0
  33. {libmozdata-0.1.83 → libmozdata-0.1.86}/libmozdata.egg-info/dependency_links.txt +0 -0
  34. {libmozdata-0.1.83 → libmozdata-0.1.86}/libmozdata.egg-info/not-zip-safe +0 -0
  35. {libmozdata-0.1.83 → libmozdata-0.1.86}/libmozdata.egg-info/requires.txt +0 -0
  36. {libmozdata-0.1.83 → libmozdata-0.1.86}/libmozdata.egg-info/top_level.txt +0 -0
  37. {libmozdata-0.1.83 → libmozdata-0.1.86}/requirements.txt +0 -0
  38. {libmozdata-0.1.83 → libmozdata-0.1.86}/setup.cfg +0 -0
  39. {libmozdata-0.1.83 → libmozdata-0.1.86}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.1
2
2
  Name: libmozdata
3
- Version: 0.1.83
3
+ Version: 0.1.86
4
4
  Summary: Library to access and aggregate several Mozilla data sources.
5
5
  Home-page: https://github.com/mozilla/libmozdata
6
6
  Author: Mozilla Release Management
@@ -0,0 +1 @@
1
+ 0.1.86
@@ -156,25 +156,25 @@ class BZInfo(Bugzilla):
156
156
  owner = None
157
157
  changes = h["changes"]
158
158
  for change in changes:
159
- nam = change["field_name"]
160
- rem = change["removed"]
161
- add = change["added"]
159
+ field = change["field_name"]
160
+ removed = change["removed"]
161
+ added = change["added"]
162
162
 
163
- if nam == "status":
164
- if rem == "NEW" and add == "ASSIGNED":
163
+ if field == "status":
164
+ if removed == "NEW" and added == "ASSIGNED":
165
165
  owner = who
166
- elif nam == "assigned_to":
167
- owner = add
168
- elif nam == "flagtypes.name":
166
+ elif field == "assigned_to":
167
+ owner = added
168
+ elif field == "flagtypes.name":
169
169
  # Get the reviewers
170
- for m in self.review_pattern.finditer(add):
170
+ for m in self.review_pattern.finditer(added):
171
171
  if who in reviewers:
172
172
  reviewers[who].add(m.group(1))
173
173
  else:
174
174
  reviewers[who] = set([m.group(1)])
175
175
 
176
176
  # Get people pinged for feedback
177
- for m in self.feedback_pattern.finditer(add):
177
+ for m in self.feedback_pattern.finditer(added):
178
178
  if who in feedbacks:
179
179
  feedbacks[who].add(m.group(1))
180
180
  else:
@@ -8,7 +8,6 @@ from connection import Connection
8
8
 
9
9
 
10
10
  class FXRevision(Connection):
11
-
12
11
  ARCHIVES_URL = "http://archive.mozilla.org"
13
12
  NIGHTLY_URL = ARCHIVES_URL + "/pub/firefox/nightly/"
14
13
 
@@ -0,0 +1,57 @@
1
+ # This Source Code Form is subject to the terms of the Mozilla Public
2
+ # License, v. 2.0. If a copy of the MPL was not distributed with this file,
3
+ # You can obtain one at http://mozilla.org/MPL/2.0/.
4
+
5
+ import requests
6
+
7
+
8
+ class FirefoxTrains:
9
+ """Firefox Trains
10
+
11
+ Documentations: https://whattrainisitnow.com/about
12
+ """
13
+
14
+ URL = "https://whattrainisitnow.com/api/"
15
+
16
+ def __get(self, path):
17
+ resp = requests.get(self.URL + path, timeout=10)
18
+ resp.raise_for_status()
19
+ return resp.json()
20
+
21
+ def get_release_schedule(self, channel):
22
+ """Get the release schedule for a given channel.
23
+
24
+ Args:
25
+ channel (str): The channel to get the release schedule for. Can be
26
+ a version number or one of the beta or nightly keywords.
27
+
28
+ Returns:
29
+ dict: The release schedule for the given channel.
30
+ """
31
+
32
+ api_path = f"release/schedule/?version={channel}"
33
+ return self.__get(api_path)
34
+
35
+ def get_release_owners(self):
36
+ """Get the historical list of all release managers for Firefox major
37
+ release.
38
+
39
+ We don't have the names before Firefox 27
40
+
41
+ Returns:
42
+ dict: the release number as key and the release owner as value.
43
+ """
44
+
45
+ api_path = "release/owners/"
46
+ return self.__get(api_path)
47
+
48
+ def get_firefox_releases(self):
49
+ """Get release dates for all Firefox releases (including dot releases)
50
+ Returns:
51
+ dict: the release number as key and the release date as value.
52
+ """
53
+
54
+ api_path = "firefox/releases/"
55
+ return self.__get(api_path)
56
+
57
+ # TODO: add methods for the other API endpoints
@@ -252,7 +252,6 @@ class PhabricatorAPI(object):
252
252
  )
253
253
 
254
254
  def _clean(diff):
255
-
256
255
  # Make all fields easily accessible
257
256
  if "fields" in diff and isinstance(diff["fields"], dict):
258
257
  diff.update(diff["fields"])
@@ -301,6 +300,16 @@ class PhabricatorAPI(object):
301
300
  raise PhabricatorRevisionNotFoundException()
302
301
  return data[0]
303
302
 
303
+ def edit_revision(self, revision_id, transactions):
304
+ """
305
+ Edit a differential revision
306
+ """
307
+ return self.request(
308
+ "differential.revision.edit",
309
+ objectIdentifier=revision_id,
310
+ transactions=transactions,
311
+ )
312
+
304
313
  def list_repositories(self):
305
314
  """
306
315
  List available repositories
@@ -672,6 +681,7 @@ class PhabricatorAPI(object):
672
681
  without hitting a local mercurial repository
673
682
  If the full diff details are provided, they can be used directly in the stack
674
683
  """
684
+
675
685
  # Diff PHIDs from our patch to its base
676
686
  def add_patch(diff):
677
687
  # Build a nicer Diff instance with associated commit & patch
@@ -704,7 +714,6 @@ class PhabricatorAPI(object):
704
714
 
705
715
  parents = self.load_parents(diff["revisionPHID"])
706
716
  if parents:
707
-
708
717
  # Load all parent diffs
709
718
  for parent in parents:
710
719
  logger.info("Loading parent diff {}".format(parent))
@@ -33,39 +33,65 @@ def get_calendar():
33
33
  if _CALENDAR is not None:
34
34
  return _CALENDAR
35
35
 
36
+ table = None
36
37
  html = requests.get(CALENDAR_URL).text.encode("ascii", errors="ignore")
37
38
  parser = WikiParser(tables=[0])
38
39
  try:
39
40
  parser.feed(html)
40
41
  except StopIteration:
41
42
  table = parser.get_tables()[0]
42
- if [
43
- "Quarter",
44
- "Soft Freeze",
45
- "Merge Date",
46
- "Nightly",
47
- "Beta",
48
- "Release Date",
49
- "Release",
50
- "ESR",
51
- ] != table[0]:
52
- raise InvalidWiki("Column headers are wrong")
53
-
54
- _CALENDAR = []
55
- for row in table[1:]:
56
- row = row[1:]
57
- _CALENDAR.append(
58
- {
59
- "soft freeze": utils.get_date_ymd(row[0]),
60
- "merge": utils.get_date_ymd(row[1]),
61
- "central": get_versions(row[2])[0][0],
62
- "beta": get_versions(row[3])[0][0],
63
- "release date": utils.get_date_ymd(row[4]),
64
- "release": get_versions(row[5])[0][0],
65
- "esr": get_versions(row[6]),
66
- }
67
- )
68
- return _CALENDAR
43
+
44
+ if table is None:
45
+ raise InvalidWiki("No table found")
46
+
47
+ # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
48
+ # FIXME: remove the following after dropping the old table from the wiki
49
+ if [
50
+ "Quarter",
51
+ "Soft Freeze",
52
+ "Merge Date",
53
+ "Nightly",
54
+ "Beta",
55
+ "Release Date",
56
+ "Release",
57
+ "ESR",
58
+ ] == table[0]:
59
+ parser = WikiParser(tables=[1])
60
+ try:
61
+ parser.feed(html)
62
+ except StopIteration:
63
+ table = parser.get_tables()[0]
64
+ # <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
65
+
66
+ if [
67
+ "Quarter",
68
+ "Fx Release",
69
+ "Nightly begins",
70
+ "Nightly Soft Freeze*",
71
+ "Beta begins",
72
+ "Releases on",
73
+ "Corresponding ESR",
74
+ ] != table[0]:
75
+ raise InvalidWiki("Column headers are wrong")
76
+
77
+ _CALENDAR = []
78
+ for i in range(1, len(table) - 2):
79
+ release = table[i]
80
+ beta = table[i + 1]
81
+ nightly = table[i + 2]
82
+
83
+ _CALENDAR.append(
84
+ {
85
+ "soft freeze": utils.get_date_ymd(beta[3]),
86
+ "merge": utils.get_date_ymd(beta[4]),
87
+ "central": get_versions(nightly[1])[0][0],
88
+ "beta": get_versions(beta[1])[0][0],
89
+ "release date": utils.get_date_ymd(release[5]),
90
+ "release": get_versions(release[1])[0][0],
91
+ "esr": get_versions(release[6]),
92
+ }
93
+ )
94
+ return _CALENDAR
69
95
 
70
96
 
71
97
  def get_next_release_date():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.1
2
2
  Name: libmozdata
3
- Version: 0.1.83
3
+ Version: 0.1.86
4
4
  Summary: Library to access and aggregate several Mozilla data sources.
5
5
  Home-page: https://github.com/mozilla/libmozdata
6
6
  Author: Mozilla Release Management
@@ -13,6 +13,7 @@ libmozdata/bugzilla.py
13
13
  libmozdata/buildhub.py
14
14
  libmozdata/config.py
15
15
  libmozdata/connection.py
16
+ libmozdata/fx_trains.py
16
17
  libmozdata/handler.py
17
18
  libmozdata/hgmozilla.py
18
19
  libmozdata/lando.py
libmozdata-0.1.83/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.1.83
File without changes
File without changes
File without changes
File without changes