Skip to content

Conversation

@potiuk
Copy link
Member

@potiuk potiuk commented Jan 13, 2024

The #36638 change introduced "full package" checks - where in case of CI we run mypy checks separately from regular static checks, for the whole folders.

However it's been a little convoluted on how the checks were run, with a separate env variable. Instead we can actually have multiple mypy-* checks (same as we have for local pre-commit runs) as mypy allows to have multiple checks with the same name in various stages.

This change simplifies the setup a bit:

  • we name the checks "folder" checks because this is what they are
  • we name the check names consistent ("airflow", "providers", "docs", "dev") with mypy-folders output
  • we have separate small script to run the folder checks
  • we map "providers" into "airflow/providers" in the pre-commit

^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@potiuk
Copy link
Member Author

potiuk commented Jan 13, 2024

Suggested by @jscheffl in #36638 (comment)

@potiuk potiuk force-pushed the simplify-mypy-folder-checks branch from 372738c to e05d554 Compare January 13, 2024 06:57
The apache#36638 change introduced "full package" checks - where in
case of CI we run mypy checks separately from regular static checks,
for the whole folders.

However it's been a little convoluted on how the checks were run,
with a separate env variable. Instead we can actually have multiple
mypy-* checks (same as we have for local pre-commit runs) as mypy
allows to have multiple checks with the same name in various stages.

This change simplifies the setup a bit:

* we name the checks "folder" checks because this is what they are
* we name the check names consistent ("airflow", "providers", "docs",
  "dev") with mypy-folders output
* we have separate small script to run the folder checks
* we map "providers" into "airflow/providers" in the pre-commit
@potiuk potiuk force-pushed the simplify-mypy-folder-checks branch from e05d554 to 45fc14c Compare January 13, 2024 07:08
@potiuk potiuk merged commit a912948 into apache:main Jan 13, 2024
@potiuk potiuk deleted the simplify-mypy-folder-checks branch January 13, 2024 16:44
@potiuk potiuk added this to the Airflow 2.8.1 milestone Jan 13, 2024
potiuk added a commit that referenced this pull request Jan 13, 2024
The #36638 change introduced "full package" checks - where in
case of CI we run mypy checks separately from regular static checks,
for the whole folders.

However it's been a little convoluted on how the checks were run,
with a separate env variable. Instead we can actually have multiple
mypy-* checks (same as we have for local pre-commit runs) as mypy
allows to have multiple checks with the same name in various stages.

This change simplifies the setup a bit:

* we name the checks "folder" checks because this is what they are
* we name the check names consistent ("airflow", "providers", "docs",
  "dev") with mypy-folders output
* we have separate small script to run the folder checks
* we map "providers" into "airflow/providers" in the pre-commit

(cherry picked from commit a912948)
@potiuk potiuk added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Jan 13, 2024
ephraimbuddy pushed a commit that referenced this pull request Jan 15, 2024
The #36638 change introduced "full package" checks - where in
case of CI we run mypy checks separately from regular static checks,
for the whole folders.

However it's been a little convoluted on how the checks were run,
with a separate env variable. Instead we can actually have multiple
mypy-* checks (same as we have for local pre-commit runs) as mypy
allows to have multiple checks with the same name in various stages.

This change simplifies the setup a bit:

* we name the checks "folder" checks because this is what they are
* we name the check names consistent ("airflow", "providers", "docs",
  "dev") with mypy-folders output
* we have separate small script to run the folder checks
* we map "providers" into "airflow/providers" in the pre-commit

(cherry picked from commit a912948)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dev-tools changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants