| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
1034: fix for key error in numpy.pad r=hgrecco a=mark-boer
- [x] Closes #1026
- [x] Executed ``black -t py36 . && isort -rc . && flake8`` with no errors
- [x] The change is fully covered by automated unit tests
- [x] Documented in docs/ as appropriate
- [x] Added an entry to the CHANGES file
Co-authored-by: mark-boer <m.h.boer.2@gmail.com>
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |\ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
1031: Rename `ParsedDefinition` to `PreprocessedDefinition` r=hgrecco a=hgrecco
Close #1010
- [x] Closes #1010 (insert issue number)
- [x] Executed ``black -t py36 . && isort -rc . && flake8`` with no errors
- [x] The change is fully covered by automated unit tests
- [x] Documented in docs/ as appropriate
- [x] Added an entry to the CHANGES file
Co-authored-by: Hernan <hernan.grecco@gmail.com>
|
| |/ /
| | |
| | |
| | | |
Close #1010
|
| |\ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
993: WIP: compatibility checks r=hgrecco a=keewis
Continuing from the issue, this is the code from #988. It is missing documentation and tests right now; I will add these later. Also, I am not sure where to put a potential top-level function.
- [x] Closes #988
- [x] Executed ``black -t py36 . && isort -rc . && flake8`` with no errors
- [ ] The change is fully covered by automated unit tests
- [ ] Documented in docs/ as appropriate
- [ ] Added an entry to the CHANGES file
Co-authored-by: Keewis <keewis@posteo.de>
|
| | | | |
|
| | | | |
|
| |\ \ \
| | | | |
| | | | | |
Adding pint-convert script (see #1012)
|
| | |\ \ \
| | |/ / /
| |/| | | |
|
| |\ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
1023: Make `__str__` and `__format__` locale aware r=hgrecco a=hgrecco
With this commit, all string formatting operations are locale aware
>>> ureg.set_fmt_locale('fr_FR')
>>> str(accel)
'1.3 mètre par seconde²'
>>> "%s" % accel
'1.3 mètre par seconde²'
>>> "{}".format(accel)
'1.3 mètre par seconde²'
It should not break any code as the default locale value for the
Registry is `None` (meaning do not localize).
Close #984
- [x] Closes #984 (insert issue number)
- [x] Executed ``black -t py36 . && isort -rc . && flake8`` with no errors
- [x] The change is fully covered by automated unit tests
- [x] Documented in docs/ as appropriate
- [x] Added an entry to the CHANGES file
Co-authored-by: Hernan <hernan.grecco@gmail.com>
Co-authored-by: Hernan Grecco <hernan.grecco@gmail.com>
|
| | |\ \ \ \
| | |/ / / /
| |/| | | | |
|
| |\ \ \ \ \
| | |_|_|_|/
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
1029: Remove array interface protocol fallback and NEP 18 warning r=hgrecco a=jthielen
As mentioned in #1011, this PR removes the array interface protocol fallback that was deprecated in 0.10, as well as the NEP 18 warning on first array Quantity creation.
- ~~Closes # (insert issue number)~~
- [x] Executed ``black -t py36 . && isort -rc . && flake8`` with no errors
- [x] The change is fully covered by automated unit tests
- [x] Documented in docs/ as appropriate
- [x] Added an entry to the CHANGES file
Co-authored-by: Jon Thielen <github@jont.cc>
|
| | | | | | |
|
| |/ / / / |
|
| |\ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
1025: Use setuptools_scm via pyproject.toml r=hgrecco a=KOLANICH
- [x] Executed ``black -t py36 . && isort -rc .`` with no errors
`flake8`:
```
./pint/measurement.py:53:17: F999 '...'.format(...) has unused arguments at position(s): 0, 1
./pint/testsuite/test_numpy.py:1051:21: F999 f-string is missing placeholders
```
But this PR doesn't touch this files.
- [x] The change is fully covered by automated unit tests
- [x] Documented in docs/ as appropriate
- [x] Added an entry to the CHANGES file
Co-authored-by: KOLANICH <kolan_n@mail.ru>
|
| |/ / / / |
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
With this commit, all string formatting operations are locale aware
>>> ureg.set_fmt_locale('fr_FR')
>>> str(accel)
'1.3 mètre par seconde²'
>>> "%s" % accel
'1.3 mètre par seconde²'
>>> "{}".format(accel)
'1.3 mètre par seconde²'
It should not break any code as the default locale value for the
Registry is `None` (meaning do not localize).
Close #984
|
| | | | |
|
| | | | |
|
| |/ / |
|
| |\ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
998: Add parse_pattern function r=hgrecco a=abmyii
- [X] Closes #997.
- [X] Executed ``black -t py36 . && isort -rc . && flake8`` with no errors
- [x] The change is fully covered by automated unit tests
- [?] Documented in docs/ as appropriate
- [?] Added an entry to the CHANGES file
I don't like to open issues that I am able to implement myself, so I quickly made a POC implementation which seems to work quite well and is sufficient for my purposes.
Parsing with regex isn't as clean as parsing with the `parse` (https://github.com/r1chardj0n3s/parse) library which I initially thought of using, but I decided that after such a long time of being fully independent of third-party libraries, you wouldn't want to begin now. Thus readability has been sacrificed at the cost of upholding the design principles. Personally I don't mind as long as the feature is usable.
Thank you for this great module!
Co-authored-by: Abdurrahmaan Iqbal <abdurrahmaaniqbal@hotmail.com>
|
| | |/ |
|
| |\ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
1015: also treat NaN as a special value in pad r=hgrecco a=keewis
In #994, the `np.pad` implementation was modified to fail on non-quantity `constant_values` / `end_values` arguments, with a special exception for `0`. Throughout the code base, we treat `np.nan` the same way we treat `0` so we should do that in `np.pad`, too.
- [x] Executed ``black -t py36 . && isort -rc . && flake8`` with no errors
- [x] The change is fully covered by automated unit tests
Should be ready for merging.
Co-authored-by: Keewis <keewis@posteo.de>
|
| | | | |
|
| | | | |
|
| |\ \ \
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
1014: Organizational changes r=hgrecco a=hgrecco
- [x] Closes #985, #983
- [x] Executed ``black -t py36 . && isort -rc . && flake8`` with no errors
- [ ] ~The change is fully covered by automated unit tests~
- [ ] ~Documented in docs/ as appropriate~
- [x] Added an entry to the CHANGES file
Co-authored-by: Hernan <hernan.grecco@gmail.com>
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This file is no longer necessary and it can always be fetched
from github if needed
Closes #985
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | | |
Remove AUTHORS and CHANGES and replace them by a link to github
to improve readability in PyPI
Closes #983
|
| |\ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
1005: Update pandas support docs r=hgrecco a=keewis
This updates the `pandas` support page to warn about the support being experimental and to help with the installation and fixes the references to `PintType` and `PintArray`. Also a few other minor documentation fixes.
- [x] Closes #1001, closes #1003
- [x] Executed ``black -t py36 . && isort -rc . && flake8`` with no errors
- [ ] ~The change is fully covered by automated unit tests~
- [ ] Documented in docs/ as appropriate
- [ ] Added an entry to the CHANGES file
Edit: @hgrecco, could you reopen both of the linked issues so this can fix them?
Co-authored-by: Keewis <keewis@posteo.de>
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| |\ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
1013: Change default datatype to np.ptype("int") in test_numpy r=hgrecco a=5igno
The test function test_result_type_numpy_func checks the datatype for [[1, 2], [3, 4]] * self.ureg.m to be integer. The test originally ensured the datatype to be np.ptype("int64"), but that fails in 32 bit environments, as shown in issue #1006.
Using np.ptype("int") instead ensure that the quantity is of default integer type, making numpy itself decide whether it should be np.ptype("int64") or np.ptype("int32").
- [x] Closes #1006
- [x] Executed ``black -t py36 . && isort -rc . && flake8`` with no errors
- [x] The change is fully covered by automated unit tests
- [ ] Documented in docs/ as appropriate
- [ ] Added an entry to the CHANGES file
Co-authored-by: 5igno <signobox@gmail.com>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The test function test_result_type_numpy_func checks the datatype for [[1, 2], [3, 4]] * self.ureg.m to be integer. The test originally ensured the datatype to be np.ptype("int64"), but that fails in 32 bit environments.
Using np.ptype("int") instead ensure that the quantity is of default integer type, making numpy itself decide whether it should be np.ptype("int64") or np.ptype("int32").
- [x] Closes #1006
- [x] Executed ``black -t py36 . && isort -rc . && flake8`` with no errors
- [x] The change is fully covered by automated unit tests
- [ ] ~~Documented in docs/ as appropriate~~
- [ ] Added an entry to the CHANGES file
|
| |\ \ \ \
| | |/ / /
| | | / /
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
999: Preparing the codebase for a better Decimal support r=hgrecco a=hgrecco
This is a series of three commits to prepare the codebase for a better Decimal support. These are mostly and internal clean up and should not affect any user.
- [ ] ~~Closes # (insert issue number)~~
- [x] Executed ``black -t py36 . && isort -rc . && flake8`` with no errors
- [ ] ~~The change is fully covered by automated unit tests~~
- [ ] ~~Documented in docs/ as appropriate~~
- [x] Added an entry to the CHANGES file
Co-authored-by: Hernan <hernan.grecco@gmail.com>
|
| |\ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
996: Fix Bug Quantity to_compact r=hgrecco a=jules-ch
- Handles unit in to_compact function.
- Use same function infer_base_unit on Quantity based on input unit.
- Add unit test in test_issues.py
- [x] Closes #960
- [x] Executed ``black -t py36 . && isort -rc . && flake8`` with no errors
- [x] The change is fully covered by automated unit tests
- [x] Added an entry to the CHANGES file
Co-authored-by: Jules Chéron <jules.cheron@gmail.com>
|
| | | |/
| | |/|
| | | |
| | | |
| | | |
| | | | |
- Handles unit in to_compact.
- Use same function infer_base_unit on Quantity based on input unit.
- Add unit test in test_issues.py
|
| |\ \ \
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
994: treat non-quantity parameters to np.pad like dimensionless r=hgrecco a=keewis
- [x] Closes #992
- [x] Executed ``black -t py36 . && isort -rc . && flake8`` with no errors
- [x] The change is fully covered by automated unit tests
- [ ] Documented in docs/ as appropriate
- [ ] Added an entry to the CHANGES file
Co-authored-by: Keewis <keewis@posteo.de>
|
| | | | |
|
| |/ / |
|
| |\ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
989: Allow constants in units by using leading underscore r=hgrecco a=jni
See #507 for discussion.
This change allows code like the following:
```python
In [1]: from pint import UnitRegistry
In [2]: u = UnitRegistry()
In [3]: u.define('_100km = 100 * kilometer')
In [4]: u.define('mpg = 1 * mile / gallon')
In [5]: volt_petrol_ec = 5 * u.L / u._100km
In [6]: (1 / volt_petrol_ec).to(u.mpg)
Out[6]: 47.042916666666656 <Unit('mpg')>
```
- [x] Closes #507
- [x] Executed ``black -t py36 . && isort -rc . && flake8`` with no errors
- [x] The change is fully covered by automated unit tests
- [x] Documented in docs/ as appropriate
- [x] Added an entry to the CHANGES file
Co-authored-by: Juan Nunez-Iglesias <juan.nunez-iglesias@monash.edu>
|
| | | | |
|
| | | | |
|