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

Pin nptyping #1095

Merged
merged 2 commits into from
Jun 2, 2022
Merged

Pin nptyping #1095

merged 2 commits into from
Jun 2, 2022

Conversation

lorenzncode
Copy link
Member

The mypy cadquery check fails with nptyping version 2.1.0 (released ~7 hours ago).

$ mypy cadquery
cadquery/occ_impl/sketch_solver.py:266: error: Type argument "floating[Any]" of "ndarray" must be a subtype of "dtype[Any]"
cadquery/occ_impl/sketch_solver.py:267: error: Type argument "floating[Any]" of "ndarray" must be a subtype of "dtype[Any]"
cadquery/occ_impl/sketch_solver.py:344: error: Incompatible return value type (got "Tuple[Callable[[Any], float], Callable[[Any, Any], None], ndarray[Any, dtype[Any]], ndarray[Any, dtype[Any]]]", expected "Tuple[Callable[[ndarray[Any, floating[Any]]], float], Callable[[ndarray[Any, floating[Any]], ndarray[Any, floating[Any]]], None], ndarray[Any, floating[Any]], ndarray[Any, floating[Any]]]")
cadquery/occ_impl/sketch_solver.py:349: error: Argument 1 to "_cost" of "SketchConstraintSolver" has incompatible type "ndarray[Any, dtype[Any]]"; expected "ndarray[Any, floating[Any]]"
Found 4 errors in 1 file (checked 30 source files)

@codecov
Copy link

codecov bot commented Jun 2, 2022

Codecov Report

Merging #1095 (168f188) into master (9745762) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1095   +/-   ##
=======================================
  Coverage   96.34%   96.34%           
=======================================
  Files          40       40           
  Lines        9533     9533           
  Branches     1259     1259           
=======================================
  Hits         9185     9185           
  Misses        205      205           
  Partials      143      143           
Impacted Files Coverage Δ
cadquery/cq.py 92.43% <ø> (ø)

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@lorenzncode lorenzncode changed the title Pin nptyping=2.0.0 Pin nptyping Jun 2, 2022
@lorenzncode
Copy link
Member Author

mypy also fails with nptyping 2.1.1.

I'll update the pin to nptyping 2.0.1 until it can be determined which changes are necessary for nptyping>=2.1.
I tested with mypy 0.950, 0.960 and numpy 1.22.3 and 1.22.4.

@lorenzncode lorenzncode marked this pull request as ready for review June 2, 2022 04:11
@lorenzncode
Copy link
Member Author

I missed the update to setup.py. It won't affect the mypy check in appveyor but the pins should probably be defined consistently.

Copy link
Member

@adam-urbanczyk adam-urbanczyk left a comment

Choose a reason for hiding this comment

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

LGTM. It would be good to update setup too.

@jmwright
Copy link
Member

jmwright commented Jun 2, 2022

Thanks @lorenzncode

I'll merge this to get CI working again and do a quick PR to pin setup.py as well.

@jmwright jmwright merged commit c659ff8 into CadQuery:master Jun 2, 2022
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.

3 participants