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

github action for file conversion as demo (cli, demo page, more specific action...?) #34

Closed
hanbollar opened this issue May 24, 2022 · 22 comments
Assignees

Comments

@hanbollar
Copy link
Contributor

hanbollar commented May 24, 2022

(put this as part of ts-actions for now but doesnt hvta stay here)

@Irev-Dev
Copy link
Collaborator

Irev-Dev commented May 24, 2022

Some thoughts and questions from the discussion

  • action that only installs the cli
  • action that handles file conversion with inputDir, outputDir, and format as inputs, or instead an example workflow that uses the cli install action to do the conversions? Solve the problem for them entirely vs show them how to compose our tools together?
  • What language do we write the action in? maybe bash is the most agnostic options? (the language only matters in so far as folks looking at the source code to create their own versions). Typescript would suit this repo more though, but this repo has odds and ends with our own repo logic, might not be the best to mix with CAD specific things?

@hanbollar
Copy link
Contributor Author

Some thoughts and questions from the discussion

* action that only installs the cli

* action that handles file conversion with `inputDir`, `outputDir`, and `format` as inputs, or instead an example workflow that uses the cli install action to do the conversions? Solve the problem for them entirely vs show them how to compose our tools together?

* What language do we write the action in? maybe bash is the most agnostic options? (the language only matters in so far as folks looking at the source code to create their own versions). Typescript would suit this repo more though, but this repo has odds and ends with our own repo logic, might not be the best to mix with CAD specific things?

i like the idea of keeping the two actions separate but we can create an example action in the tutorials section that shows how to use them one after the other

for the language part - i'm preferential to bash the only problem is with windows - people can still download and use bash there but it's not as ubiquitous -- just trying to limit barrier to entry
--> as a question since i'm still learning the ins&outs of github actions too - if a user is calling the actions we create, does it matter how the action is written? - if so, then stick with typescript just bc of uniformity and no bash, if not, then sure go with bash

@Irev-Dev
Copy link
Collaborator

Irev-Dev commented May 31, 2022

i'm preferential to bash the only problem is with windows

That's a very good point

does it matter how the action is written

No, makes no difference, yup, let's stick to TS.

@Irev-Dev
Copy link
Collaborator

Irev-Dev commented Jun 2, 2022

Not sure if this is something I should be worried about. For the install KittyCAD CLI action, I was trying to make the action still work if the action runner was linux or windows simply because it’s likely folks coming from the CAD world will me more comfortable with windows.
but I’m not sure that install commands at https://github.com/KittyCAD/cli/releases make sense for windows?
i.e.

# Export the sha256sum for verification.
$ export KITTYCAD_CLI_SHA256="ee4a911b6814262b4e4d83c877654715a6442d401dbd2a104ebf31e82101e024"


# Download and check the sha256sum.
$ curl -fSL "https://dl.kittycad.io/releases/cli/v0.0.9/cli-windows-amd64" -o "/usr/local/bin/kittycad" \
	&& echo "${KITTYCAD_CLI_SHA256}  /usr/local/bin/kittycad" | sha256sum -c - \
	&& chmod a+x "/usr/local/bin/kittycad"

/usr/local/bin/kittycad seems like a unix style path to me, and further when trying to run this I get

Warning: Failed to create the file C:/Program 
Warning: Files/Git/usr/local/bin/kittycad: No such file or directory

I'm not very good at windows, any ideas on how to get the install to work? or if this is even needed?

Edit: we don't think supporting windows for actions makes much sense, going to leave this.

@hanbollar
Copy link
Contributor Author

@jessfraz - including you for followup on kurt's question

@jessfraz
Copy link

jessfraz commented Jun 2, 2022

there is a file there that should in theory work on windows. I think its likely an issue w where it is saving to

@jessfraz
Copy link

jessfraz commented Jun 2, 2022

since /usr/local/bin is not a windows thing

@Irev-Dev
Copy link
Collaborator

