Skip to content

fix(chen2021Fitness): don't hand out invalid JSON when there are not enough data to compute a fit #42

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

Conversation

fengelniederhammer
Copy link
Contributor

Some values were NaN or Infinity, which are no valid JSON tokens. Instead throw an error.

resolves #41

This PR tries to be minimally invasive, as this repo is mostly in maintenance mode. I only added what is necessary to fix the issue. As this repo has no test coverage, I don't want to risk more than necessary.

How I tested this locally:

  • I had to update the dependencies in the model to run the Python code. My requirements.txt looks as follows:
click==7.1.2
Flask==1.1.2
gunicorn==20.0.4
itsdangerous==1.1.0
Jinja2==2.11.3
MarkupSafe==1.1.1
numpy==1.22.3
pandas==1.4
patsy==0.5.6
python-dateutil==2.8.1
pytz==2021.1
scipy==1.8.0
six==1.15.0
statsmodels==0.14.4
Werkzeug==1.0.1

…enough data to compute a fit

Some values were NaN or Infinity, which are no valid JSON tokens. Instead throw an error.

resolves #41
Copy link

@JonasKellerer JonasKellerer left a comment

Choose a reason for hiding this comment

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

LGTM

@fengelniederhammer fengelniederhammer merged commit 1702603 into develop Jan 17, 2025
2 checks passed
@fengelniederhammer fengelniederhammer deleted the 41-error-in-relative-growth-advantage-visualization branch January 17, 2025 07:56
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.

Error in Relative Growth Advantage Visualization
2 participants