pyiron / pyiron_nodes

Prototype node library for pyiron_workflows
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Bump dependencies #59

Closed liamhuber closed 3 months ago

liamhuber commented 3 months ago

In particular, pyiron_workflow-0.10.0, which breaks some syntax so I will go through and fix the uses directly.

github-actions[bot] commented 3 months ago

Binder :point_left: Launch a binder notebook on branch _pyiron/pyironnodes/pwf10

liamhuber commented 3 months ago
  LibMambaUnsatisfiableError: Encountered problems while solving:
    - package pyiron_atomistics-0.6.11-pyhd8ed1ab_0 requires pyiron_base 0.9.12, but none of the providers can be installed

  Could not solve for environment specs
  The following packages are incompatible
  ├─ pyiron_atomistics 0.6.11**  is installable and it requires
  │  └─ pyiron_base 0.9.12 , which can be installed;
  └─ pyiron_base 0.10.0**  is not installable because it conflicts with any installable versions previously reported.

That's ok. If I understand there is nothing explicitly buggy about 0.9.12, so for now I can downgrade to this.

liamhuber commented 3 months ago

Need to drop phonopy too

 LibMambaUnsatisfiableError: Encountered problems while solving:
    - package pyiron_atomistics-0.6.11-pyhd8ed1ab_0 requires phonopy >=2.20.0,<=2.26.6, but none of the providers can be installed

  Could not solve for environment specs
  The following packages are incompatible
  ├─ phonopy 2.27.0**  is installable with the potential options
  │  ├─ phonopy [2.20.0|2.21.0|...|2.27.0] would require
  │  │  ├─ python >=3.11,<3.12.0a0 , which can be installed;
  │  │  └─ python_abi 3.11.* *_cp311, which can be installed;
  │  ├─ phonopy [2.20.0|2.21.0|...|2.27.0] would require
  │  │  ├─ python >=3.8,<3.9.0a0 , which can be installed;
  │  │  └─ python_abi 3.8.* *_cp38, which can be installed;
  │  ├─ phonopy [2.20.0|2.21.0|...|2.27.0] would require
  │  │  ├─ python >=3.9,<3.10.0a0 , which can be installed;
  │  │  └─ python_abi 3.9.* *_cp39, which can be installed;
  │  ├─ phonopy [2.21.0|2.21.1|...|2.27.0] would require
  │  │  └─ python_abi 3.12.* *_cp312, which can be installed;
  │  └─ phonopy 2.27.0, which can be installed;
  ├─ pyiron_atomistics 0.6.11**  is installable and it requires
  │  └─ phonopy >=2.20.0,<=2.26.6  with the potential options
  │     ├─ phonopy [2.20.0|2.21.0|...|2.26.6] conflicts with any installable versions previously reported;
  │     ├─ phonopy [2.20.0|2.21.0|...|2.27.0], which can be installed (as previously explained);
  │     ├─ phonopy [2.20.0|2.21.0|...|2.27.0], which can be installed (as previously explained);
  │     ├─ phonopy [2.20.0|2.21.0|...|2.27.0], which can be installed (as previously explained);
  │     └─ phonopy [2.21.0|2.21.1|...|2.27.0], which can be installed (as previously explained);
  └─ python 3.10.*,>=3.10,<3.12  is not installable because there are no viable options
     ├─ python [3.10.0|3.10.10|...|3.10.9] conflicts with any installable versions previously reported;
     └─ python [3.10.0|3.10.1|...|3.10.9] would require
        └─ python_abi 3.10.* *_cp310, which conflicts with any installable versions previously reported.
review-notebook-app[bot] commented 3 months ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

