Skip to content

Commit 3fb22ee

Browse files
committed
Update tests to use github-activity repo
1 parent 5cf9c69 commit 3fb22ee

File tree

5 files changed

+42
-48
lines changed

5 files changed

+42
-48
lines changed

github_activity/github_activity.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -566,8 +566,8 @@ def filter_ignored(userlist):
566566
return
567567

568568
# Extract datetime strings from data attributes for pandas query
569-
since_dt_str = data["since_dt_str"] # noqa: F841
570-
until_dt_str = data["until_dt_str"] # noqa: F841
569+
since_dt_str = data.since_dt_str # noqa: F841
570+
until_dt_str = data.until_dt_str # noqa: F841
571571

572572
# Separate into closed and opened
573573
closed = data.query("closedAt >= @since_dt_str and closedAt <= @until_dt_str")

tests/test_cli.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,10 @@ def test_pr_split(tmpdir, file_regression):
9797
path_tmp = Path(tmpdir)
9898
path_output = path_tmp.joinpath("out.md")
9999

100-
url = "https://github.com/jupyter-book/jupyter-book"
100+
url = "https://github.com/executablebooks/github-activity"
101101

102-
# This release range covers some PRs with tags, and some with prefixes
103-
# Using smaller range v0.7.2 to v0.7.3 to reduce API calls
104-
cmd = f"github-activity {url} -s v0.7.2 -u v0.7.3 -o {path_output}"
102+
# Test PR tag/prefix splitting using recent consecutive releases
103+
cmd = f"github-activity {url} -s v1.0.2 -u v1.0.3 -o {path_output}"
105104
run(cmd.split(), check=True)
106105
md = path_output.read_text()
107106
md = md.split("## Contributors to this release")[0]
@@ -112,8 +111,8 @@ def test_cli_all(tmpdir, file_regression):
112111
"""Test that a full changelog is created"""
113112
path_tmp = Path(tmpdir)
114113
path_output = path_tmp.joinpath("out.md")
115-
# Limit to recent releases instead of --all to reduce API calls
116-
cmd = f"github-activity executablebooks/github-activity -s v0.2.0 -u v0.3.0 -o {path_output}"
114+
# Use recent consecutive releases to reduce API calls
115+
cmd = f"github-activity executablebooks/github-activity -s v1.0.2 -u v1.0.3 -o {path_output}"
117116
run(cmd.split(), check=True)
118117
md = path_output.read_text()
119118
file_regression.check(md, extension=".md")
@@ -135,11 +134,10 @@ def test_contributor_sorting(tmpdir, file_regression):
135134
path_tmp = Path(tmpdir)
136135
path_output = path_tmp.joinpath("out.md")
137136

138-
org, repo = ("jupyter-book", "mystmd")
137+
org, repo = ("executablebooks", "github-activity")
139138

140-
cmd = (
141-
f"github-activity {org}/{repo} -s mystmd@1.5.1 -u mystmd@1.6.0 -o {path_output}"
142-
)
139+
# Test contributor sorting using recent consecutive releases
140+
cmd = f"github-activity {org}/{repo} -s v0.2.0 -u v0.3.0 -o {path_output}"
143141
run(cmd.split(), check=True)
144142
md = path_output.read_text()
145143
file_regression.check(md, extension=".md")

tests/test_cli/test_cli_all.md

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,22 @@
1-
# v0.2.0...v0.3.0
1+
# v1.0.2...v1.0.3
22

