-
Notifications
You must be signed in to change notification settings - Fork 2
David/refactor units #42
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
Conversation
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.
perdón, otra reunion sobre esto
mnemonics = [] | ||
for axis in axes: | ||
for trace in axis.get_traces(): | ||
mnemonics.append(trace.get_mnemonic()) | ||
self.pop_axes( | ||
*mnemonics, strict_index=False, exclude=kwargs.get("exclude", None) | ||
) | ||
self.add_axes(*axes, **kwargs) |
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.
el formateo tiene mal gusto? Este me parece raro creo que hay un problema con github
pozo/units/__init__.py
Outdated
import pint | ||
from IPython.display import HTML, display | ||
|
||
from .registry_config import registry_defines, registry_mapping |
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.
estilo nodejs, yo todavia prefiero el namespace
from . import registry_config
registry_config.registry_defines()
registry_config.registry_mapping()
# o mejor
registry_config.init_defines()
registry_config.init_mapping()
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.
pozo/units/__init__.py
Outdated
red_low = re.compile(r'<td>(.+)?(?:LOW|NONE)(.+)?</td>') | ||
orange_medium = re.compile(r'<td>(.+)?MEDIUM(.+)?</td>') | ||
|
||
def check_las(las, registry=registry, HTML_out=True, divid=""): |
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.
def check_las(las, registry=registry, *, HTML=True, div_id=""):
no recuerdo por que tengo HTML_out=True/False?
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.
Por esto:
result = [delimiter.join(col_names)] if HTML_out else []
self._mnemonic_to_units = {} | ||
self._units_to_mnemonic = {} | ||
|
||
def register_mapping(self, mnemonic, unit, ranges): |
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.
necesito tipos y tambien documentación para entender lo que hice
|
||
self._mnemonic_to_units[mnemonic][unit] = ranges | ||
|
||
for ra in ranges: |
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.
"ra in ranges" 🙄 que hice
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.
mejor "r" o "range"?
if mnemonic not in self._mnemonic_to_units: | ||
self._mnemonic_to_units[mnemonic] = {} | ||
self._units_to_mnemonic[mnemonic] = {} |
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.
debo usar setdefault
# Or would we just use a default registery like in init | ||
class LasRegistry(pint.UnitRegistry): | ||
# Or would we just use a default register like in init | ||
class LasUnitRegistry(pint.UnitRegistry): |
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.
no es posible quitarnos de esta clase de alguna forma?
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.
y también proveer una api bien simplificada
"lasio" | ||
] | ||
"lasio", | ||
"anywidget>=0.9.18", |
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.
creo que ipywidgets y anywidgets estan.... juntos, tal vez
anywidget tiene ipywidget o al reves
No description provided.