Skip to content

Commit

Permalink
Retrosheet June Release (#56)
Browse files Browse the repository at this point in the history
* incorporate june release

* fix fixture

* fix zip

* fix zip

* switch to eda
  • Loading branch information
droher authored Aug 25, 2020
1 parent 9f9caab commit 528bad9
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .env
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CHADWICK_VERSION=v0.7.2
BASEBALLDATABANK_VERSION=bb19ecb78e6be5764da32497ec165eb0aaab66a9
RETROSHEET_VERSION=75fe03a53e2add11441d1f012401e1aef299cf03
BASEBALLDATABANK_VERSION=5b2e55cf9d910fedffde7f6687ad8733d3896bc4
RETROSHEET_VERSION=16311cc6899f276d65dbf7d68bec7ea3bd797548

EXTRACT_DIR=extract
REPO=doublewick/boxball
VERSION=2020.1.1
VERSION=2020.2.0
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,5 @@ secrets.env

# to-do list
TODO.md

.idea/
Binary file modified extract/fixtures/extract/retrosheet/deduced_game.csv.zst
Binary file not shown.
Binary file modified extract/fixtures/raw/retrosheet.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions extract/parsers/retrosheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def _pbp_game_ids(pattern) -> Set[str]:
with fileinput.input(files) as fin:
for line in fin:
if line.startswith("id,"):
ids.add(line.split(",")[1])
ids.add(line.split(",")[1].strip())
print(f"Found {len(ids)} games under pattern {pattern}")
return ids

Expand Down Expand Up @@ -97,7 +97,7 @@ class RetrosheetParser:
@staticmethod
def write_deduced_gamelist():
tmpfile = OUTPUT_PATH / "deduced_game.csv"
tmpfile.write_text("\n".join(sorted(all_pbp_game_ids())) + "\n")
tmpfile.write_text("\n".join(sorted(deduced_game_ids())) + "\n")
print("Writing list of deduced PBP game IDs...")
compress(tmpfile, OUTPUT_PATH)

Expand Down

0 comments on commit 528bad9

Please sign in to comment.