Repository navigation
Conversation
|
I can't think of a valid reason to have imperial units available by default for science. Though does it mean that e.g. |
|
It would mean |
|
+1 for not including imperial units by default. |
|
👍 to this, but can you add a prominent explanation how to bring them in somewhere close to the top of the I totally agree this isn't usually useful for science, but occasionally one wants to do these conversions, and I have a feeling most users wouldn't realize this is here without having it prominently pointed out. |
|
I wonder whether we want to have to require the user to import otherwise it's not clear to the user that importing a module will add new attributes to |
|
+1 on some function-based approach. I saw the |
|
I would say -1 to |
|
If we do take the |
|
Also -- as suggested elsewhere, we should probably rename this from |
|
I think the ultimate solution to this is probably to have a list of namespaces that are searched for things -- that will make it easier to add and later remove categories of units. I don't know if that needs to hold up this PR, though, which I think is a step forward in any case. @eteq: In the part of the units documentation where the defined units are listed, it now includes an explanation about the fact that the imperial units are not included by default and how to get them. Is that sufficient? It seems like the right place to include this information. I'll also add this to some of the basic examples, which will put it front-and-center. |
There was a problem hiding this comment.
I suspect a fair number of people will only see this part, so it might be worth beefing it up just a bit with something like:
# Imperial units are not included when you import units
# but will be added if you import the `imperial` module
Or something like that.
|
Yep, it seems fine to me other than the minor suggestion above. There's also one test that is now failing. I think you just need to add the radioactivity units to the list in This does raise a minor concern that now the tests are somewhat non-deterministic, given that an import changes the package's state (order of tests is not necessarily guaranteed, I believe). Not a big deal to me, but perhaps worth noting at the top of the test file or something in case someone else gets tripped up by it. |
|
I think I'm just going to put this off as it is now and rethink this in the context of how we want to handle optional namespaces of units in general. |
|
Closing in favor of #1268. |
Currently we include a hodge-podge of U. S. imperial units in the default set of units.
Since these are not terribly useful for science or astronomy, and British imperial units which are likely to name clash with these, should we perhaps not include them by default, but instead require the user to
to access them?