Skip to content

VALI-9484 Update to base branch #19

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

Merged
merged 553 commits into from
Apr 15, 2025
Merged

VALI-9484 Update to base branch #19

merged 553 commits into from
Apr 15, 2025

Conversation

antonio-perez-altium
Copy link

No description provided.

arjavtrivedi and others added 30 commits September 14, 2023 22:52
Here's hoping this fixes the CI/CD problem with test_1400.

Signed-off-by: Michael Tiemann <[email protected]>
Removing `system_packages: false` as suggested by @keewis

Signed-off-by: Michael Tiemann <[email protected]>
Fix isnan to use unp.isnan as appropriate for both duck_array_type and objects of UFloat types.

Fix a minor typo in pint/facets/__init__.py comment.

In test_issue_1400, use decorators to ensure babel library is loaded when needed.

pyproject.toml: revert change to testbase; we fixed with decorators instead.

Signed-off-by: Michael Tiemann <[email protected]>
…nties

This commit allows to parse uncertain numbers e.g. (1.0+/-0.2)e+03

Enable Pint to consume uncertain quantities.

Signed-off-by: [email protected]

* Fix problems identified by python -m pre_commit run --all-files

Signed-off-by: MichaelTiemann <[email protected]>

* Enhance support for `uncertainties`.  See hgrecco#1611, hgrecco#1614.

Signed-off-by: MichaelTiemann <[email protected]>

* Fix up failures and errors found by test suite.

Signed-off-by: MichaelTiemann <[email protected]>

* Copy in changes from PR1596

Signed-off-by: [email protected]

* Create modular uncertainty parser layer

Based on feedback, tokenize uncertainties on top of default tokenizer, not instead of default tokenizer.

Signed-off-by: MichaelTiemann <[email protected]>

* Fix conflict merge error

Signed-off-by: Michael Tiemann <[email protected]>

* Update util.py

Fixes problems parsing currency symbols that also show up when dealing with uncertainties.

Signed-off-by: Michael Tiemann <[email protected]>

* Update pint_eval.py

Handle negative numbers using uncertainty parenthesis notation.

Signed-off-by: Michael Tiemann <[email protected]>

* Update pint_eval.py

Ahem...use walrus operator for side-effect, not truth value.

Signed-off-by: Michael Tiemann <[email protected]>

* Fixed to work with both + and - e notation in the actually processing of the exponent, not just in the parsing of the exponent.

i.e., (5.01+/-0.07)e+04

Signed-off-by: Michael Tiemann <[email protected]>

* Fix test suite failures

Manually fix test_issue_1400.  Let other failures (which are not related to uncertainties) fail.

Signed-off-by: Michael Tiemann <[email protected]>

* Fix tokenizer merge error in pint/util.py

When using pint_eval.tokenizer don't try to import tokenizer from pint.compat.

Signed-off-by: Michael Tiemann <[email protected]>

* Merge cleanup: pint_eval.py needs tokenize

Clean up merge import error.

Signed-off-by: Michael Tiemann <[email protected]>

* Make black happier

Run `black` with default arguments to try to match whatever `black` wants to see in the CI/CD world.

Signed-off-by: Michael Tiemann <[email protected]>

* Make ruff happy

Remove unused redefinition of tokenizer in toktest.py.  Also remove unnecessary import of pint_eval from top-level (it's imported inside the function definition that needs it).

Signed-off-by: Michael Tiemann <[email protected]>

* Make ruff happier

Fix ruff errors missed in previous commit.

Signed-off-by: Michael Tiemann <[email protected]>

* Update toktest.py

Fix whitespace error created by `ruff --fix` that `black` didn't like.

Signed-off-by: Michael Tiemann <[email protected]>

* Update test_util.py

Follow deprecation of use_decimal from pint/util.py

Signed-off-by: Michael Tiemann <[email protected]>

* Fix additional regressions in test suite

If we have the uncertainties library loaded, go ahead and use the uncertainty_tokenizer by default.  This fixes problems with standard Pandas tests that expect the tokenizer to do the right thing without any special setup.

Also, prevent exception when a loop in consensus_name_attr (pandas-dev/pandas/core/common.py(86))) tests equality with a None argument.   Otherwise the zero_or_nan test raises an exception.

Signed-off-by: Michael Tiemann <[email protected]>

* Update quantity.py

Teach Pint's PlainQuantity about the Pandas pd.NA value so that ndim works.  Otherwise, it naively delegates to NumpyQuantity, which is the road to perdition for PintArrays.

Signed-off-by: Michael Tiemann <[email protected]>

* Make `babel` a dependency for testbase

Here's hoping this fixes the CI/CD problem with test_1400.

Signed-off-by: Michael Tiemann <[email protected]>

* Update .readthedocs.yaml

Removing `system_packages: false` as suggested by @keewis

Signed-off-by: Michael Tiemann <[email protected]>

* Fix failing tests

Fix isnan to use unp.isnan as appropriate for both duck_array_type and objects of UFloat types.

Fix a minor typo in pint/facets/__init__.py comment.

In test_issue_1400, use decorators to ensure babel library is loaded when needed.

pyproject.toml: revert change to testbase; we fixed with decorators instead.

Signed-off-by: Michael Tiemann <[email protected]>

---------

Signed-off-by: [email protected]
Signed-off-by: MichaelTiemann <[email protected]>
Signed-off-by: Michael Tiemann <[email protected]>
…rray

add `pint-xarray`'s CI to the downstream status page
- Add wrapper benchmark
- Access to internal attributes of registry
  is wrap in a function for future identification.
- More usage of pytest fixtures instead of default registries
NumPy as of 1.25 deprecated automatically converting any "scalar" with
non-zero number of dimensions to a float value. Therefore, we should
ensure our values have ndim == 0 before passing to math.isnan()
Replace pkg_resources.resource_filename with importlib.resources.files.
This removes an implicit dependency on setuptools (to which
pkg_resources belongs); furthermore, the entire pkg_resources API is
deprecated.

Regarding the switch from __file__ to __package__, see:
python/importlib_resources#60
hgrecco and others added 26 commits February 15, 2025 00:19
refactor: reorganize and add typing to pint/pint_eval.py
fix(docs): add graphviz package to render graphviz graphs
Fix small annoyances across different test to clean up the log.
- guard execution in __main__
- move code to functions
> This release bumps @actions/cache to 4.0.0 which now integrates with the new cache service (v2) APIs.
https://github.com/prefix-dev/setup-pixi/releases/tag/v0.8.2
Docs are not building with the lastest version of sphinx (v8.2.0).

```sh
Traceback
=========

      File ".../pint/.pixi/envs/docs/lib/python3.11/site-packages/sphinx/events.py", line 415, in emit
        raise ExtensionError(
    sphinx.errors.ExtensionError: Handler <function html_collect_pages at 0x11406d440> for event 'html-collect-pages' threw an exception (exception: module 'sphinx.util' has no attribute 'console')
```
Upgrading to the v2 of https://github.com/CodSpeedHQ/action will bring a better base run selection algorithm, better logging, and continued support.
Fix 2146: use BFS algorithm for shortest path
Copy link

@antonio-lopes-altium antonio-lopes-altium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

@ricardo-martins-altium ricardo-martins-altium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@antonio-perez-altium antonio-perez-altium merged commit 34eafb9 into master Apr 15, 2025
50 of 55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.