3-
([full changelog](https://github.com/executablebooks/github-activity/compare/v0.2.0...v0.3.0))
3+
([full changelog](https://github.com/executablebooks/github-activity/compare/v1.0.2...v1.0.3))
44

5-
## New features added
5+
## Documentation improvements
66

7-
- Add ability to use GH CLI Authentication [#66](https://github.com/executablebooks/github-activity/pull/66) ([@choldgraf](https://github.com/choldgraf))
7+
- Add changelog for v1.0.3 [#120](https://github.com/executablebooks/github-activity/pull/120) ([@consideRatio](https://github.com/consideRatio))
8+
- Add changelog for v1.0.2 [#117](https://github.com/executablebooks/github-activity/pull/117) ([@consideRatio](https://github.com/consideRatio))
89

9-
## Enhancements made
10+
## Continuous integration improvements
1011

11-
- [ENH] Add a bootstrap function for all changelog entries [#64](https://github.com/executablebooks/github-activity/pull/64) ([@blink1073](https://github.com/blink1073), [@choldgraf](https://github.com/choldgraf), [@jtpio](https://github.com/jtpio))
12-
13-
## Bugs fixed
14-
15-
- BUG: import dateutil.parser [#73](https://github.com/executablebooks/github-activity/pull/73) ([@agoose77](https://github.com/agoose77), [@choldgraf](https://github.com/choldgraf), [@consideRatio](https://github.com/consideRatio))
16-
17-
## Maintenance and upkeep improvements
18-
19-
- MAINT: Add check for installed gh cli [#72](https://github.com/executablebooks/github-activity/pull/72) ([@choldgraf](https://github.com/choldgraf), [@stefanv](https://github.com/stefanv))
12+
- ci: fix github action tag in publish workflow [#119](https://github.com/executablebooks/github-activity/pull/119) ([@consideRatio](https://github.com/consideRatio))
13+
- ci: fix location of dependabot.yaml [#118](https://github.com/executablebooks/github-activity/pull/118) ([@consideRatio](https://github.com/consideRatio))
2014

2115
## Contributors to this release
2216

2317
The following people contributed discussions, new ideas, code and documentation contributions, and review.
2418
See [our definition of contributors](https://github-activity.readthedocs.io/en/latest/#how-does-this-tool-define-contributions-in-the-reports).
2519

26-
([GitHub contributors page for this release](https://github.com/executablebooks/github-activity/graphs/contributors?from=2021-12-01&to=2023-02-13&type=c))
20+
([GitHub contributors page for this release](https://github.com/executablebooks/github-activity/graphs/contributors?from=2025-04-11&to=2025-04-11&type=c))
2721

28-
@agoose77 ([activity](https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Aagoose77+updated%3A2021-12-01..2023-02-13&type=Issues)) | @blink1073 ([activity](https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Ablink1073+updated%3A2021-12-01..2023-02-13&type=Issues)) | @choldgraf ([activity](https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Acholdgraf+updated%3A2021-12-01..2023-02-13&type=Issues)) | @consideRatio ([activity](https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3AconsideRatio+updated%3A2021-12-01..2023-02-13&type=Issues)) | @jtpio ([activity](https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Ajtpio+updated%3A2021-12-01..2023-02-13&type=Issues)) | @stefanv ([activity](https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Astefanv+updated%3A2021-12-01..2023-02-13&type=Issues))
22+
@consideRatio ([activity](https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3AconsideRatio+updated%3A2025-04-11..2025-04-11&type=Issues))
Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,28 @@
1-
# mystmd@1.5.1...mystmd@1.6.0
1+
# v0.2.0...v0.3.0
22

3-
([full changelog](https://github.com/jupyter-book/mystmd/compare/mystmd@1.5.1...mystmd@1.6.0))
3+
([full changelog](https://github.com/executablebooks/github-activity/compare/v0.2.0...v0.3.0))
44

5-
## Enhancements made
5+
## New features added
66

7-
- 🎯 Render static HTML pages to expected server path [#2178](https://github.com/jupyter-book/mystmd/pull/2178) ([@stefanv](https://github.com/stefanv), [@agoose77](https://github.com/agoose77), [@bsipocz](https://github.com/bsipocz), [@choldgraf](https://github.com/choldgraf), [@rowanc1](https://github.com/rowanc1))
8-
- 🔗 Fix URLs in table of contents directive [#2140](https://github.com/jupyter-book/mystmd/pull/2140) ([@brianhawthorne](https://github.com/brianhawthorne), [@rowanc1](https://github.com/rowanc1), [@stefanv](https://github.com/stefanv))
7+
- Add ability to use GH CLI Authentication [#66](https://github.com/executablebooks/github-activity/pull/66) ([@choldgraf](https://github.com/choldgraf))
98

10-
## Bugs fixed
9+
## Enhancements made
1110

12-
- 🏷️ Add NPM binary name to whitelabelling [#2175](https://github.com/jupyter-book/mystmd/pull/2175) ([@agoose77](https://github.com/agoose77), [@rowanc1](https://github.com/rowanc1), [@stefanv](https://github.com/stefanv))
13-
- Add `ipynb` format option in validators [#2159](https://github.com/jupyter-book/mystmd/pull/2159) ([@kp992](https://github.com/kp992), [@agoose77](https://github.com/agoose77))
11+
- [ENH] Add a bootstrap function for all changelog entries [#64](https://github.com/executablebooks/github-activity/pull/64) ([@blink1073](https://github.com/blink1073), [@choldgraf](https://github.com/choldgraf), [@jtpio](https://github.com/jtpio))
1412

15-
## Documentation improvements
13+
## Bugs fixed
1614

17-
- 📖 Remove out of date readme note [#2155](https://github.com/jupyter-book/mystmd/pull/2155) ([@rowanc1](https://github.com/rowanc1), [@choldgraf](https://github.com/choldgraf))
18-
- 📖 A few miscellaneous documentation updates [#2154](https://github.com/jupyter-book/mystmd/pull/2154) ([@rowanc1](https://github.com/rowanc1))
15+
- BUG: import dateutil.parser [#73](https://github.com/executablebooks/github-activity/pull/73) ([@agoose77](https://github.com/agoose77), [@choldgraf](https://github.com/choldgraf), [@consideRatio](https://github.com/consideRatio))
1916

20-
## Other merged PRs
17+
## Maintenance and upkeep improvements
2118

22-
- 🚀 Release [#2180](https://github.com/jupyter-book/mystmd/pull/2180) ([@rowanc1](https://github.com/rowanc1))
23-
- 🚀 Release [#2130](https://github.com/jupyter-book/mystmd/pull/2130) ([@rowanc1](https://github.com/rowanc1))
19+
- MAINT: Add check for installed gh cli [#72](https://github.com/executablebooks/github-activity/pull/72) ([@choldgraf](https://github.com/choldgraf), [@stefanv](https://github.com/stefanv))
2420

2521
## Contributors to this release
2622

2723
The following people contributed discussions, new ideas, code and documentation contributions, and review.
2824
See [our definition of contributors](https://github-activity.readthedocs.io/en/latest/#how-does-this-tool-define-contributions-in-the-reports).
2925

30-
([GitHub contributors page for this release](https://github.com/jupyter-book/mystmd/graphs/contributors?from=2025-07-05&to=2025-07-21&type=c))
26+
([GitHub contributors page for this release](https://github.com/executablebooks/github-activity/graphs/contributors?from=2021-12-01&to=2023-02-13&type=c))
3127

32-
@agoose77 ([activity](https://github.com/search?q=repo%3Ajupyter-book%2Fmystmd+involves%3Aagoose77+updated%3A2025-07-05..2025-07-21&type=Issues)) | @brian-rose ([activity](https://github.com/search?q=repo%3Ajupyter-book%2Fmystmd+involves%3Abrian-rose+updated%3A2025-07-05..2025-07-21&type=Issues)) | @brianhawthorne ([activity](https://github.com/search?q=repo%3Ajupyter-book%2Fmystmd+involves%3Abrianhawthorne+updated%3A2025-07-05..2025-07-21&type=Issues)) | @bsipocz ([activity](https://github.com/search?q=repo%3Ajupyter-book%2Fmystmd+involves%3Absipocz+updated%3A2025-07-05..2025-07-21&type=Issues)) | @choldgraf ([activity](https://github.com/search?q=repo%3Ajupyter-book%2Fmystmd+involves%3Acholdgraf+updated%3A2025-07-05..2025-07-21&type=Issues)) | @kp992 ([activity](https://github.com/search?q=repo%3Ajupyter-book%2Fmystmd+involves%3Akp992+updated%3A2025-07-05..2025-07-21&type=Issues)) | @naokic3 ([activity](https://github.com/search?q=repo%3Ajupyter-book%2Fmystmd+involves%3Anaokic3+updated%3A2025-07-05..2025-07-21&type=Issues)) | @rowanc1 ([activity](https://github.com/search?q=repo%3Ajupyter-book%2Fmystmd+involves%3Arowanc1+updated%3A2025-07-05..2025-07-21&type=Issues)) | @stefanv ([activity](https://github.com/search?q=repo%3Ajupyter-book%2Fmystmd+involves%3Astefanv+updated%3A2025-07-05..2025-07-21&type=Issues)) | @stevejpurves ([activity](https://github.com/search?q=repo%3Ajupyter-book%2Fmystmd+involves%3Astevejpurves+updated%3A2025-07-05..2025-07-21&type=Issues))
28+
@agoose77 ([activity](https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Aagoose77+updated%3A2021-12-01..2023-02-13&type=Issues)) | @blink1073 ([activity](https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Ablink1073+updated%3A2021-12-01..2023-02-13&type=Issues)) | @choldgraf ([activity](https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Acholdgraf+updated%3A2021-12-01..2023-02-13&type=Issues)) | @consideRatio ([activity](https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3AconsideRatio+updated%3A2021-12-01..2023-02-13&type=Issues)) | @jtpio ([activity](https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Ajtpio+updated%3A2021-12-01..2023-02-13&type=Issues)) | @stefanv ([activity](https://github.com/search?q=repo%3Aexecutablebooks%2Fgithub-activity+involves%3Astefanv+updated%3A2021-12-01..2023-02-13&type=Issues))

tests/test_cli/test_pr_split.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
# v0.7.2...v0.7.3
1+
# v1.0.2...v1.0.3
22

3-
([full changelog](https://github.com/jupyter-book/jupyter-book/compare/v0.7.2...v0.7.3))
3+
([full changelog](https://github.com/executablebooks/github-activity/compare/v1.0.2...v1.0.3))
44

5-
## API and Breaking Changes
5+
## Documentation improvements
66

7-
- 👌 IMPROVE: improving numbered sections [#826](https://github.com/jupyter-book/jupyter-book/pull/826) ([@choldgraf](https://github.com/choldgraf))
7+
- Add changelog for v1.0.3 [#120](https://github.com/executablebooks/github-activity/pull/120) ([@consideRatio](https://github.com/consideRatio))
8+
- Add changelog for v1.0.2 [#117](https://github.com/executablebooks/github-activity/pull/117) ([@consideRatio](https://github.com/consideRatio))
9+
10+
## Continuous integration improvements
11+
12+
- ci: fix github action tag in publish workflow [#119](https://github.com/executablebooks/github-activity/pull/119) ([@consideRatio](https://github.com/consideRatio))
13+
- ci: fix location of dependabot.yaml [#118](https://github.com/executablebooks/github-activity/pull/118) ([@consideRatio](https://github.com/consideRatio))
814

0 commit comments

Comments
 (0)