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

docs: add source for budget.json and validation script #581

Merged
merged 4 commits into from
Jul 25, 2024

Conversation

dsmedia
Copy link
Collaborator

@dsmedia dsmedia commented Jul 23, 2024

Partially addresses #15

Changes made:

  1. Adds source information for budgets.json to SOURCES.md
  2. Creats a new script validate_budget_data.py in the scripts directory to validate the budget data against the original source

@dsmedia dsmedia changed the title Add source for budget.json and validation script docs: add source for budget.json and validation script Jul 23, 2024
@domoritz
Copy link
Member

Rather than validating, should the script just generate the file? We can always check that the diff is empty in git. It would be more similar to the other scripts.

We could also run the script as part of the workflows if we want to have tests.

@domoritz
Copy link
Member

What changed about the dataset? I'm asking since it affects what version bump this implies.

…iginal dataset; add source information

* dataset generated from script is identical to existing budget.json
@dsmedia
Copy link
Collaborator Author

dsmedia commented Jul 24, 2024

What changed about the dataset? I'm asking since it affects what version bump this implies.

The original and script-generated budget.json files are identical in content, but differ in formatting: the original file has no space after the colons separating keys and values, while the script in my prior commit generated a json with a space after each colon. In this new commit, I've updated the script to generate a JSON formatted like the original.

Timeline of changes:

  1. Original state: budget.json had no spaces after colons separating keys and values.
  2. First commit:
    • Updated budget.py to generate JSON using default formatting of including spaces after colons.
    • Included the newly generated budget.json (identical content, different formatting).
  3. Latest commit:
    • Updated budget.py to generate JSON without spaces after colons (matching original format).
    • Updated budget.json to match the original formatting.

@domoritz
Copy link
Member

Having a space after the : is actually nice and a good practice. We can change the format without bumping the minor version. It's nice to see that the diff is empty after the format change. Let's undo 6615d79 and merge. Thank you!

Copy link
Member

@domoritz domoritz left a comment

Choose a reason for hiding this comment

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

Undo the last commit.

…at of original dataset; add source information"

This reverts commit 6615d79.
@domoritz domoritz merged commit 640292f into vega:main Jul 25, 2024
2 checks passed
@domoritz
Copy link
Member

Thank you

@dsmedia dsmedia deleted the docs/update-data-sources branch July 25, 2024 09:38
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.

2 participants