Irev-Dev commented Jun 6, 2022

Thanks Jess

Action to install cli implemented in #40, works for Linux and Windows,

I also added an issue for the release install instructions for the CLI so it doesn't get lost.

@Irev-Dev
Copy link
Collaborator

Irev-Dev commented Jun 6, 2022

@hanbollar with #40, #42 and #43 I think this issue is done, with one outstanding question of if we think we're doing enough for windows users?

The two (1, 2) demo workflows in this repo that call the reusable actions also in this repo run on ubuntu-latest, windows-latest but I'm still using bash for some of the logic after the actions run to check outputs etc, I don't think that's problem as that's not part of the action and other users can just as easily use powershell.

I've updated the readme to give two example workflows for installing the CLI, or for using the directory-conversion action. One ideas is do a conversion example on a single file with powershell in the install-cli example. Instead of just run: kittycad --version # do things with cli which is there now?

PS I know earlier discussion we thought let leave all the actions as typescript and yet I did them both in bash. The cli install action had to be bash. The convert directory could have been typescript, but it didn't make a great deal of sense without the javascript client.

@hanbollar
Copy link
Contributor Author

@hanbollar with #40, #42 and #43 I think this issue is done, with one outstanding question of if we think we're doing enough for windows users?

for the actions themselves since the action will never make it out of the github linux space, we dont need to be super concerned about a dev step for windows users at this time - even though the app and items will be able to be used on windows, the system of these workflow efficiencies on github doesnt affect what system the user uses locally for the current actions we're developing from what i understand (tho it is good that we hv something in place that works at the moment)

for the time being - since future windows work is currently still dependent on the windows build - we can make a placeholder issue to revisit as well with the additional concerns you have but i think we're ok for now

additionally, at some point we might want to show a tutorial for how an individual can make a workflow from scratch (windows or not - and link to the general github tutorials on this too), but most developers in the graphics and engine software space use both linux and windows for dev since linux is a solid coding-space but that's partly due to the ubiquitous and accessibility and customization of linux in general

The two (1, 2) demo workflows in this repo that call the reusable actions also in this repo run on ubuntu-latest, windows-latest but I'm still using bash for some of the logic after the actions run to check outputs etc, I don't think that's problem as that's not part of the action and other users can just as easily use powershell.

for the bash part - i stand corrected from my earlier comment - there is a way to use bash on windows quite seamlessly (still looking into it tho) - https://itsfoss.com/install-bash-on-windows/ - linux-bash-shell solves most of the issues (and even git bash acts as an ok~ in between)

I've updated the readme to give two example workflows for installing the CLI, or for using the directory-conversion action. One ideas is do a conversion example on a single file with powershell in the install-cli example. Instead of just run: kittycad --version # do things with cli which is there now?

yea i like that idea, it's a good way to show off that it works with the windows setup too

@hanbollar
Copy link
Contributor Author

hanbollar commented Jun 6, 2022

one thing i would say for the current actions

  • is there a way for multiple actions in one repo to be put on the marketplace?
    • if not - then we might need to let ts-actions be the public localized version of the repo and have its readme be the listings to the other individual repos that have the action published on the marketplace
    • if so - if you think they're ready - make sure to publish on the github marketplace as well

@Irev-Dev
Copy link
Collaborator

Irev-Dev commented Jun 6, 2022

multiple actions in one repo to be put on the marketplace

Pretty clear no, I'll make new repos.

Additionally, at some point we might want to show a tutorial for how an individual can make a workflow from scratch

Here's my thinking here, I'll make a repo that's similar to openflexure or splitflap though much simpler, that will output some STLs with OpenSCAD, and than convert them to bunch of different formats with our actions. that can be the basis for the Tutorial and can reference it in the code first blog post. Because it's OpenSCAD I'll make the repo on my account instead of KittyCADs, and once we have modelling features we can make a new example using the KittyCAD org account. How does that sound @hanbollar?

