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

pcmdi_metrics v2.3 #6

Conversation

regro-cf-autotick-bot
Copy link
Contributor

@regro-cf-autotick-bot regro-cf-autotick-bot commented Jun 9, 2022

It is very likely that the current package version for this feedstock is out of date.

Checklist before merging this PR:

  • Dependencies have been updated if changed: see upstream
  • Tests have passed
  • Updated license if changed and license_file is packaged

Information about this PR:

  1. Feel free to push to the bot's branch to update this PR if needed.
  2. The bot will almost always only open one PR per version.
  3. The bot will stop issuing PRs if more than 3 version bump PRs generated by the bot are open. If you don't want to package a particular version please close the PR.
  4. If you want these PRs to be merged automatically, make an issue with @conda-forge-admin,please add bot automerge in the title and merge the resulting PR. This command will add our bot automerge feature to your feedstock.
  5. If this PR was opened in error or needs to be updated please add the bot-rerun label to this PR. The bot will close this PR and schedule another one. If you do not have permissions to add this label, you can use the phrase @conda-forge-admin, please rerun bot in a PR comment to have the conda-forge-admin add it for you.

Dependency Analysis

Please note that this analysis is highly experimental. The aim here is to make maintenance easier by inspecting the package's dependencies. Importantly this analysis does not support optional dependencies, please double check those before making changes. If you do not want hinting of this kind ever please add bot: inspection: false to your conda-forge.yml. If you encounter issues with this feature please ping the bot team conda-forge/bot.

Analysis by source code inspection shows a discrepancy between it and the the package's stated requirements in the meta.yaml.

Packages found by source code inspection but not in the meta.yaml:

  • six
  • cdat_info
  • autovizwidget
  • pyamg
  • cdtime
  • requests

Packages found in the meta.yaml but not found by source code inspection:

  • jupyterlab
  • nb_conda_kernels
  • nb_conda

This PR was created by the regro-cf-autotick-bot. The regro-cf-autotick-bot is a service to automatically track the dependency graph, migrate packages, and propose package version updates for conda-forge. Feel free to drop us a line if there are any issues! This PR was generated by https://github.com/regro/autotick-bot/actions/runs/2465676567, please use this URL for debugging.

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@acordonez
Copy link
Contributor

@lee1043 We need to check out this error in the linux testing:
import: 'pcmdi_metrics'
Traceback (most recent call last):
File "/home/conda/feedstock_root/build_artifacts/pcmdi_metrics_1654746400274/test_tmp/run_test.py", line 2, in
import pcmdi_metrics
File "/home/conda/feedstock_root/build_artifacts/pcmdi_metrics_1654746400274/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.10/site-packages/pcmdi_metrics/init.py", line 17, in
from . import io # noqa
File "/home/conda/feedstock_root/build_artifacts/pcmdi_metrics_1654746400274/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.10/site-packages/pcmdi_metrics/io/init.py", line 2, in
from . import base # noqa
File "/home/conda/feedstock_root/build_artifacts/pcmdi_metrics_1654746400274/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.10/site-packages/pcmdi_metrics/io/base.py", line 7, in
from collections import Mapping, OrderedDict
ImportError: cannot import name 'Mapping' from 'collections' (/home/conda/feedstock_root/build_artifacts/pcmdi_metrics_1654746400274/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.10/collections/init.py)

Based on some research (e.g. https://www.reddit.com/r/learnpython/comments/u3dibm/i_updated_all_my_python_modules_using_pip_and_now/), it looks like the "Mapping" library was moved to collections.abc in Python 3.3. I'm not sure why we haven't seen this error before. I am wondering if we need to update all the Mapping library calls in the PMP, or if it would work to pin an older Python version for this release (if you need it asap).

@acordonez
Copy link
Contributor

@lee1043 Did some testing on my command line. I get the same error with the PMP 2.2.2 from conda-forge if I use the default Python version 3.10.4. Tested by creating a new environment and running "mean_climate_driver.py --help", which showed the ImportError.

If I create a new environment and force the Python version to be 3.7, this command works. It looks like the old collections library alias is available up through version 3.7 (reference).

If you need this release ASAP, we could pin Py>=3.6 and <3.8. Otherwise, it looks like we do need to eventually fix all the collections library calls to work with newer versions of Python.

Copy link
Contributor

@acordonez acordonez left a comment

Choose a reason for hiding this comment

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

See my previous comments

@lee1043
Copy link
Contributor

lee1043 commented Jun 9, 2022

@acordonez thank you for the investigation. I see below message when I manually import Mapping from collections in python 3.9.7. It is saying it will stop working from python 3.10, which I think it is why we see the above error now.

(pcmdi_metrics_dev) bash-3.2$ python
Python 3.9.7 | packaged by conda-forge | (default, Sep 29 2021, 20:33:18) 
[Clang 11.1.0 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from collections import Mapping, OrderedDict
<stdin>:1: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working

It looks like the Mapping function is only called in PMP's base.py. I am revising the base.py now. Once done, could you please check if the revised code working well in your python 3.10 env?

Correction: Found Mapping function was used in more than one place in PMP, and have revised them all in PCMDI/pcmdi_metrics#854

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.

4 participants