diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3a758427..338fb1a5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 diff --git a/README.md b/README.md index da3257b2..f46f4d2f 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/scripts/gpo_member_photos.py b/scripts/gpo_member_photos.py index ee2b6798..6c649881 100755 --- a/scripts/gpo_member_photos.py +++ b/scripts/gpo_member_photos.py @@ -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() @@ -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( diff --git a/scripts/missing.py b/scripts/missing.py index bb09521e..7b426a52 100644 --- a/scripts/missing.py +++ b/scripts/missing.py @@ -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" )