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 script and workflow to update parameter_sets.py #1371

Merged
merged 12 commits into from
Feb 11, 2021

Conversation

priyanshuone6
Copy link
Member

@priyanshuone6 priyanshuone6 commented Feb 7, 2021

Description

Add a script to update docstring of parameter_sets.py
Add a workflow to automatically run the script and make a pull request when modified

Fixes #1033

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

@codecov
Copy link

codecov bot commented Feb 7, 2021

Codecov Report

Merging #1371 (2378c0f) into develop (51742ef) will increase coverage by 0.12%.
The diff coverage is 82.81%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1371      +/-   ##
===========================================
+ Coverage    98.13%   98.25%   +0.12%     
===========================================
  Files          277      277              
  Lines        15959    15689     -270     
===========================================
- Hits         15661    15415     -246     
+ Misses         298      274      -24     
Impacted Files Coverage Δ
pybamm/parameters/update_parameter_sets_doc.py 82.81% <82.81%> (ø)
pybamm/expression_tree/operations/evaluate.py 97.78% <0.00%> (-0.37%) ⬇️
pybamm/expression_tree/symbol.py 98.03% <0.00%> (-0.21%) ⬇️
pybamm/expression_tree/concatenations.py 97.60% <0.00%> (-0.17%) ⬇️
pybamm/solvers/base_solver.py 99.12% <0.00%> (-0.02%) ⬇️
..._battery_models/lithium_ion/basic_dfn_half_cell.py 99.31% <0.00%> (-0.01%) ⬇️
pybamm/models/base_model.py 99.10% <0.00%> (-0.01%) ⬇️
...m/models/full_battery_models/base_battery_model.py 99.68% <0.00%> (-0.01%) ⬇️
pybamm/expression_tree/functions.py 100.00% <0.00%> (ø)
pybamm/expression_tree/broadcasts.py 100.00% <0.00%> (ø)
... and 6 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 51742ef...2378c0f. Read the comment docs.

Copy link
Member

@valentinsulzer valentinsulzer left a comment

Choose a reason for hiding this comment

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

Thanks @priyanshuone6 , looks great!

Could you add some tests for the update_ps_doc.py functions (e.g. by breaking up into some sub-functions that can be tested?

Also, using the full parameter_sets in the name would be clearer than the ps abbreviation

update_ps_doc.py Outdated Show resolved Hide resolved
@priyanshuone6
Copy link
Member Author

I have tested it in my fork, please look at the workflow job and pull request created from it.

Copy link
Member

@valentinsulzer valentinsulzer left a comment

Choose a reason for hiding this comment

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

Thanks, looks like it's working well, just a formatting issue to fix and another test to add

update_ps_doc.py Outdated Show resolved Hide resolved
Copy link
Member

@valentinsulzer valentinsulzer left a comment

Choose a reason for hiding this comment

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

Thanks @priyanshuone6 , looks good, merging now

@valentinsulzer valentinsulzer merged commit f424535 into pybamm-team:develop Feb 11, 2021
@valentinsulzer
Copy link
Member

@all-contributors add @priyanshuone6 for code

@allcontributors
Copy link
Contributor

@tinosulzer

I've put up a pull request to add @priyanshuone6! 🎉

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.

add list to parameter sets docs
3 participants