Skip to content

Commit

Permalink
* Import scaling into uw. (#554)
Browse files Browse the repository at this point in the history
* Fix docstrings & doctests.
* Rename pull request template as Github doesn't appear
  to register it with upper case naming.
* Fix test in config which Py3.8 is complaining about.
  • Loading branch information
jmansour committed Jul 7, 2021
1 parent 1c314e6 commit 19d3c5d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
File renamed without changes.
1 change: 1 addition & 0 deletions underworld/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ def _set_init_sig_as_sig(mod):
_set_init_sig_as_sig(underworld.utils)
timing._add_timing_to_mod(underworld.utils)

import underworld.scaling

# to allow our legacy doctest formats
try:
Expand Down
2 changes: 1 addition & 1 deletion underworld/libUnderworld/config/utils/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def make_help_string(self):
elif v.type == "enum":
help += v._pref_sep + "<%s>" % "|".join(v.enum.values())
elif v.type == "bool":
if v._pref_true_flag is "":
if v._pref_true_flag == "":
help = "[" + help + "]"
else:
help += v._pref_sep + "<" + v._pref_true_flag + \
Expand Down
11 changes: 7 additions & 4 deletions underworld/scaling/_scaling.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,17 @@ def non_dimensionalise(dimValue):
Parameters
----------
dimValue : pint quantity
dimValue : pint.Quantity
A pint quantity.
Returns
-------
float: The scaled value.
float
The scaled value.
Example
-------
Example:
--------
>>> import underworld as uw
>>> u = uw.scaling.units
Expand Down
2 changes: 1 addition & 1 deletion underworld/systems/_energy_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def _check_linearity(self, nonLinearIterate):

def configure(self,solve_type=""):
"""
Configure velocity/inner solver (A11 PETSc prefix).
Configure solver.
solve_type can be one of:
Expand Down

0 comments on commit 19d3c5d

Please sign in to comment.