@hanbollar
Copy link
Contributor Author

multiple actions in one repo to be put on the marketplace

Pretty clear no, I'll make new repos.

perf, can we still keep one main 'actions' repo that links to all the others that we can pin in the organization just so that's easy to reference ppl to the whole listing?

Additionally, at some point we might want to show a tutorial for how an individual can make a workflow from scratch

Here's my thinking here, I'll make a repo that's similar to openflexure or splitflap though much simpler, that will output some STLs with OpenSCAD, and than convert them to bunch of different formats with our actions. that can be the basis for the Tutorial and can reference it in the code first blog post. Because it's OpenSCAD I'll make the repo on my account instead of KittyCADs, and once we have modelling features we can make a new example using the KittyCAD org account. How does that sound @hanbollar?

sweet 👍 - one question - is there any problem with us having the openscad directly on a kittycad repo since we're just using it as a demo // example interaction for now?

@Irev-Dev
Copy link
Collaborator

Irev-Dev commented Jun 6, 2022

sweet 👍 - one question - is there any problem with us having the openscad directly on a kittycad repo since we're just using it as a demo // example interaction for now?

No, nothing technicaly wrong with that. My intuition told me better to keep them seperate. Should I make it a KittyCAD repo?

@Irev-Dev
Copy link
Collaborator

Irev-Dev commented Jun 6, 2022

I'm currently unable to publish to the market place.
image
@jessfraz are you able to help?
It doesn't give me a link, I found this but not sure where one accepts it.
I don't think this is a per repo thing, but in case it is, this is the repo in question: https://github.com/KittyCAD/install-cli

@jessfraz
Copy link

jessfraz commented Jun 6, 2022 via email

@Irev-Dev
Copy link
Collaborator

Irev-Dev commented Jun 6, 2022

Awesome, thanks!

@Irev-Dev
Copy link
Collaborator

Irev-Dev commented Jun 6, 2022

For reference:

https://github.com/marketplace?type=actions&query=kittycad+
If we want to get a custom icon for our actions, we’d need to become partners, I’m not sure how involved that is. https://partner.github.com/
Otherwise icons have to come from feather. Might be possible to try and get a KittyCAD icon into feather 🤷
I went with the box is it was the most “3d” thing I could see (edited)

@hanbollar
Copy link
Contributor Author

For reference:

https://github.com/marketplace?type=actions&query=kittycad+ If we want to get a custom icon for our actions, we’d need to become partners, I’m not sure how involved that is. https://partner.github.com/ Otherwise icons have to come from feather. Might be possible to try and get a KittyCAD icon into feather 🤷 I went with the box is it was the most “3d” thing I could see (edited)

just applied, now we wait 🤞

@hanbollar
Copy link
Contributor Author

No, nothing technicaly wrong with that. My intuition told me better to keep them seperate. Should I make it a KittyCAD repo?

🤔 maybe i partially misunderstood

if we're just /making the files using openscad/ and with those new files we use our example to /load up the files and convert them/ in an example action separately, i think it's fine keeping it just in kittycad since there wont be any openscad actually present

if you mean we're /making the files using openscad and converting them/ all in one example action then it might be better as you said to have your action that does the /making the files/ be just on your personal and the overall /example action/ on the kittycad one

@Irev-Dev
Copy link
Collaborator

Irev-Dev commented Jun 7, 2022

if you mean we're /making the files using openscad and converting them/ all in one example action

I did mean this, to have an ended to end code-first example, What else would be a good example with what the API is capable of? I guess just looking for changes in the 3D assets themselves, and triggering a conversion when they change?

We have our planning meeting tomorrow, so might be good to discuss then.

Irev-Dev added a commit that referenced this issue Jun 7, 2022
@Irev-Dev
Copy link
Collaborator

actions here: https://github.com/marketplace?type=&verification=&query=kittycad+

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

No branches or pull requests

3 participants