Skip to content
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

housekeeping #71

Merged
merged 14 commits into from
Jan 22, 2024
Merged

housekeeping #71

merged 14 commits into from
Jan 22, 2024

Conversation

mathematicalmichael
Copy link
Owner

@mathematicalmichael mathematicalmichael commented Jan 22, 2024

  • mypy==1.8.0 updates (big jump! minor changes)
  • black apparently is linting notebooks by default now... so we're doing that, I guess.
  • figures are generated in a .tests directory
  • more stable installations, validated on many versions (up to 3.12)
  • numpy >= 1.25 throws a lot of warnings right now, seemingly plotting-related. but tests do pass (just take longer). doesn't seem like much I can do about it for now.
  • readthedocs updates
  • coverall updates
  • upgrade versions of actions

mathematicalmichael and others added 6 commits January 21, 2024 20:46
This reverts commit 597fccc.
* specify dependency ranges

I ended up trying to install mud on a computer with an older scikit-learn, and it ended up using the cache of like version 0.something, so I want to at least specify the major version we require for the more important libraries.

* loosen matplotlib

* 3.7 support is a pain...

* typo

* prevent warnings from numpy
mathematicalmichael and others added 6 commits January 22, 2024 04:17
* print mypy and python versions in workflow

* 'if save_path' used to fix 10 mypy errors

* automatic fix using https://github.com/hauntsaninja/no_implicit_optional

* post-fix linting

* refactor to address C901: too complex

* refactor to address C901: too complex

* ignore C901

* fix typo

* sort imports

* if save_path is not None

* no more 3.12 bc numpy 1.24

* fix all mypy issues with 1.8.0
@mathematicalmichael
Copy link
Owner Author

mathematicalmichael commented Jan 22, 2024

numpy==1.25 and numpy==1.26 start throwing these warnings, so I'm loosening to numpy<1.27 as this should ensure they remain warnings and not errors. seems like something scipy/matplotlib need to resolve, as the error isn't coming from our code according to the stacktrace:

=================================== warnings summary ====================================
tests/test_cli.py: 28 warnings
  /home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/matplotlib/text.py:1461: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
    x = float(self.convert_xunits(x))

tests/test_cli.py: 28 warnings
  /home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/matplotlib/text.py:1463: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
    y = float(self.convert_yunits(y))

tests/test_cli.py: 56 warnings
  /home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/matplotlib/text.py:566: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
    posx = float(self.convert_xunits(self._x))

tests/test_cli.py: 56 warnings
  /home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/matplotlib/text.py:567: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
    posy = float(self.convert_yunits(self._y))

tests/test_cli.py: 28 warnings
  /home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/matplotlib/text.py:753: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
    posx = float(self.convert_xunits(self._x))

tests/test_cli.py: 28 warnings
  /home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/matplotlib/text.py:754: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
    posy = float(self.convert_yunits(self._y))

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

<coverage omitted>
===================== 51 passed, 224 warnings in 170.52s (0:02:50) ======================

so they take much longer bc of the thrown warnings, a whole minute extra.

but loosening should pave the way to python 3.12, as wheels for earlier numpy don't exist for that.

* experiment with 3.12

* loosen pandas for 3.12

* build updates

* rename, try new build
@mathematicalmichael
Copy link
Owner Author

works fine in 3.12

integration tests passing (even up to 3.12. tested on 3.9-3.12)

@mathematicalmichael mathematicalmichael merged commit a9c5d5f into main Jan 22, 2024
16 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.

1 participant