Skip to content

Commit cfab240

Browse files
authored
Update the README and CONTRIBUTORS pre-release. (#1126)
* Add python -m to pip commands, --recursive to git * put fetch_contributors into a main * update CONTRIBUTORS.md for this release Co-authored-by: ssteinbach <[email protected]>
1 parent 3e4b459 commit cfab240

File tree

3 files changed

+82
-57
lines changed

3 files changed

+82
-57
lines changed

CONTRIBUTORS.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ This is a list of people who have committed code to the OpenTimelineIO project,
22

33
If you know of anyone missing from this list, please contact us: https://lists.aswf.io/g/otio-discussion
44

5+
* Aditya Rana ([Viraj-Rana008](https://github.com/Viraj-Rana008))
56
* Alex Schworer ([schworer](https://github.com/schworer))
67
* Alex Widener ([boredstiff](https://github.com/boredstiff))
8+
* Ashley Whetter ([AWhetter](https://github.com/AWhetter))
79
* Bas Hesen ([bashesenaxis](https://github.com/bashesenaxis))
810
* Bonnie Tai ([bonpix](https://github.com/bonpix))
911
* Daniel Flehner Heen ([apetrynet](https://github.com/apetrynet))
@@ -15,25 +17,33 @@ If you know of anyone missing from this list, please contact us: https://lists.a
1517
* Eric ([eric-with-a-c](https://github.com/eric-with-a-c))
1618
* Eric Reinecke ([reinecke](https://github.com/reinecke))
1719
* Félix Bourbonnais ([BadSingleton](https://github.com/BadSingleton))
20+
* Félix David ([Tilix4](https://github.com/Tilix4))
21+
* Flavian Liger ([flavienliger](https://github.com/flavienliger))
22+
* Fredrik Brännbacka ([smaragden](https://github.com/smaragden))
1823
* Freeson Wang ([freesonluxo](https://github.com/freesonluxo))
1924
* Henry Wilkes ([hwilkes-igalia](https://github.com/hwilkes-igalia))
20-
* Jeffrey ([IOjeffrey](https://github.com/IOjeffrey))
25+
* Jean-Christophe Morin ([JeanChristopheMorinPerso](https://github.com/JeanChristopheMorinPerso))
26+
* Jeffrey Barendse ([IOjeffrey](https://github.com/IOjeffrey))
27+
* John Mertic ([jmertic](https://github.com/jmertic))
28+
* Jon Morley ([rogergodspeed](https://github.com/rogergodspeed))
29+
* Jonathan Hearn ([splidje](https://github.com/splidje))
2130
* Josh Burnell ([JoshBurnell](https://github.com/JoshBurnell))
2231
* Joshua Minor ([jminor](https://github.com/jminor))
2332
* Julian Yu-Chung Chen ([jchen9](https://github.com/jchen9))
2433
* Karthik Ramesh Iyer ([KarthikRIyer](https://github.com/KarthikRIyer))
2534
* Laura Savidge ([lsavidge](https://github.com/lsavidge))
26-
* lieo ([flavienliger](https://github.com/flavienliger))
2735
* Matt Johnson ([mattyjams](https://github.com/mattyjams))
2836
* Michael Jefferies ([michaeljefferies](https://github.com/michaeljefferies))
2937
* Mike Koetter ([mikekoetter](https://github.com/mikekoetter))
3038
* Mike Mahony ([mikemahony](https://github.com/mikemahony))
3139
* Nick Porcino ([meshula](https://github.com/meshula))
3240
* Robyn Rindge ([avrata](https://github.com/avrata))
33-
* Roger Godspeed ([rogergodspeed](https://github.com/rogergodspeed))
41+
* Roger Nelson ([rogernelson](https://github.com/rogernelson))
3442
* Sasha Aleshchenko ([TheBigSasha](https://github.com/TheBigSasha))
3543
* Sean Wallitsch ([swallitsch](https://github.com/swallitsch))
44+
* Sergio Rojas ([hisergiorojas](https://github.com/hisergiorojas))
3645
* Shahbaz Khan ([shahbazk8194](https://github.com/shahbazk8194))
46+
* Simran Spiller ([Simran-B](https://github.com/Simran-B))
3747
* Stefan Schulze ([stefanschulze](https://github.com/stefanschulze))
3848
* Stephan Steinbach ([ssteinbach](https://github.com/ssteinbach))
3949
* Thibault Saunier ([thiblahute](https://github.com/thiblahute))

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Installing / Quick-Start
8080

8181
The python-wrapped version of OpenTimelineIO is publicly available via pypy. You can install OpenTimelineIO via:
8282

83-
`pip install opentimelineio`
83+
`python -m pip install opentimelineio`
8484

8585
For detailed installation instructions and notes on how to run the included viewer program, see: https://opentimelineio.readthedocs.io/en/latest/tutorials/quickstart.html
8686

@@ -112,11 +112,13 @@ If you want to contribute to the project, please see: https://opentimelineio.rea
112112

113113
You can get the latest development version via:
114114

115-
`git clone [email protected]:PixarAnimationStudios/OpenTimelineIO.git OpenTimelineIO`
115+
`git clone [email protected]:PixarAnimationStudios/OpenTimelineIO.git --recursive `
116116

117-
You can install development dependencies with `pip install .[dev]`
117+
You can install development dependencies with `python -m pip install .[dev]`
118118

119-
You can also install the PySide2 dependency with `pip install .[view]`
119+
You can also install the PySide2 dependency with `python -m pip install .[view]`
120+
121+
You may need to escape the `[` depending on your shell, `\[view\]` .
120122

121123
Currently the code base is written against python 2.7, 3.7, 3.8 and 3.9,
122124
in keeping with the pep8 style. We ask that before developers submit pull
@@ -147,7 +149,7 @@ following environment variables:
147149
- `OTIO_CXX_BUILD_TMP_DIR=path/to/build/dir`
148150

149151
When building/installing through `pip`/`setup.py`, these variables must be set
150-
before running the install command (`pip install .` for example).
152+
before running the install command (`python -m pip install .` for example).
151153

152154
License
153155
-------

maintainers/fetch_contributors.py

Lines changed: 62 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -4,60 +4,73 @@
44
import json
55
import urllib.request
66

7-
parser = argparse.ArgumentParser(
8-
description='Fetch a list of contributors for a given GitHub repo.'
9-
)
10-
parser.add_argument(
11-
'--repo',
12-
required=True,
13-
help='GitHub Project/Repo name. (e.g. "PixarAnimationStudios/OpenTimelineIO")'
14-
)
15-
parser.add_argument(
16-
'--token',
17-
required=True,
18-
help='GitHub personal access token, used for authorization.'
19-
' Get one here: https://github.com/settings/tokens/new'
20-
)
21-
args = parser.parse_args()
22-
23-
# Note: un-authenticated requests have a strict rate limit.
24-
# We avoid this by using authentication for all our requests,
25-
# even the ones that don't need it.
26-
#
27-
# You can fetch your limits with this API:
28-
#
29-
# request = urllib.request.Request(
30-
# "https://api.github.com/rate_limit",
31-
# headers = {"Authorization": "token {}".format(token)}
32-
# )
33-
# response = urllib.request.urlopen(request).read().decode('utf-8')
34-
# print("Rate limit: {}".format(response))
35-
36-
request = urllib.request.Request(
37-
"https://api.github.com/repos/{}/stats/contributors".format(args.repo),
38-
headers={"Authorization": "token {}".format(args.token)}
39-
)
40-
response = urllib.request.urlopen(request).read().decode('utf-8')
41-
42-
contributors = json.loads(response)
43-
44-
output_lines = []
45-
46-
for contributor in contributors:
47-
48-
login = contributor['author']['login']
49-
url = contributor['author']['html_url']
7+
8+
def parse_args():
9+
parser = argparse.ArgumentParser(
10+
description='Fetch a list of contributors for a given GitHub repo.'
11+
)
12+
parser.add_argument(
13+
'--repo',
14+
required=True,
15+
help='GitHub Project/Repo name. (e.g. "PixarAnimationStudios/OpenTimelineIO")'
16+
)
17+
parser.add_argument(
18+
'--token',
19+
required=True,
20+
help='GitHub personal access token, used for authorization.'
21+
' Get one here: https://github.com/settings/tokens/new'
22+
)
23+
return parser.parse_args()
24+
25+
26+
def main():
27+
args = parse_args()
28+
29+
# Note: un-authenticated requests have a strict rate limit.
30+
# We avoid this by using authentication for all our requests,
31+
# even the ones that don't need it.
32+
#
33+
# You can fetch your limits with this API:
34+
#
35+
# request = urllib.request.Request(
36+
# "https://api.github.com/rate_limit",
37+
# headers = {"Authorization": "token {}".format(token)}
38+
# )
39+
# response = urllib.request.urlopen(request).read().decode('utf-8')
40+
# print("Rate limit: {}".format(response))
5041

5142
request = urllib.request.Request(
52-
"https://api.github.com/users/{}".format(login),
43+
"https://api.github.com/repos/{}/stats/contributors".format(args.repo),
5344
headers={"Authorization": "token {}".format(args.token)}
5445
)
5546
response = urllib.request.urlopen(request).read().decode('utf-8')
5647

57-
user = json.loads(response)
58-
name = user['name'] or "?"
48+
contributors = json.loads(response)
49+
50+
output_lines = []
51+
52+
if not contributors:
53+
print("No contributors found, something likely went wrong.")
54+
55+
for contributor in contributors:
56+
57+
login = contributor['author']['login']
58+
url = contributor['author']['html_url']
59+
60+
request = urllib.request.Request(
61+
"https://api.github.com/users/{}".format(login),
62+
headers={"Authorization": "token {}".format(args.token)}
63+
)
64+
response = urllib.request.urlopen(request).read().decode('utf-8')
65+
66+
user = json.loads(response)
67+
name = user['name'] or "?"
68+
69+
# Print the output in markdown format
70+
output_lines.append("* {} ([{}]({}))".format(name, login, url))
71+
72+
print("\n".join(sorted(output_lines, key=str.casefold)))
5973

60-
# Print the output in markdown format
61-
output_lines.append("* {} ([{}]({}))".format(name, login, url))
6274

63-
print("\n".join(sorted(output_lines, key=str.casefold)))
75+
if __name__ == '__main__':
76+
main()

0 commit comments

Comments
 (0)