Skip to content

Conversation

@JoostGevaert
Copy link

The code from the Quick Start guide doesn't run as is. These changes are meant to fix that.

…d (Poly)Line objects

The code from the Quick Start guide doesn't run as is. These changes are meant to fix that.
@JoostGevaert
Copy link
Author

There are actually a few more problems with this Quick Start guide:

2. Create project

visibility required

ProjectCreateInput visibility Field required
visibility Input should be 'PRIVATE', 'PUBLIC', 'UNLISTED' or 'WORKSPACE'

Workspaces

Projects can't be created outside of workspaces

Maybe it'd work better to let people input an ID of a existing project, such that they don't run into issues with workspaces or the 1 project per workspace limit on free tier?

In case you were OK with pushing people towards using marimo notebooks, you could also let people select one of their Speckle projects from a dropdown using:

projects = client.active_user.get_projects()
projects_dd = mo.ui.dropdown({proj.name: proj for proj in projects.items})
projects_dd

5. Create version

client.model.list doesn't exist

'ModelResource' object has no attribute 'list'
This should instead be client.model.get_models

models[0] doesn't work

'ResourceCollection[Model]' object is not subscriptable
This should instead use .items[index]
Also there are some other errors in the code =>
model = models.items[0]


If you let me know what you'd like me to do with the Create project issue in this guide, I can change this PR accordingly. Or if you want to do this whole revision yourselves, that's also fine ofc.

Suggestion: I recently learned about [mktestdocs](https://github.com/koaning/mktestdocs) (Short YouTube explainer), which you can use to test the code in your docs. This way you can make sure that the code in the Speckle docs actually runs. Maybe there's other solutions for this too?

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.

1 participant