-
Notifications
You must be signed in to change notification settings - Fork 437
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 test coverage #231
Comments
Hey! I would like to contribute to this issue :) Can you recommend any unit/function I could start with? |
Great @rockstaedt! It depends a bit on how deep you are in the pypsa code. I'd say for a first step try to tackle the functions
For
The test functions could go into a new test script like |
Great! Thanks 👍🏼 I'm on it! |
In the above commit, I created the unit tests for How do you want to proceed? Should I already open a pull request? I would be happy about every feedback :) |
Wonderful @rockstaedt, looks clean are usable! If you want, you can start a PR in draft mode and continue adding things (at least the madd would be good). As soon as you think you are ready we review and pull it in. |
Sounds good! I'll draft the pull request and continue with |
Tests for |
* Add tests for mremove #231 * Add tests for madd * Use a subset for generator components * Remove test_mremove_non_component Test function was removed because it has the same test behaviour as test_mremove_misspelled_component. * Use pandas series instead of list * Strengthen assertion * Rename function for better understanding Co-authored-by: Fabian Hofmann <hofmann@fias.uni-frankfurt.de>
@LukasFrankenQ and @pz-max will take care of at least one test as well |
Just finished my master thesis and have some time now. I could also do some unit tests. Any recommendations? |
hey @rockstaedt, that would be wonderful! How about |
@rockstaedt, if you scroll down here https://app.codecov.io/gh/PyPSA/PyPSA and open up the pypsa folder, you see the coverage of the individual modules, e.g. descriptors and networkclustering have quite low coverage. That should be tackled as well |
There are some modules where test coverage can improve. Let's target step by step:
io
:components
:madd()
mremove()
copy()
__getitem__()
akanetwork[:,:]
consistency_check()
linopt
:get_sol()
get_dual()
linopf
:ilopf()
opf
:pf
:sub_network_pf_singlebus()
aggregate_multi_graph()
as well as
networkclustering
plots
stats
The text was updated successfully, but these errors were encountered: