-
Notifications
You must be signed in to change notification settings - Fork 66
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
Added a documentation page with a pythreejs example. #262
Added a documentation page with a pythreejs example. #262
Conversation
Thanks for submitting your first pull request! You are awesome! 🤗 |
Ok, I can get the objects to display, just not the |
When |
docs/index.rst
Outdated
@@ -100,5 +100,6 @@ Horizon 2020 European Research Infrastructure project (676541). | |||
config_reference | |||
howto/initialize_cells | |||
minimal_example | |||
pythreejs-example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make more sense to add the example under examples section of the docs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but none of those are in the Sphinx docs. This table of contents toc
typically shows all the rst files. The examples in examples/
need to be moved into the Sphinx docs and then we could have an examples section in the table of contents.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe creating an examples directory in the sphinx docs is appropriate for these? It might make sense to move all of the existing examples in there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to moving all of our example pages to examples/
and adding a section in the docs for them specifically
I don't know that we need a separate index file for examples
, we can just link them from the front page like:
.. toctree::
:caption: Examples
examples/ex1
examples/ex2
etc
does that make sense?
@minrk Are there any tips for getting |
It's not display that's not working. Display works fine (try |
The lint test failure is fixed in #424. |
@TimStewartJ you could pull this branch and build the docs locally to test this example. Reviewing this PR will help you see how the example is supposed to work. |
@TimStewartJ will you review this PR for me? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the comments I've left, it looks good to me.
docs/examples/pythreejs-example.rst
Outdated
@@ -0,0 +1,139 @@ | |||
================= | |||
pythreejs Example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Every other title is capitalized, maybe this one should be too.
docs/examples/pythreejs-example.rst
Outdated
================= | ||
|
||
Thebe can display output from pythreejs_. The examples are taken from the | ||
pythreejs documentation and are licensed BSD 3 Clause. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A link to https://pythreejs.readthedocs.io/en/stable/examples/ or https://github.com/jupyter-widgets/pythreejs/tree/master/examples might be helpful here.
Also, I would change the wording from
... and are licensed BSD 3 Clause.
to
... and are licensed under the BSD 3-Clause License.
to match the wording of the other Thebe docs pages and pythreejs's license.
docs/examples/pythreejs-example.rst
Outdated
var y = Math.cos(v); | ||
var z = Math.cos(u+v); | ||
|
||
out.set(x,y,z) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this line should have a semicolon. I've tested it with one and it works as intended.
docs/examples/pythreejs-example.rst
Outdated
out.set(x,y,z) | ||
} | ||
""" | ||
surf_g = ParametricGeometry(func=f, slices=16, stacks=16); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly, this line probably shouldn't have a semicolon. It also works without it as intended.
No description provided.