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

Error Handling: advanced #114

Open
Jeniffere opened this issue Feb 16, 2022 · 2 comments
Open

Error Handling: advanced #114

Jeniffere opened this issue Feb 16, 2022 · 2 comments

Comments

@Jeniffere
Copy link
Collaborator

Check if further error handling and tests are necessary for

  • refdata.RefData.load()
  • make_entries(data, ags=ags, year=year)
  • Inputs(facts_and_assumptions=data.facts_and_assumptions(), entries=entries)
  • generator.calculate(inputs)
@Jeniffere
Copy link
Collaborator Author

@Jeniffere
Copy link
Collaborator Author

Why do we need to check these functions explicit?
--> Because the website uses the generator like this:

data = refdata.RefData.load()
entries = make_entries(data, ags=ags, year=year)
defaults = entries.copy()
entries.update(form.overriden_entries())
entries["city_name_long"] = form.cleaned_data.get("city")
entries["city"] = form.cleaned_data.get("city_name_pdf")
entries["In_name_author"] = form.cleaned_data.get("name_user")
entries["In_email"] = form.cleaned_data.get("email_user")
inputs = Inputs(facts_and_assumptions=data.facts_and_assumptions(), entries=entries)
result = generator.calculate(inputs)

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

No branches or pull requests

1 participant