Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix coverage upload #214

Merged
merged 3 commits into from
Feb 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
coverage run --append --source scripts test/test_gpo_member_photos.py
coverage run --append --source scripts scripts/missing.py
coverage report
coverage xml

- name: Upload coverage
uses: codecov/codecov-action@v2
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ repo (and have `svn` installed), you can just do something like this:
## Gathering more photos

[![GitHub Actions status](https://github.com/unitedstates/images/workflows/Test/badge.svg)](https://github.com/unitedstates/images/actions)
[![codecov](https://codecov.io/gh/unitedstates/images/branch/master/graph/badge.svg)](https://codecov.io/gh/unitedstates/images)
[![codecov](https://codecov.io/gh/unitedstates/images/branch/gh-pages/graph/badge.svg)](https://codecov.io/gh/unitedstates/images)

This project uses a Python script that scrapes the
[Government Printing Office's Member Guide](https://memberguide.gpo.gov/) for official
Expand Down
4 changes: 2 additions & 2 deletions scripts/gpo_member_photos.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def pause(last, delay):

if delta < delay:
sleep = delay - delta
print("Sleep for", int(sleep), "seconds")
print(f"Sleep for {sleep} seconds")
time.sleep(sleep)
return datetime.datetime.now()

Expand All @@ -50,7 +50,7 @@ def get_photo_list(br, congress_number, delay):
page = 1
while True:
# Fetch a page of results from Congress.gov.
print("Page %d of Congress.gov Member listing..." % page)
print(f"Page {page} of Congress.gov Member listing...")
response = br.get(
"https://www.congress.gov/search?"
+ urlencode(
Expand Down
3 changes: 1 addition & 2 deletions scripts/missing.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ def download_legislator_data():
# these two == git pull, but git pull ignores -q on the merge part
# so is less quiet
os.system(
"cd congress-legislators; git fetch -pq; "
"git merge --ff-only -q origin/master"
"cd congress-legislators; git fetch -pq; git merge --ff-only -q origin/main"
)


Expand Down