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

Revise docstrings for build objects #930

Merged
merged 3 commits into from
Mar 8, 2025
Merged

Conversation

jwagenet
Copy link
Contributor

@jwagenet jwagenet commented Mar 6, 2025

Update object_*.py docstrings for more consistency. Clarify how parameters work and objects are constructed.

General improvements:

  • follow a similar opening description: Add/subtract a {object} defined by... with more explicit behavior
  • update union type declarations in string
  • remove plurality references (sketch, part). Methods to create multiple parts/sketches occur outside the objects
  • remove angles plurality from 1d and 2d objects
  • remove hanging end stops (.) from lists
  • try to make arg descriptions more consistent and descriptive
  • try to specify viable enums if mentioned and CAPITALIZE
  • other editing for wordiness

…rameters work

General improvements:
- follow a similar opening structure
- add specificity to description and args
- remove plurality (sketch, part)
- remove hanging end stops from lists
- try to specify viable enums if mentioned and CAPITALIZE
@gumyr
Copy link
Owner

gumyr commented Mar 7, 2025

Thank you for doing this. I only have one point to discuss:

All of the object description now start with "Add" which, given we're trying to tidy up the wording, might be a little confusing. Consider:

my_thing -= Circle(...)

where the docstring states that it will be added but the code is going to subtract it. Same with:

with BuildPart() as my_thing:
    ...
   Cylinder(..., mode=Mode.SUBTRACT)

How about we use a more neutral word like "Create" or something similar?

@jwagenet
Copy link
Contributor Author

jwagenet commented Mar 7, 2025

Yes, I agree, using Create is better because the object is created regardless of what happens in the context it modifies. I was going to use Create, but switched back to Add/Subtract to align with the default mode because of Hole/CounterSink/CounterBore. I can update.

Copy link

codecov bot commented Mar 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.93%. Comparing base (c51410b) to head (7b55eb1).
Report is 5 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #930      +/-   ##
==========================================
- Coverage   96.93%   96.93%   -0.01%     
==========================================
  Files          32       32              
  Lines        9471     9470       -1     
==========================================
- Hits         9181     9180       -1     
  Misses        290      290              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gumyr gumyr merged commit 201e95c into gumyr:dev Mar 8, 2025
20 checks passed
@gumyr
Copy link
Owner

gumyr commented Mar 8, 2025

Thank you!

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