Giter Club home page Giter Club logo

Comments (5)

tsuyoshicho avatar tsuyoshicho commented on August 19, 2024

Hi @latot ,

Thanks for using it.
And thanks for the report on the minimum configuration.

I will explain below

Auxiliary information

  1. for action-mypy, automatic mypy installation uses setup_command setting.
  2. The default value of the setup_command for action-mypy is pip install mypy.
  3. mypy should be put in "dev dependencies" instead of normal "dependencies" (e.g. dev in [project.optional-dependencies]).
  4. it is not easy to install with pip using the pyproject.toml configuration (e.g. pip install . [dev], which involves installing packages).

The above is not directly relevant in this case, as you are manually installing dependencies.

  1. mypy requires a type stub to examine dependent packages.
  2. action-mypy will install stubs by mypy (value of install_types config).
    There are some problems with pandas in this regard.

see python/mypy#14328

I think the only way to get pandas stub is to manually install pandas-stubs or set ignore_missing_imports to ignore it.

and see pypa/pip#11584

pip do not support pip install -r pyprojectr.toml, you need pip install . like command.

I will close this issue, but if I am mistaken or have other information, please contact me again and reopen.

from action-mypy.

latot avatar latot commented on August 19, 2024

Hi, I think for this case, the best maybe would be run pip install ., add it to the script by default (? it would allow to run the command properly.

In the case of install_types would be good some examples, I'm trying to look on it, but can't found the right way to use/configure it.

from action-mypy.

tsuyoshicho avatar tsuyoshicho commented on August 19, 2024

install_types is an auxiliary function that installs several type packages that mypy (through a pre-run cache) knows and considers safe.

Pandas cannot rely on this.

Before this action, you can use a shell script or some other step to pip install . in a shell script or other step to install the type packages (pandas-stubs).

from action-mypy.

latot avatar latot commented on August 19, 2024

wouldn't it be better, add pip install . to the published script? that would do to properly works on this env too.

from action-mypy.

tsuyoshicho avatar tsuyoshicho commented on August 19, 2024

There is also that idea.

However, in the course of development up to now, we have come to the conclusion that each action should move only as much as is necessary and leave the "construction of the state expected by the project" to those who create the workflow.

Some people put it in separately from the lock file, some use a special file name as requirements-foo.txt, some use Poetry, some use rye, etc.

"pip install mypy" is an aspect of remaining historical

from action-mypy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.