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

Fix the duration field in all scenario JSON files, as a workaround to… #180

Merged
merged 1 commit into from Jul 14, 2021

Conversation

dabreegster
Copy link
Collaborator

a-b-street/abstr#29.

Using a python script again:

#!/usr/bin/python3
# ./fix_json.py data-small/*/scenario_*.json

import json
import sys

for path in sys.argv[1:]:
    with open(path) as f:
        data = json.load(f)
        for person in data['people']:
            assert(len(person['trips']) == 1)
            person['trips'][0]['departure'] = 10000 * person['trips'][0]['departure']

        with open(path, 'w') as f:
            f.write(json.dumps(data, indent=2))
            f.close()

and then reverting LCID, because that one file already had the changes from 6044e94

@@ -4,7 +4,7 @@
{
"trips": [
{
"departure": 30320,
"departure": 303200000,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@Robinlovelace Robinlovelace merged commit 5675d51 into cyipt:main Jul 14, 2021
@dabreegster dabreegster deleted the fix_json_again branch July 14, 2021 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants