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

Allow partial reads and align with GTFS specifications for stop_lat, stop_long, and transfer_type #68

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
6 changes: 3 additions & 3 deletions pygtfs/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@ def append_feed(schedule, feed_filename, strip_fields=True,
read_records += 1
except:
skipped_records += 1
print(f"Failure while writing {record}")
print("Failure while writing {}".format(record))
if not ignore_failures:
raise
if i % chunk_size == 0 and i > 0:
schedule.session.flush()
sys.stdout.write('.')
sys.stdout.flush()
print(f'{read_records} records read for {gtfs_class}')
print(f'{skipped_records} records skipped for {gtfs_class}')
print('{0} records read for {1}'.format(read_records, gtfs_class))
InterferencePattern marked this conversation as resolved.
Show resolved Hide resolved
print('{0} records skipped for {1}'.format(skipped_records, gtfs_class))
schedule.session.flush()
schedule.session.commit()
# load many to many relationships
Expand Down