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

Generate engine actor enum #275

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

adamchalmers
Copy link
Collaborator

This will make it easier to implement new endpoints in the engine. Engine team won't have to update the engine actor enum, because it will be automatically generated from the modeling_api definitions.

Sample output:

    pub enum ModelingCmdWithResp {
        ///Start a new path.
        StartPath {
            params: kittycad_modeling_cmds::each_cmd::StartPath,
            response_sender: ::tokio::sync::oneshot::Sender<()>,
        },
        ///Move the path's "pen".
        MovePathPen {
            params: kittycad_modeling_cmds::each_cmd::MovePathPen,
            response_sender: ::tokio::sync::oneshot::Sender<()>,
        },
        /**Extend a path by adding a new segment which starts at the path's "pen".
If no "pen" location has been set before (via `MovePen`), then the pen is at the origin.*/
        ExtendPath {
            params: kittycad_modeling_cmds::each_cmd::ExtendPath,
            response_sender: ::tokio::sync::oneshot::Sender<()>,
        },
        ///Command for extruding a solid 2d.
        Extrude {
            params: kittycad_modeling_cmds::each_cmd::Extrude,
            response_sender: ::tokio::sync::oneshot::Sender<()>,
        },
        ///Command for revolving a solid 2d.
        Revolve {
            params: kittycad_modeling_cmds::each_cmd::Revolve,
            response_sender: ::tokio::sync::oneshot::Sender<()>,
        },
        ///Command for revolving a solid 2d about a brep edge
        RevolveAboutEdge {
            params: kittycad_modeling_cmds::each_cmd::RevolveAboutEdge,
            response_sender: ::tokio::sync::oneshot::Sender<()>,
        },
        ///Closes a path, converting it to a 2D solid.
        ClosePath {
            params: kittycad_modeling_cmds::each_cmd::ClosePath,
            response_sender: ::tokio::sync::oneshot::Sender<()>,
        },
        ///Camera drag started.
        CameraDragStart {
            params: kittycad_modeling_cmds::each_cmd::CameraDragStart,
            response_sender: ::tokio::sync::oneshot::Sender<()>,
        },
        ///Camera drag continued.
        CameraDragMove {
            params: kittycad_modeling_cmds::each_cmd::CameraDragMove,
            response_sender: ::tokio::sync::oneshot::Sender<
                ::kittycad_modeling_cmds::output::CameraDragMove,
            >,
        },
        ///Camera drag ended
        CameraDragEnd {
            params: kittycad_modeling_cmds::each_cmd::CameraDragEnd,
            response_sender: ::tokio::sync::oneshot::Sender<
                ::kittycad_modeling_cmds::output::CameraDragEnd,
            >,
        },
}

Copy link

codecov bot commented Mar 26, 2024

Codecov Report

Attention: Patch coverage is 49.41176% with 43 lines in your changes are missing coverage. Please review.

❗ No coverage uploaded for pull request base (main@2e1b19a). Click here to learn what that means.

Files Patch % Lines
modeling-cmds/src/ok_response.rs 4.76% 40 Missing ⚠️
modeling-cmds/src/shared.rs 0.00% 2 Missing ⚠️
modeling-cmds-macros/src/modeling_cmd_enum.rs 97.56% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #275   +/-   ##
=======================================
  Coverage        ?   55.48%           
=======================================
  Files           ?       51           
  Lines           ?     5796           
  Branches        ?        0           
=======================================
  Hits            ?     3216           
  Misses          ?     2580           
  Partials        ?        0           
Flag Coverage Δ
unittests 55.48% <49.41%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

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.

None yet

1 participant