-
-
Notifications
You must be signed in to change notification settings - Fork 572
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
#2763 start improving latexify #2764
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
This code snippet would allow us to update print names semi-automatically, not sure if it's a good idea though since it uses import pybamm
var2 = pybamm.Variable("var")
test = pybamm.Variable("c_e")
loc = {k: v for k, v in locals().items() if isinstance(v, pybamm.Symbol)}
for key, value in loc.items():
value.print_name = key
print(var2.print_name) # prints var2
print(test.print_name) # prints test Combined with this it might be fully automatable |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #2764 +/- ##
===========================================
- Coverage 99.68% 99.68% -0.01%
===========================================
Files 272 272
Lines 19031 19027 -4
===========================================
- Hits 18972 18968 -4
Misses 59 59
... and 1 file with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of code changed. Looks good to me!
I was struggling to understand the regex code so just rewrote it |
Description
Start improving latexify. Goal is for the output of SPM, SPMe, and DFN to be clean.
Fixes #2763
Fixes #2762
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.
Key checklist:
$ pre-commit run
(see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code)$ python run-tests.py --all
$ python run-tests.py --doctest
You can run unit and doctests together at once, using
$ python run-tests.py --quick
.Further checks: