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

Remove 'simplification' and other associated tests #1362 #1369

Merged
merged 19 commits into from
Feb 8, 2021

Conversation

asinghgaba
Copy link
Contributor

Description

Removed Simplification class and relevant tests associated with it. Also, moved simplify_if_constant() to symbol.py.
Fixes #1362
Completed all the tasks specified in #1362

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 (not required)
  • Tests added that prove fix is effective or that feature works (not required)

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 @asinghgaba! Just a couple of small things to change. Let's also wait to see if the coverage is still ok, I think it should be

CHANGELOG.md Outdated Show resolved Hide resolved
tests/unit/test_expression_tree/test_concatenations.py Outdated Show resolved Hide resolved
pybamm/expression_tree/symbol.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Feb 6, 2021

Codecov Report

Merging #1369 (d8c0061) into develop (3851b18) will increase coverage by 0.07%.
The diff coverage is 85.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1369      +/-   ##
===========================================
+ Coverage    98.13%   98.21%   +0.07%     
===========================================
  Files          277      276       -1     
  Lines        15959    15649     -310     
===========================================
- Hits         15661    15369     -292     
+ Misses         298      280      -18     
Impacted Files Coverage Δ
pybamm/expression_tree/binary_operators.py 98.49% <ø> (-0.23%) ⬇️
pybamm/expression_tree/concatenations.py 97.60% <ø> (-0.17%) ⬇️
pybamm/expression_tree/unary_operators.py 99.79% <ø> (-0.21%) ⬇️
pybamm/models/base_model.py 99.10% <ø> (-0.01%) ⬇️
...m/models/full_battery_models/base_battery_model.py 99.68% <ø> (-0.01%) ⬇️
..._battery_models/lithium_ion/basic_dfn_half_cell.py 99.31% <ø> (-0.01%) ⬇️
pybamm/solvers/base_solver.py 99.12% <ø> (-0.02%) ⬇️
pybamm/expression_tree/symbol.py 97.49% <85.00%> (-0.75%) ⬇️
pybamm/expression_tree/functions.py 98.99% <0.00%> (-1.01%) ⬇️
pybamm/expression_tree/broadcasts.py 99.20% <0.00%> (-0.80%) ⬇️
... 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 3851b18...7ac5a72. 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.

It turns out there are a few more things to delete (from the coverage report):

  • all the _unary_simplify functions
  • all the _binary_simplify functions
  • all the _concatenation_simplify functions

Then it should be done! There are some other coverage changes but each one requires different action so we can take care of later

Removed _concatenation_simplify()
Removed _unary_simplify()
Removed _binary_simplify()
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.

all good, merging

@valentinsulzer valentinsulzer merged commit 97b5f74 into pybamm-team:develop Feb 8, 2021
@valentinsulzer
Copy link
Member

@all-contributors add @asinghgaba for code

@allcontributors
Copy link
Contributor

@tinosulzer

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

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.

Remove Simplification class and associated tests
2 participants