codacy-production[bot] commented 3 months ago

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
:white_check_mark: +32.29% (target: -1.00%) :white_check_mark: 86.57%
Coverage variation details | | Coverable lines | Covered lines | Coverage | | ------------- | ------------- | ------------- | ------------- | | Common ancestor commit (b2b3791a5ea2f21585f166f84c81043cd75e4c5d) | 1246 | 2 | 0.16% | | | Head commit (c4dec7ff69f7ba31b44d56f6d97b3e94012ac820) | 1550 (+304) | 503 (+501) | 32.45% (**+32.29%**) | **Coverage variation** is the difference between the coverage for the head and common ancestor commits of the pull request branch: ` - `
Diff coverage details | | Coverable lines | Covered lines | Diff coverage | | ------------- | ------------- | ------------- | ------------- | | Pull request (#59) | 67 | 58 | **86.57%** | **Diff coverage** is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: `/ * 100%`

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

coveralls commented 3 months ago

Pull Request Test Coverage Report for Build 10587890424

Details


Files with Coverage Reduction New Missed Lines %
atomistic/calculator/output.py 3 54.55%
atomistic/engine/ase.py 3 50.0%
atomistic/structure/transform.py 4 52.17%
atomistic/structure/build.py 5 46.15%
atomistic/property/thermodynamics.py 5 40.0%
databases/elasticity.py 9 0.0%
pyiron_atomistics.py 21 0.0%
atomistic/property/phonons.py 23 37.97%
lammps.py 33 36.67%
atomistic/engine/lammps.py 62 28.83%
<!-- Total: 168 -->
Totals Coverage Status
Change from base Build 10586252553: 32.3%
Covered Lines: 503
Relevant Lines: 1550

💛 - Coveralls
liamhuber commented 3 months ago
Run pip install --no-deps . --no-build-isolation
Processing /home/runner/work/pyiron_nodes/pyiron_nodes
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'error'
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.

At first glance it looks as simple as a typo in my pyproject.toml, but the notebooks test also runs pip install --no-deps . --no-build-isolation and faces no problems.

The unit tests are loading the cache, so the first thing I'll do is simply clear the cache and try again.

liamhuber commented 3 months ago

A little further down the error trace there is

/home/runner/work/pyiron_nodes/pyiron_nodes/cached-miniforge/my-env/lib/python3.10/site-packages/pandas/core/computation/expressions.py:21: UserWarning: Pandas requires version '2.8.4' or newer of 'numexpr' (version '2.7.3' currently installed).

And sure enough, the notebooks run has installed numexpr 2.10.0, while the unit test run has only 2.7.3 as stated. These have slightly different envs due to the extra notebooks dependencies (jupyter and papermill compared to the coverage for unit tests).

I'm surprised pandas doesn't just require the version it's warning about. I also use pandas=2.2.2 in pyiron_workflow so why do I not encounter a similar problem there?

At any rate, for now let's be super pragmatic and just depend on the thing that is (a) working in the notebooks tests and (b) sufficient to silence the unit tests and see if that helps.

liamhuber commented 3 months ago

A little further down the error trace there is

/home/runner/work/pyiron_nodes/pyiron_nodes/cached-miniforge/my-env/lib/python3.10/site-packages/pandas/core/computation/expressions.py:21: UserWarning: Pandas requires version '2.8.4' or newer of 'numexpr' (version '2.7.3' currently installed).

And sure enough, the notebooks run has installed numexpr 2.10.0, while the unit test run has only 2.7.3 as stated. These have slightly different envs due to the extra notebooks dependencies (jupyter and papermill compared to the coverage for unit tests).

I'm surprised pandas doesn't just require the version it's warning about. I also use pandas=2.2.2 in pyiron_workflow so why do I not encounter a similar problem there?

At any rate, for now let's be super pragmatic and just depend on the thing that is (a) working in the notebooks tests and (b) sufficient to silence the unit tests and see if that helps.

Nope. It got rid of the warning, but the rest of the error stack is the same:

Run pip install --no-deps . --no-build-isolation
Processing /home/runner/work/pyiron_nodes/pyiron_nodes
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'error'
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [126 lines of output]
      Creating converter from 7 to 5
      Creating converter from 5 to 7
      Creating converter from 7 to 5
      Creating converter from 5 to 7
      NumExpr defaulting to 4 threads.
      deprecate positional args: graphviz.backend.piping.pipe(['renderer', 'formatter', 'neato_no_op', 'quiet'])
      deprecate positional args: graphviz.backend.rendering.render(['renderer', 'formatter', 'neato_no_op', 'quiet'])
      deprecate positional args: graphviz.backend.unflattening.unflatten(['stagger', 'fanout', 'chain', 'encoding'])
      deprecate positional args: graphviz.backend.viewing.view(['quiet'])
      deprecate positional args: graphviz.quoting.quote(['is_html_string', 'is_valid_id', 'dot_keywords', 'endswith_odd_number_of_backslashes', 'escape_unescaped_quotes'])
      deprecate positional args: graphviz.quoting.a_list(['kwargs', 'attributes'])
      deprecate positional args: graphviz.quoting.attr_list(['kwargs', 'attributes'])
      deprecate positional args: graphviz.dot.Dot.clear(['keep_attrs'])
      deprecate positional args: graphviz.dot.Dot.__iter__(['subgraph'])
      deprecate positional args: graphviz.dot.Dot.node(['_attributes'])
      deprecate positional args: graphviz.dot.Dot.edge(['_attributes'])
      deprecate positional args: graphviz.dot.Dot.attr(['_attributes'])
      deprecate positional args: graphviz.dot.Dot.subgraph(['name', 'comment', 'graph_attr', 'node_attr', 'edge_attr', 'body'])
      deprecate positional args: graphviz.piping.Pipe._pipe_legacy(['renderer', 'formatter', 'neato_no_op', 'quiet'])
      deprecate positional args: graphviz.saving.Save.save(['directory'])
      deprecate positional args: graphviz.rendering.Render.render(['directory', 'view', 'cleanup', 'format', 'renderer', 'formatter', 'neato_no_op', 'quiet', 'quiet_view'])
      deprecate positional args: graphviz.rendering.Render.view(['directory', 'cleanup', 'quiet', 'quiet_view'])
      deprecate positional args: graphviz.unflattening.Unflatten.unflatten(['stagger', 'fanout', 'chain'])
      deprecate positional args: graphviz.graphs.BaseGraph.__init__(['comment', 'filename', 'directory', 'format', 'engine', 'encoding', 'graph_attr', 'node_attr', 'edge_attr', 'body', 'strict'])
      deprecate positional args: graphviz.sources.Source.from_file(['directory', 'format', 'engine', 'encoding', 'renderer', 'formatter'])
      deprecate positional args: graphviz.sources.Source.__init__(['filename', 'directory', 'format', 'engine', 'encoding'])
      deprecate positional args: graphviz.sources.Source.save(['directory'])
      matplotlib data path: /home/runner/work/pyiron_nodes/pyiron_nodes/cached-miniforge/my-env/lib/python3.10/site-packages/matplotlib/mpl-data
      CONFIGDIR=/home/runner/.config/matplotlib
      interactive is False
      platform is linux
      CACHEDIR=/home/runner/.cache/matplotlib
      font search path [PosixPath('/home/runner/work/pyiron_nodes/pyiron_nodes/cached-miniforge/my-env/lib/python3.10/site-packages/matplotlib/mpl-data/fonts/ttf'), PosixPath('/home/runner/work/pyiron_nodes/pyiron_nodes/cached-miniforge/my-env/lib/python3.10/site-packages/matplotlib/mpl-data/fonts/afm'), PosixPath('/home/runner/work/pyiron_nodes/pyiron_nodes/cached-miniforge/my-env/lib/python3.10/site-packages/matplotlib/mpl-data/fonts/pdfcorefonts')]
      Failed to extract font properties from /usr/share/fonts/truetype/noto/NotoColorEmoji.ttf: In FT2Font: Could not set the fontsize (invalid pixel size; error code 0x17)
      generated new fontManager
      Traceback (most recent call last):
        File "/home/runner/work/pyiron_nodes/pyiron_nodes/cached-miniforge/my-env/lib/python3.10/site-packages/setuptools/config/expand.py", line 75, in __getattr__
          return next(
        File "/home/runner/work/pyiron_nodes/pyiron_nodes/cached-miniforge/my-env/lib/python3.10/site-packages/setuptools/config/expand.py", line 76, in <genexpr>
          ast.literal_eval(value)
        File "/home/runner/work/pyiron_nodes/pyiron_nodes/cached-miniforge/my-env/lib/python3.10/ast.py", line 110, in literal_eval
          return _convert(node_or_string)
        File "/home/runner/work/pyiron_nodes/pyiron_nodes/cached-miniforge/my-env/lib/python3.10/ast.py", line 109, in _convert
          return _convert_signed_num(node)
        File "/home/runner/work/pyiron_nodes/pyiron_nodes/cached-miniforge/my-env/lib/python3.10/ast.py", line 83, in _convert_signed_num
          return _convert_num(node)
        File "/home/runner/work/pyiron_nodes/pyiron_nodes/cached-miniforge/my-env/lib/python3.10/ast.py", line 74, in _convert_num
        File "/home/runner/work/pyiron_nodes/pyiron_nodes/cached-miniforge/my-env/lib/python3.10/site-packages/setuptools/config/expand.py", line 192, in read_attr
          module = _load_spec(spec, module_name)
        File "/home/runner/work/pyiron_nodes/pyiron_nodes/cached-miniforge/my-env/lib/python3.10/site-packages/setuptools/config/expand.py", line 212, in _load_spec
          spec.loader.exec_module(module)  # type: ignore
        File "<frozen importlib._bootstrap_external>", line 883, in exec_module
        File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
        File "/home/runner/work/pyiron_nodes/pyiron_nodes/pyiron_nodes/__init__.py", line 5, in <module>
          from pyiron_nodes import atomistic, databases, atomistic_codes, lammps, math, plotting
        File "/home/runner/work/pyiron_nodes/pyiron_nodes/pyiron_nodes/lammps.py", line 13, in <module>
          def CalcMD(
        File "/home/runner/work/pyiron_nodes/pyiron_nodes/cached-miniforge/my-env/lib/python3.10/site-packages/pyiron_workflow/nodes/function.py", line 417, in decorator
          factory_made.preview_io()
        File "/home/runner/work/pyiron_nodes/pyiron_nodes/cached-miniforge/my-env/lib/python3.10/site-packages/pyiron_workflow/mixin/preview.py", line 80, in preview_io
          {"inputs": cls.preview_inputs(), "outputs": cls.preview_outputs()}
        File "/home/runner/work/pyiron_nodes/pyiron_nodes/cached-miniforge/my-env/lib/python3.10/site-packages/pyiron_workflow/mixin/preview.py", line 64, in preview_inputs
          return cls._build_inputs_preview()
        File "/home/runner/work/pyiron_nodes/pyiron_nodes/cached-miniforge/my-env/lib/python3.10/site-packages/pyiron_workflow/mixin/preview.py", line 143, in _build_inputs_preview
          type_hints = cls._get_type_hints()
        File "/home/runner/work/pyiron_nodes/pyiron_nodes/cached-miniforge/my-env/lib/python3.10/site-packages/pyiron_workflow/mixin/preview.py", line 218, in _get_type_hints
          return get_type_hints(cls._io_defining_function())
        File "/home/runner/work/pyiron_nodes/pyiron_nodes/cached-miniforge/my-env/lib/python3.10/typing.py", line 1871, in get_type_hints
          value = _eval_type(value, globalns, localns)
        File "/home/runner/work/pyiron_nodes/pyiron_nodes/cached-miniforge/my-env/lib/python3.10/typing.py", line 327, in _eval_type
          return t._evaluate(globalns, localns, recursive_guard)
        File "/home/runner/work/pyiron_nodes/pyiron_nodes/cached-miniforge/my-env/lib/python3.10/typing.py", line 693, in _evaluate
          type_ = _type_check(
        File "/home/runner/work/pyiron_nodes/pyiron_nodes/cached-miniforge/my-env/lib/python3.10/typing.py", line 176, in _type_check
          raise TypeError(f"{msg} Got {arg!r:.100}.")
      TypeError: Forward references must evaluate to types. Got <pyiron_nodes.dev_tools.VarType object at 0x7fa45562c9d0>.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Error: Process completed with exit code 1.
liamhuber commented 3 months ago

Ok, even the benchmark tests pass! Those are have exactly the same env as the unit tests. All that remains different is the runner. Let's try disabling the 3.10 runner to see if the unit tests can pass on 3.11 -- right now they are getting cancelled before I can see.

codacy-production[bot] commented 3 months ago

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
:white_check_mark: +32.29% (target: -1.00%) :white_check_mark: 86.57%
Coverage variation details | | Coverable lines | Covered lines | Coverage | | ------------- | ------------- | ------------- | ------------- | | Common ancestor commit (82f10b3a7f092100c71b649d4f41e537cb368551) | 1246 | 2 | 0.16% | | | Head commit (f752c1ab0bddbfb2ea2df43e90a0f2f5dcd0856b) | 1550 (+304) | 503 (+501) | 32.45% (**+32.29%**) | **Coverage variation** is the difference between the coverage for the head and common ancestor commits of the pull request branch: ` - `
Diff coverage details | | Coverable lines | Covered lines | Diff coverage | | ------------- | ------------- | ------------- | ------------- | | Pull request (#59) | 67 | 58 | **86.57%** | **Diff coverage** is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: `/ * 100%`

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

liamhuber commented 3 months ago

Yeah, it's only 3.10.

liamhuber commented 3 months ago

Directly comparing the conda list env immediately prior to the pip install in 3.10 vs 3.11, beyond hash differences, I find the following changes:

libopenblas               0.3.27 --> 0.3.28
numexpr                   2.7.3 --> 2.10.0 
python                    3.10.14 --> 3.11.9
python_abi                3.10 --> 3.11
unicodedata2              15.1.0 --> GONE

It remains unclear to me why parsing the pyproject.toml fails. The only "likely suspect" is numexpr, but pinning this explicitly made no difference.

liamhuber commented 3 months ago

Alright, 3.12 works well enough. Per #61, let's just ditch 3.10, but in its place pull in 3.12 and keep moving.