Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork63
Allow passing multiple branches to build via CLI#235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
12 commits Select commitHold shift + click to select a range
f70b86d
Measure test coverage
hugovk22d1fba
Add a test for Version.filter for single version
hugovk08cf923
Add a test for Versions.filter for single version
hugovk6979d6c
Add a test for Version.filter with default branch
hugovk174c46d
Add a test for Versions.filter with default branch
hugovk40dc145
Allow passing multiple branches build via CLI
hugovkf7e617d
Use argparse's 'deprecated', added in 3.13
hugovkf85bbfc
Upgrade action
hugovk5b5d21a
Correct --language to --languages in README
hugovk7aef3ec
Just remove --branch
hugovk212ec60
Apply suggestions from code review
hugovk36e1eb5
Format
AA-TurnerFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
7 changes: 7 additions & 0 deletions.coveragerc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# .coveragerc to control coverage.py | ||
[report] | ||
# Regexes for lines to exclude from consideration | ||
exclude_also = | ||
# Don't complain if non-runnable code isn't run: | ||
if __name__ == .__main__.: |
7 changes: 7 additions & 0 deletions.github/workflows/test.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
7 changes: 6 additions & 1 deletionREADME.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
19 changes: 10 additions & 9 deletionsbuild_docs.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletionstests/test_build_docs_versions.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
from build_docs import Versions, Version | ||
def test_filter_default() -> None: | ||
# Arrange | ||
versions = Versions([ | ||
Version("3.14", status="feature"), | ||
Version("3.13", status="bugfix"), | ||
Version("3.12", status="bugfix"), | ||
Version("3.11", status="security"), | ||
Version("3.10", status="security"), | ||
Version("3.9", status="security"), | ||
]) | ||
# Act | ||
filtered = versions.filter() | ||
# Assert | ||
assert filtered == [ | ||
Version("3.14", status="feature"), | ||
Version("3.13", status="bugfix"), | ||
Version("3.12", status="bugfix"), | ||
] | ||
def test_filter_one() -> None: | ||
# Arrange | ||
versions = Versions([ | ||
Version("3.14", status="feature"), | ||
Version("3.13", status="bugfix"), | ||
Version("3.12", status="bugfix"), | ||
Version("3.11", status="security"), | ||
Version("3.10", status="security"), | ||
Version("3.9", status="security"), | ||
]) | ||
# Act | ||
filtered = versions.filter(["3.13"]) | ||
# Assert | ||
assert filtered == [Version("3.13", status="security")] | ||
def test_filter_multiple() -> None: | ||
# Arrange | ||
versions = Versions([ | ||
Version("3.14", status="feature"), | ||
Version("3.13", status="bugfix"), | ||
Version("3.12", status="bugfix"), | ||
Version("3.11", status="security"), | ||
Version("3.10", status="security"), | ||
Version("3.9", status="security"), | ||
]) | ||
# Act | ||
filtered = versions.filter(["3.13", "3.14"]) | ||
# Assert | ||
assert filtered == [ | ||
Version("3.14", status="feature"), | ||
Version("3.13", status="security"), | ||
] |
13 changes: 12 additions & 1 deletiontox.ini
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.