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

Improve complexity score coverage #102

Merged
merged 3 commits into from
Apr 14, 2023
Merged

Conversation

nonprofittechy
Copy link
Member

Add in two important factors to the overall score:

  1. The average length of expected answers in characters. I checked on the civil docketing statement and it scored ~ 7.5, so I am using a weight of 1/8th for now.
  2. The third party percentage, which looks like it was accidentally left out.

Fix #87 Fix #88

Comment on lines -1273 to +1310
val = min(max(stats[name], metric["clip"][0]), metric["clip"][1])
elif isinstance(stats[name], bool):
val = 1 if stats[name] else 0
val = min(max(stats.get(name,0), metric["clip"][0]), metric["clip"][1])
elif isinstance(stats.get(name), bool):
val = 1 if stats.get(name) else 0
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we take these changes back out? My idea was that I'd rather have the app crash if we are using the wrong name or spelling of a metric name, and going through parse_form once with one form is enough to catch these errors. It's much easier to see the crash and fix it than to realize we've been misspelling things for a month and some values have been silently turning into 0s.

Copy link
Member Author

Choose a reason for hiding this comment

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

My thought was I didn't want to break old links to cached stats

Copy link
Contributor

Choose a reason for hiding this comment

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

That's fair, but we should just recompute cached stats in that case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants