File tree Expand file tree Collapse file tree 10 files changed +48
-14
lines changed
Expand file tree Collapse file tree 10 files changed +48
-14
lines changed Original file line number Diff line number Diff line change 1111repos :
1212 # Autoformat: Python code
1313 - repo : https://github.com/ambv/black
14- rev : 22.3 .0
14+ rev : 23.1 .0
1515 hooks :
1616 - id : black
1717
1818 # Autoformat: markdown, yaml
1919 - repo : https://github.com/pre-commit/mirrors-prettier
20- rev : v2.6.2
20+ rev : v3.0.0-alpha.4
2121 hooks :
2222 - id : prettier
2323 exclude : tests/.*
2424
2525 # Autoformat: https://github.com/asottile/reorder_python_imports
2626 - repo : https://github.com/asottile/reorder_python_imports
27- rev : v3.0.1
27+ rev : v3.9.0
2828 hooks :
2929 - id : reorder-python-imports
3030
3131 # Misc...
3232 - repo : https://github.com/pre-commit/pre-commit-hooks
33- rev : v4.2 .0
33+ rev : v4.4 .0
3434 # ref: https://github.com/pre-commit/pre-commit-hooks#hooks-available
3535 hooks :
3636 # Autoformat: Makes sure files end in a newline and only a newline.
4949
5050 # Lint: Python code
5151 - repo : https://github.com/pycqa/flake8
52- rev : " 4 .0.1 "
52+ rev : " 6 .0.0 "
5353 hooks :
5454 - id : flake8
Original file line number Diff line number Diff line change @@ -31,3 +31,12 @@ github-activity [<org>/<repo>] --since <date or ref> --until <date or ref>
3131
3232See [ the github-activity documentation] ( https://github-activity.readthedocs.io )
3333for more information.
34+
35+ ## To run the tests
36+
37+ The easiest way to run the test suite is using ` nox ` .
38+ This will install the local version of the package and run the test suite.
39+
40+ ```
41+ nox -s test
42+ ```
Original file line number Diff line number Diff line change @@ -253,7 +253,6 @@ def generate_all_activity_md(
253253 """
254254 # Get the sha and tag name for each tag in the target repo
255255 with TemporaryDirectory () as td :
256-
257256 subprocess .run (
258257 shlex .split (f"git clone https://github.com/{ target } repo" ), cwd = td
259258 )
@@ -653,7 +652,7 @@ def generate_activity_md(
653652 all_contributor_links = []
654653 for iauthor in all_contributors :
655654 author_url = f"https://github.com/search?q=repo%3A{ org } %2F{ repo } +involves%3A{ iauthor } +updated%3A{ data .since_dt :%Y-%m-%d} ..{ data .until_dt :%Y-%m-%d} &type=Issues"
656- all_contributor_links .append (f"[ @{ iauthor } ]({ author_url } )" )
655+ all_contributor_links .append (f"@{ iauthor } ([activity ]({ author_url } ) )" )
657656 contributor_md = " | " .join (all_contributor_links )
658657 gh_contributors_link = f"https://github.com/{ org } /{ repo } /graphs/contributors?from={ data .since_dt :%Y-%m-%d} &to={ data .until_dt :%Y-%m-%d} &type=c"
659658 md += ["" ]
Original file line number Diff line number Diff line change 116116}}
117117"""
118118
119+
119120# Define our query object that we'll re-use for github search
120121class GitHubGraphQlQuery :
121122 def __init__ (self , query , display_progress = True , auth = None ):
Original file line number Diff line number Diff line change 1+ import nox
2+
3+ nox .options .reuse_existing_virtualenvs = True
4+
5+
6+ @nox .session
7+ def run (session ):
8+ """Run github activity on this repository with the current repo."""
9+ session .install ("-r" , "requirements.txt" )
10+ session .install ("-e" , "." )
11+
12+ # Run github activity and re-use the posargs
13+ cmd = ["github-activity" ] + session .posargs
14+ session .run (* cmd )
15+
16+
17+ @nox .session
18+ def test (session ):
19+ """Run github activity on this repository with the current repo."""
20+ session .install ("-r" , "requirements.txt" )
21+ session .install ("-e" , "." )
22+
23+ # Run github activity and re-use the posargs
24+ cmd = ["pytest" ] + session .posargs
25+ session .run (* cmd )
Original file line number Diff line number Diff line change @@ -20,4 +20,4 @@ See [our definition of contributors](https://github-activity.readthedocs.io/en/l
2020
2121([ GitHub contributors page for this release] ( https://github.com/executablebooks/github-activity/graphs/contributors?from=2019-09-01&to=2019-11-01&type=c ) )
2222
23- [ @betatim ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Abetatim+updated%3A2019-09-01..2019-11-01&type=Issues ) | [ @choldgraf ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Acholdgraf+updated%3A2019-09-01..2019-11-01&type=Issues ) | [ @consideRatio ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3AconsideRatio+updated%3A2019-09-01..2019-11-01&type=Issues )
23+ @betatim ( [ activity ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Abetatim+updated%3A2019-09-01..2019-11-01&type=Issues ) ) | @choldgraf ( [ activity ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Acholdgraf+updated%3A2019-09-01..2019-11-01&type=Issues ) ) | @consideRatio ( [ activity ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3AconsideRatio+updated%3A2019-09-01..2019-11-01&type=Issues ) )
Original file line number Diff line number Diff line change @@ -20,4 +20,4 @@ See [our definition of contributors](https://github-activity.readthedocs.io/en/l
2020
2121([ GitHub contributors page for this release] ( https://github.com/executablebooks/github-activity/graphs/contributors?from=2019-09-01&to=2019-11-01&type=c ) )
2222
23- [ @betatim ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Abetatim+updated%3A2019-09-01..2019-11-01&type=Issues ) | [ @choldgraf ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Acholdgraf+updated%3A2019-09-01..2019-11-01&type=Issues ) | [ @consideRatio ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3AconsideRatio+updated%3A2019-09-01..2019-11-01&type=Issues )
23+ @betatim ( [ activity ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Abetatim+updated%3A2019-09-01..2019-11-01&type=Issues ) ) | @choldgraf ( [ activity ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Acholdgraf+updated%3A2019-09-01..2019-11-01&type=Issues ) ) | @consideRatio ( [ activity ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3AconsideRatio+updated%3A2019-09-01..2019-11-01&type=Issues ) )
Original file line number Diff line number Diff line change @@ -20,4 +20,4 @@ See [our definition of contributors](https://github-activity.readthedocs.io/en/l
2020
2121([ GitHub contributors page for this release] ( https://github.com/executablebooks/github-activity/graphs/contributors?from=2019-09-01&to=2019-11-01&type=c ) )
2222
23- [ @betatim ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Abetatim+updated%3A2019-09-01..2019-11-01&type=Issues ) | [ @choldgraf ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Acholdgraf+updated%3A2019-09-01..2019-11-01&type=Issues ) | [ @consideRatio ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3AconsideRatio+updated%3A2019-09-01..2019-11-01&type=Issues )
23+ @betatim ( [ activity ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Abetatim+updated%3A2019-09-01..2019-11-01&type=Issues ) ) | @choldgraf ( [ activity ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Acholdgraf+updated%3A2019-09-01..2019-11-01&type=Issues ) ) | @consideRatio ( [ activity ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3AconsideRatio+updated%3A2019-09-01..2019-11-01&type=Issues ) )
Original file line number Diff line number Diff line change @@ -20,4 +20,4 @@ See [our definition of contributors](https://github-activity.readthedocs.io/en/l
2020
2121([ GitHub contributors page for this release] ( https://github.com/executablebooks/github-activity/graphs/contributors?from=2019-09-01&to=2019-11-01&type=c ) )
2222
23- [ @betatim ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Abetatim+updated%3A2019-09-01..2019-11-01&type=Issues ) | [ @choldgraf ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Acholdgraf+updated%3A2019-09-01..2019-11-01&type=Issues ) | [ @consideRatio ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3AconsideRatio+updated%3A2019-09-01..2019-11-01&type=Issues )
23+ @betatim ( [ activity ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Abetatim+updated%3A2019-09-01..2019-11-01&type=Issues ) ) | @choldgraf ( [ activity ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Acholdgraf+updated%3A2019-09-01..2019-11-01&type=Issues ) ) | @consideRatio ( [ activity ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3AconsideRatio+updated%3A2019-09-01..2019-11-01&type=Issues ) )
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ See [our definition of contributors](https://github-activity.readthedocs.io/en/l
2626
2727([ GitHub contributors page for this release] ( https://github.com/executablebooks/github-activity/graphs/contributors?from=2021-02-20&to=2021-12-01&type=c ) )
2828
29- [ @blink1073 ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Ablink1073+updated%3A2021-02-20..2021-12-01&type=Issues ) | [ @choldgraf ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Acholdgraf+updated%3A2021-02-20..2021-12-01&type=Issues ) | [ @consideRatio ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3AconsideRatio+updated%3A2021-02-20..2021-12-01&type=Issues ) | [ @manics ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Amanics+updated%3A2021-02-20..2021-12-01&type=Issues ) | [ @minrk ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Aminrk+updated%3A2021-02-20..2021-12-01&type=Issues ) | [ @wolfv ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Awolfv+updated%3A2021-02-20..2021-12-01&type=Issues )
29+ @blink1073 ( [ activity ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Ablink1073+updated%3A2021-02-20..2021-12-01&type=Issues ) ) | @choldgraf ( [ activity ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Acholdgraf+updated%3A2021-02-20..2021-12-01&type=Issues ) ) | @consideRatio ( [ activity ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3AconsideRatio+updated%3A2021-02-20..2021-12-01&type=Issues ) ) | @manics ( [ activity ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Amanics+updated%3A2021-02-20..2021-12-01&type=Issues ) ) | @minrk ( [ activity ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Aminrk+updated%3A2021-02-20..2021-12-01&type=Issues ) ) | @wolfv ( [ activity ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Awolfv+updated%3A2021-02-20..2021-12-01&type=Issues ) )
3030
3131## v0.1.3
3232
@@ -63,7 +63,7 @@ See [our definition of contributors](https://github-activity.readthedocs.io/en/l
6363
6464([ GitHub contributors page for this release] ( https://github.com/executablebooks/github-activity/graphs/contributors?from=2020-08-31&to=2021-02-20&type=c ) )
6565
66- [ @blink1073 ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Ablink1073+updated%3A2020-08-31..2021-02-20&type=Issues ) | [ @choldgraf ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Acholdgraf+updated%3A2020-08-31..2021-02-20&type=Issues ) | [ @consideRatio ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3AconsideRatio+updated%3A2020-08-31..2021-02-20&type=Issues ) | [ @minrk ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Aminrk+updated%3A2020-08-31..2021-02-20&type=Issues )
66+ @blink1073 ( [ activity ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Ablink1073+updated%3A2020-08-31..2021-02-20&type=Issues ) ) | @choldgraf ( [ activity ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Acholdgraf+updated%3A2020-08-31..2021-02-20&type=Issues ) ) | @consideRatio ( [ activity ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3AconsideRatio+updated%3A2020-08-31..2021-02-20&type=Issues ) ) | @minrk ( [ activity ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Aminrk+updated%3A2020-08-31..2021-02-20&type=Issues ) )
6767
6868## v0.1.2
6969
@@ -80,4 +80,4 @@ See [our definition of contributors](https://github-activity.readthedocs.io/en/l
8080
8181([ GitHub contributors page for this release] ( https://github.com/executablebooks/github-activity/graphs/contributors?from=2020-08-07&to=2020-08-31&type=c ) )
8282
83- [ @choldgraf ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Acholdgraf+updated%3A2020-08-07..2020-08-31&type=Issues )
83+ @choldgraf ( [ activity ] ( https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Acholdgraf+updated%3A2020-08-07..2020-08-31&type=Issues ) )
You can’t perform that action at this time.
0 commit comments