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

Gcode alignment #49

Merged
merged 8 commits into from
May 15, 2023
Merged

Gcode alignment #49

merged 8 commits into from
May 15, 2023

Conversation

giannissc
Copy link
Contributor

@giannissc giannissc commented May 11, 2023

I think I have made quite a few change. None of them are breaking changes just yet so I thought I can create a PR so that we can review and make our lives easier. If you feel I should add more changes to it then you let me know!

Closes #42

@giannissc giannissc requested a review from voneiden as a code owner May 11, 2023 11:41
@giannissc
Copy link
Contributor Author

I think I also included my typing system refactoring so the PR looks larger than I would like. Should I create separate PR for that as well to make this one more manageable? @voneiden

@voneiden
Copy link
Owner

Yeah, there are some conflicts as well in routers.py which prevents the CI checks from running.

Give it a shot, feel free to split into smaller PR's if it makes sense. Smaller pieces are easier to review. And bonus points if you don't include any "Merge branch 'voneiden:unstable' into operation-refactor" commits in the PR. Not a hard requirement - I'll just skip it myself when merging.

Technically nothing wrong with merging back and forth in git, but I prefer to keep the history easier to follow by allowing merges only one way (features -> main).

@voneiden
Copy link
Owner

Probably the easiest way would be to create a new branch from voneiden:unstable and then cherry-pick the commits you want to feature in the PR.

You'll probably also want to (hard) reset your unstable branch to voneiden:unstable once you're sure that you're not accidentally wiping any of your own changes.

@giannissc
Copy link
Contributor Author

giannissc commented May 11, 2023

I am doing all the development in their own branches so it shouldn' be too hard!

@giannissc
Copy link
Contributor Author

I think router.py is generating unnecessary commands that were hidden by print_modal, print_xyz, and print_ijk. Now that I am simplifying those methods I am finding duplicate G1 and G0 commands. I think this approach is going to be good to uncover hidden bugs!!

@giannissc giannissc force-pushed the gcode-alignment branch 2 times, most recently from e3c4fda to 78e9f9b Compare May 11, 2023 13:08
@codecov
Copy link

codecov bot commented May 11, 2023

Codecov Report

Merging #49 (f5cfa42) into unstable (28cb3a8) will increase coverage by 0.77%.
The diff coverage is 97.67%.

@@             Coverage Diff              @@
##           unstable      #49      +/-   ##
============================================
+ Coverage     84.30%   85.08%   +0.77%     
============================================
  Files            37       39       +2     
  Lines          2568     2729     +161     
============================================
+ Hits           2165     2322     +157     
- Misses          403      407       +4     
Impacted Files Coverage Δ
src/cq_cam/operations/pocket_cq.py 18.94% <ø> (ø)
src/cq_cam/tests/test_tool_change.py 100.00% <ø> (ø)
src/cq_cam/routers.py 69.86% <75.00%> (-1.57%) ⬇️
src/cq_cam/address.py 97.08% <97.08%> (ø)
src/cq_cam/command.py 87.60% <97.72%> (+0.39%) ⬆️
src/cq_cam/__init__.py 100.00% <100.00%> (ø)
src/cq_cam/fluent.py 86.95% <100.00%> (-0.24%) ⬇️
src/cq_cam/groups.py 100.00% <100.00%> (ø)
src/cq_cam/tests/test_address.py 100.00% <100.00%> (ø)
src/cq_cam/tests/test_gcode.py 100.00% <100.00%> (ø)

Copy link
Owner

@voneiden voneiden left a comment

Choose a reason for hiding this comment

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

Added some notes

src/cq_cam/operations/pocket_cq.py Outdated Show resolved Hide resolved
src/cq_cam/routers.py Show resolved Hide resolved
src/cq_cam/routers.py Outdated Show resolved Hide resolved
src/cq_cam/routers.py Outdated Show resolved Hide resolved
src/cq_cam/routers.py Show resolved Hide resolved
src/cq_cam/tests/test_address.py Outdated Show resolved Hide resolved
@giannissc
Copy link
Contributor Author

I am not sure what is actionable on the unresolved conversation? Is this good for now? @voneiden

@voneiden
Copy link
Owner

The FIXME and TODO notes currently still in routers.py are probably (?) not relevant? There's a circle offsetting bug in OCCT which cadquery suffers from but AFAIK there's no intention for the time being to apply the FreeCAD workaround ( CadQuery/cadquery#896 )

@giannissc
Copy link
Contributor Author

I have a local fix for that I have been using for quite a while that completely solves the issue. I can create a cadquery PR soonish!
In the meantime I will remove the FIXME and TODO notes!

@sonarcloud
Copy link

sonarcloud bot commented May 15, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@giannissc
Copy link
Contributor Author

This is ready to be merged! @voneiden

@giannissc giannissc requested a review from voneiden May 15, 2023 12:22
@voneiden
Copy link
Owner

Cheers!

@voneiden voneiden merged commit 16bf552 into voneiden:unstable May 15, 2023
@giannissc
Copy link
Contributor Author

You are welcome! I almost have the next PR ready as well 🤣

@giannissc giannissc deleted the gcode-alignment branch May 16, 2023 13:10
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.

Align types with gcode spec
2 participants