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

Docstring and error message fixes #695

Merged
merged 2 commits into from
Mar 18, 2021
Merged

Conversation

fedorkotov
Copy link
Contributor

  • Fixed code examples in AreaNthSelector docstring (previously were not formatted as code blocks).
  • Fixed some typos caught with Code Spell Checker VS Code extension

@codecov
Copy link

codecov bot commented Mar 17, 2021

Codecov Report

Merging #695 (6544e66) into master (d5ce132) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #695   +/-   ##
=======================================
  Coverage   94.41%   94.41%           
=======================================
  Files          31       31           
  Lines        6909     6909           
  Branches      740      740           
=======================================
  Hits         6523     6523           
  Misses        252      252           
  Partials      134      134           
Impacted Files Coverage Δ
cadquery/cq.py 91.05% <ø> (ø)
cadquery/occ_impl/geom.py 88.96% <ø> (ø)
cadquery/occ_impl/shapes.py 92.22% <ø> (ø)
cadquery/selectors.py 98.14% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d5ce132...6544e66. Read the comment docs.

@fedorkotov
Copy link
Contributor Author

fedorkotov commented Mar 18, 2021

Here is the error from appveyor python 3.6 build (python 3.7 was syccessfull). This is probably not caused by my docstring and comment changes.. I think I'll have to wait until #696 is merged and rebase on that.

self = <tests.test_cadquery.TestCadQuery testMethod=testOffset2D>
    def testOffset2D(self):
    
        w1 = Workplane().rect(1, 1).offset2D(0.5, "arc")
        self.assertEqual(w1.edges().size(), 8)
    
        w2 = Workplane().rect(1, 1).offset2D(0.5, "tangent")
        self.assertEqual(w2.edges().size(), 4)
    
        w3 = Workplane().rect(1, 1).offset2D(0.5, "intersection")
        self.assertEqual(w3.edges().size(), 4)
    
>       w4 = Workplane().pushPoints([(0, 0), (0, 5)]).rect(1, 1).offset2D(-0.5)
tests\test_cadquery.py:4081: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cadquery\cq.py:3852: in offset2D
    rv = list(chain.from_iterable(w.offset2D(d, kind) for w in ws))
cadquery\cq.py:3852: in <genexpr>
    rv = list(chain.from_iterable(w.offset2D(d, kind) for w in ws))
cadquery\occ_impl\shapes.py:1802: in offset2D
    obj = downcast(offset.Shape())
cadquery\occ_impl\shapes.py:335: in downcast
    f_downcast: Any = downcast_LUT[shapetype(obj)]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
obj = <OCP.TopoDS.TopoDS_Shape object at 0x000000DE720C5848>
    def shapetype(obj: TopoDS_Shape) -> TopAbs_ShapeEnum:
    
        if obj.IsNull():
>           raise ValueError("Null TopoDS_Shape object")
E           ValueError: Null TopoDS_Shape object
cadquery\occ_impl\shapes.py:325: ValueError

@fedorkotov
Copy link
Contributor Author

One of these days I will learn to not trust spellcheckers blindly )

@jmwright
Copy link
Member

Thanks @fedorkotov !

We were going to remove Python 3.6 from the CI matrix anyway, so that has been done and all the tests pass now.

@marcus7070 @adam-urbanczyk These are straight forward doc fixes, so I'll go ahead and merge without the normal review process.

1 similar comment
@jmwright
Copy link
Member

Thanks @fedorkotov !

We were going to remove Python 3.6 from the CI matrix anyway, so that has been done and all the tests pass now.

@marcus7070 @adam-urbanczyk These are straight forward doc fixes, so I'll go ahead and merge without the normal review process.

@jmwright jmwright merged commit ab1427d into CadQuery:master Mar 18, 2021
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.

2 participants