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

Example of how to write a test and refactor a class method #82

Merged
merged 5 commits into from
Mar 6, 2020

Conversation

willu47
Copy link
Contributor

@willu47 willu47 commented Dec 4, 2019

  • Adds a detailed test for diesel_cost_columns
    • passes in an artificial DataFrame
    • checks output against hand-computed values
  • Removes lambda functions and apply method against whole DataFrame
  • Current implementation copies only parts of dataframe required, and
    returns small dataframe with the two new columns
  • Starts using DataFrame.set_index() method to index dataframe on
    lat/lon coordinates

- Adds a detailed test for diesel_cost_columns
  - passes in an artificial DataFrame
  - checks output against hand-computed values
- Removes lambda functions and apply method against whole DataFrame
- Current implementation copies only parts of dataframe required, and
  returns small dataframe with the two new columns
- Adds extra lines in runner in which new data is merged into main
  dataframe
- Starts using `DataFrame.set_index()` method to index dataframe on
  lat/lon coordinates
@willu47
Copy link
Contributor Author

willu47 commented Mar 6, 2020

@AndreasSahlberg - please do merge this if you are happy with it.

@AndreasSahlberg AndreasSahlberg merged commit f186686 into master Mar 6, 2020
@AndreasSahlberg AndreasSahlberg deleted the will/test_diesel branch March 6, 2020 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants