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

Refactor Syntactic Warnings #380

Merged
merged 8 commits into from
Jan 19, 2023
Merged

Refactor Syntactic Warnings #380

merged 8 commits into from
Jan 19, 2023

Conversation

gabegma
Copy link
Contributor

@gabegma gabegma commented Jan 17, 2023

Part of #383

Description:

First pass at refactoring dataset warnings to eventually allow them to run on just one dataset split.

Checklist:

You should check all boxes before the PR is ready. If a box does not apply, check it to acknowledge it.

  • ISSUE NUMBER. You linked the issue number (Ex: Resolve #XXX).
  • PRE-COMMIT. You ran pre-commit on all commits, or else, you
    ran pre-commit run --all-files at the end.
  • USER CHANGES. The changes are added to CHANGELOG.md and the documentation, if they impact
    our users.
  • DEV CHANGES.
    • Update the documentation if this PR changes how to develop/launch on the app.
    • Update the README files and our wiki for any big design decisions, if relevant.
    • Add unit tests, docstrings, typing and comments for complex sections.

Copy link
Contributor

@JosephMarinier JosephMarinier left a comment

Choose a reason for hiding this comment

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

I think we can simplify a couple of loops by using of .items() instead of .keys(). In fact, it's quite rare that we need .keys(), we almost always also need the values.

azimuth/plots/dataset_warnings.py Outdated Show resolved Hide resolved
azimuth/plots/dataset_warnings.py Outdated Show resolved Hide resolved
azimuth/modules/dataset_analysis/dataset_warnings.py Outdated Show resolved Hide resolved
Copy link
Contributor

@JosephMarinier JosephMarinier left a comment

Choose a reason for hiding this comment

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

What a breath of fresh air! Good job!
I only had some small comments about cosmetic changes, for readability. The architecture and the logic look perfect! 👍

@gabegma gabegma changed the title Adapt Dataset Warnings so it can work with only one dataset split Refactor Syntactic Warnings Jan 19, 2023
@gabegma gabegma marked this pull request as ready for review January 19, 2023 16:58
@gabegma gabegma enabled auto-merge (squash) January 19, 2023 20:49
@gabegma gabegma merged commit 86c73aa into main Jan 19, 2023
@gabegma gabegma deleted the ggm/refactor-dataset-warnings branch January 19, 2023 21:07
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