Skip to content

Commit

Permalink
Merge pull request #214 from hugovk/updates
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk authored Feb 19, 2022
2 parents 4e3dde2 + 3e04486 commit 2f3d436
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
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

0 comments on commit 2f3d436

Please sign in to comment.