Skip to content

Commit

Permalink
logging fix, deduplication files fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dlubom committed Jul 24, 2024
1 parent b3f370d commit 4ecbc72
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/monthly_data_fetch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ jobs:

- name: Sort and remove duplicates
run: |
cat iata_code_fetcher/carrier_data_full.jsonl | sort | uniq > iata_code_fetcher/carrier_data_full_unique.jsonl
cat iata_code_fetcher/airport_data_full.jsonl | sort | uniq > iata_code_fetcher/airport_data_full_unique.jsonl
cat carrier_data_full.jsonl | sort | uniq > carrier_data_full_unique.jsonl
cat airport_data_full.jsonl | sort | uniq > airport_data_full_unique.jsonl
- name: Commit changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add iata_code_fetcher/carrier_data_full_unique.jsonl iata_code_fetcher/airport_data_full_unique.jsonl
git add carrier_data_full_unique.jsonl airport_data_full_unique.jsonl
git commit -m 'Update unique data files [skip ci]'
git push
env:
Expand Down
Empty file.
Empty file.
2 changes: 1 addition & 1 deletion iata_code_fetcher/fetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def fetch_and_process_data(code: str, code_type: CodeType) -> List[Dict[str, str
table = soup.find("table", {"class": "datatable"})

if not table:
raise ValueError("No table found or error in response")
raise ValueError("No record found")

headers = [th.text.strip() for th in table.find_all("td")]
rows = []
Expand Down

0 comments on commit 4ecbc72

Please sign in to comment.