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

add empty inits to parameters subfolders #1555

Merged
merged 3 commits into from
Jul 21, 2021

Conversation

TomTranter
Copy link
Contributor

@TomTranter TomTranter commented Jul 19, 2021

Description

When running scripts through spyder on windows (at least this is what I tested) if you press run twice there is an importlib KeyError. The kernel had to be restarted to fix the issue. Adding empty __init__files to parameter subfolders fixes the issue

Fixes #1479

Type of change

Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.

  • New feature (non-breaking change which adds functionality)
  • Optimization (back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)

Key checklist:

  • No style issues: $ flake8
  • All tests pass: $ python run-tests.py --unit
  • The documentation builds: $ cd docs and then $ make clean; make html

You can run all three at once, using $ python run-tests.py --quick.

Further checks:

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

@TomTranter TomTranter requested a review from tlestang July 19, 2021 10:01
@codecov
Copy link

codecov bot commented Jul 19, 2021

Codecov Report

Merging #1555 (4095246) into develop (f83f0a2) will decrease coverage by 0.50%.
The diff coverage is n/a.

❗ Current head 4095246 differs from pull request most recent head 68a8f8c. Consider uploading reports for the commit 68a8f8c to get more accurate results
Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1555      +/-   ##
===========================================
- Coverage    98.28%   97.78%   -0.51%     
===========================================
  Files          310      323      +13     
  Lines        17402    17491      +89     
===========================================
  Hits         17103    17103              
- Misses         299      388      +89     
Impacted Files Coverage Δ
...ectrolyte_exchange_current_density_Ramadass2004.py 0.00% <0.00%> (ø)
...o2_Ramadass2004/lico2_entropic_change_Moura2016.py 0.00% <0.00%> (ø)
...ectrodes/lico2_Ai2020/lico2_ocp_Ai2020_function.py 0.00% <0.00%> (ø)
...des/nmc_Chen2020/nmc_LGM50_diffusivity_Chen2020.py 0.00% <0.00%> (ø)
...rodes/lico2_Ramadass2004/lico2_ocp_Ramadass2004.py 0.00% <0.00%> (ø)
...Ramadass2004/graphite_entropic_change_Moura2016.py 0.00% <0.00%> (ø)
...ectrolyte_exchange_current_density_Ramadass2004.py 0.00% <0.00%> (ø)
...electrodes/nca_Kim2011/nca_ocp_Kim2011_function.py 0.00% <0.00%> (ø)
...2004/graphite_mcmb2528_diffusivity_Dualfoil1998.py 0.00% <0.00%> (ø)
...graphite_Ramadass2004/graphite_ocp_Ramadass2004.py 0.00% <0.00%> (ø)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f83f0a2...68a8f8c. Read the comment docs.

@rtimms
Copy link
Contributor

rtimms commented Jul 19, 2021

I guess we also need these for lead acid

@TomTranter
Copy link
Contributor Author

TomTranter commented Jul 21, 2021

Yep looks like you do. Just tried running compare_extrapolations twice and it failed. This is confusing slightly as I would have thought it would just break on import pybamm

@TomTranter
Copy link
Contributor Author

@rtimms @tlestang I am not sure how to test this on codecov - can you merge without?

Copy link
Contributor

@rtimms rtimms left a comment

Choose a reason for hiding this comment

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

thanks @TomTranter ! Yeah don't worry about coverage

@TomTranter TomTranter changed the title add empty inits to lithium_ion parameters subfolders add empty inits to parameters subfolders Jul 21, 2021
@TomTranter TomTranter removed the request for review from tlestang July 21, 2021 13:20
@TomTranter TomTranter merged commit e21d2da into develop Jul 21, 2021
@TomTranter TomTranter deleted the issue-1479-import-parameters-inits branch July 21, 2021 13:27
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.

pybamm fails when running script a second time in spyder on windows
2 participants