Skip to content

Commit 42fccfc

Browse files
committed
fix: change gitub to github (#444)
change gitub to github
0 parents  commit 42fccfc

File tree

277 files changed

+80594
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

277 files changed

+80594
-0
lines changed

.buildinfo

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Sphinx build info version 1
2+
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3+
config: 01b48db682127ca4186a898729c925da
4+
tags: 645f666f9bcd5a90fca523b33c5a78b7

.nojekyll

Whitespace-only changes.

CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dev.docs.pyansys.com
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"\n\n# Adding a new gallery example\n\nThis example shows how to add a new example to the PyAnsys [Sphinx-Gallery](https://sphinx-gallery.github.io/). You can use this example as a template\nfor adding your examples.\n\nEach example should have a reference tag/key in the form:\n\n``.. _<example-name>_example:``.\n\nThe ``.. _`` is necessary. Everything that follows is your reference tag, which\ncan potentially be used within a docstring. All references should be in snake case.\n\nThe first section, which is text, provides a brief overview of what the example is.\nWhen using this example as a template, you would change the title to an appropriate\none for your example.\n\nAdd new examples as Python scripts like this:\n\n``examples/<index>-<directory-name>/<some-example>.py``\n\n<div class=\"alert alert-info\"><h4>Note</h4><p>Avoid creating directories unless absolutely necessary. If you *must*\n create a directory, make sure to add a ``README.txt`` file containing a\n reference, a title, and a one-sentence description of the directory.\n Otherwise, Sphinx ignores the new directory.</p></div>\n\nExample file names should use snake case and be hyphen-separated:\n\n``some-example.py``\n\nAfter this text section is the first code block. This is where you\ntypically set up your imports.\n"
8+
]
9+
},
10+
{
11+
"cell_type": "code",
12+
"execution_count": null,
13+
"metadata": {
14+
"collapsed": false
15+
},
16+
"outputs": [],
17+
"source": [
18+
"import pyvista as pv"
19+
]
20+
},
21+
{
22+
"cell_type": "markdown",
23+
"metadata": {},
24+
"source": [
25+
"## Section title\n\nCode blocks can be broken up with text sections, which are interpreted as\nReStructuredText.\n\nThe text sections are also translated into a markdown cell in the generated Jupyter\nnotebook or in the HTML documentation.\n\nText sections can contain any information that you may have regarding the example,\nsuch as step-by-step comments and notes regarding motivations.\n\nAs in Jupyter notebooks, if a statement is unassigned at the end of a code\nblock, output is generated and printed to the screen according to its\n``__repr__`` method. Otherwise, you can use the ``print()`` function to output text.\n\n"
26+
]
27+
},
28+
{
29+
"cell_type": "code",
30+
"execution_count": null,
31+
"metadata": {
32+
"collapsed": false
33+
},
34+
"outputs": [],
35+
"source": [
36+
"# Create a dataset and exercise its ``__repr__`` method\n\ndataset = pv.Sphere()\ndataset"
37+
]
38+
},
39+
{
40+
"cell_type": "markdown",
41+
"metadata": {},
42+
"source": [
43+
"## Plots and images\nIf you use anything that outputs an image (for example, the\n:func:`pyvista.Plotter.show` function), the resulting image is rendered in the\nHTML documentation.\n\n<div class=\"alert alert-info\"><h4>Note</h4><p>Unless ``sphinx_gallery_thumbnail_number = <int>`` is included at the top\n of the example script, the first figure (this one) is used for the\n gallery thumbnail image.\n\n Also note that this image number uses one-based indexing.</p></div>\n\n"
44+
]
45+
},
46+
{
47+
"cell_type": "code",
48+
"execution_count": null,
49+
"metadata": {
50+
"collapsed": false
51+
},
52+
"outputs": [],
53+
"source": [
54+
"dataset.plot(text=\"Example Figure\")"
55+
]
56+
},
57+
{
58+
"cell_type": "markdown",
59+
"metadata": {},
60+
"source": [
61+
"## Caveat - plotter must be within one cell\nIt's not possible to have a single :class:`pyvista.Plotter` object across\nmultiple cells because these are closed out automatically at the end of a\ncell.\n\nThis code exercise the :class:`pyvista.Actor` ``repr`` to demonstrate\nwhy you might want to instantiate a plotter without showing it in the same\ncell:\n\n"
62+
]
63+
},
64+
{
65+
"cell_type": "code",
66+
"execution_count": null,
67+
"metadata": {
68+
"collapsed": false
69+
},
70+
"outputs": [],
71+
"source": [
72+
"pl = pv.Plotter()\nactor = pl.add_mesh(dataset)\nactor"
73+
]
74+
},
75+
{
76+
"cell_type": "markdown",
77+
"metadata": {},
78+
"source": [
79+
"## This cell cannot run the plotter\nBecause the plotter is already closed by Sphinx-Gallery, the following code\nwould raise an error:\n\n>>> pl.show()\n\n"
80+
]
81+
},
82+
{
83+
"cell_type": "code",
84+
"execution_count": null,
85+
"metadata": {
86+
"collapsed": false
87+
},
88+
"outputs": [],
89+
"source": [
90+
"# You can, however, close out the plotter or access other attributes.\n\npl.close()"
91+
]
92+
},
93+
{
94+
"cell_type": "markdown",
95+
"metadata": {},
96+
"source": [
97+
"## Create a pull request\nOnce your example is complete and you've verified that it builds locally, you can\ncreate a pull request.\n\nBranches containing examples should be prefixed with ``docs/`` as per [Branch-naming conventions](https://dev.docs.pyansys.com/how-to/contributing.html#branch-naming-conventions).\n\n<div class=\"alert alert-info\"><h4>Note</h4><p>You only need to create the Python source example (PY file). Sphinx-Gallery\n automatically generates the Jupyter notebook and the RST file for generating\n the HTML documentation page.</p></div>\n\n"
98+
]
99+
}
100+
],
101+
"metadata": {
102+
"kernelspec": {
103+
"display_name": "Python 3",
104+
"language": "python",
105+
"name": "python3"
106+
},
107+
"language_info": {
108+
"codemirror_mode": {
109+
"name": "ipython",
110+
"version": 3
111+
},
112+
"file_extension": ".py",
113+
"mimetype": "text/x-python",
114+
"name": "python",
115+
"nbconvert_exporter": "python",
116+
"pygments_lexer": "ipython3",
117+
"version": "3.10.14"
118+
}
119+
},
120+
"nbformat": 4,
121+
"nbformat_minor": 0
122+
}
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
"""
2+
.. _adding_a_new_gallery_example:
3+
4+
Adding a new gallery example
5+
============================
6+
7+
This example shows how to add a new example to the PyAnsys `Sphinx-Gallery
8+
<https://sphinx-gallery.github.io/>`_. You can use this example as a template
9+
for adding your examples.
10+
11+
Each example should have a reference tag/key in the form:
12+
13+
``.. _<example-name>_example:``.
14+
15+
The ``.. _`` is necessary. Everything that follows is your reference tag, which
16+
can potentially be used within a docstring. All references should be in snake case.
17+
18+
The first section, which is text, provides a brief overview of what the example is.
19+
When using this example as a template, you would change the title to an appropriate
20+
one for your example.
21+
22+
Add new examples as Python scripts like this:
23+
24+
``examples/<index>-<directory-name>/<some-example>.py``
25+
26+
.. note::
27+
28+
Avoid creating directories unless absolutely necessary. If you *must*
29+
create a directory, make sure to add a ``README.txt`` file containing a
30+
reference, a title, and a one-sentence description of the directory.
31+
Otherwise, Sphinx ignores the new directory.
32+
33+
Example file names should use snake case and be hyphen-separated:
34+
35+
``some-example.py``
36+
37+
After this text section is the first code block. This is where you
38+
typically set up your imports.
39+
"""
40+
41+
import pyvista as pv
42+
43+
###############################################################################
44+
# Section title
45+
# ~~~~~~~~~~~~~
46+
#
47+
# Code blocks can be broken up with text sections, which are interpreted as
48+
# ReStructuredText.
49+
#
50+
# The text sections are also translated into a markdown cell in the generated Jupyter
51+
# notebook or in the HTML documentation.
52+
#
53+
# Text sections can contain any information that you may have regarding the example,
54+
# such as step-by-step comments and notes regarding motivations.
55+
#
56+
# As in Jupyter notebooks, if a statement is unassigned at the end of a code
57+
# block, output is generated and printed to the screen according to its
58+
# ``__repr__`` method. Otherwise, you can use the ``print()`` function to output text.
59+
60+
# Create a dataset and exercise its ``__repr__`` method
61+
62+
dataset = pv.Sphere()
63+
dataset
64+
65+
###############################################################################
66+
# Plots and images
67+
# ~~~~~~~~~~~~~~~~
68+
# If you use anything that outputs an image (for example, the
69+
# :func:`pyvista.Plotter.show` function), the resulting image is rendered in the
70+
# HTML documentation.
71+
#
72+
# .. note::
73+
#
74+
# Unless ``sphinx_gallery_thumbnail_number = <int>`` is included at the top
75+
# of the example script, the first figure (this one) is used for the
76+
# gallery thumbnail image.
77+
#
78+
# Also note that this image number uses one-based indexing.
79+
80+
dataset.plot(text="Example Figure")
81+
82+
###############################################################################
83+
# Caveat - plotter must be within one cell
84+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
85+
# It's not possible to have a single :class:`pyvista.Plotter` object across
86+
# multiple cells because these are closed out automatically at the end of a
87+
# cell.
88+
#
89+
# This code exercise the :class:`pyvista.Actor` ``repr`` to demonstrate
90+
# why you might want to instantiate a plotter without showing it in the same
91+
# cell:
92+
93+
pl = pv.Plotter()
94+
actor = pl.add_mesh(dataset)
95+
actor
96+
97+
###############################################################################
98+
# This cell cannot run the plotter
99+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
100+
# Because the plotter is already closed by Sphinx-Gallery, the following code
101+
# would raise an error:
102+
#
103+
# >>> pl.show()
104+
105+
# You can, however, close out the plotter or access other attributes.
106+
107+
pl.close()
108+
109+
###############################################################################
110+
# Create a pull request
111+
# ~~~~~~~~~~~~~~~~~~~~~
112+
# Once your example is complete and you've verified that it builds locally, you can
113+
# create a pull request.
114+
#
115+
# Branches containing examples should be prefixed with ``docs/`` as per `Branch-naming conventions
116+
# <https://dev.docs.pyansys.com/how-to/contributing.html#branch-naming-conventions>`_.
117+
#
118+
# .. note::
119+
#
120+
# You only need to create the Python source example (PY file). Sphinx-Gallery
121+
# automatically generates the Jupyter notebook and the RST file for generating
122+
# the HTML documentation page.

_images/AutoAPI-output-modified.png

91.3 KB

_images/GitHub-about-area.png

7.27 KB
1.57 KB

_images/architecture_diag.png

88.1 KB

_images/card-dev-guide-home-page.png

30.6 KB

_images/github_sections.png

9.93 KB
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<map id="sphinx&#45;ext&#45;graphviz" name="sphinx&#45;ext&#45;graphviz">
2+
</map>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<map id="sphinx&#45;ext&#45;graphviz" name="sphinx&#45;ext&#45;graphviz">
2+
</map>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<map id="sphinx&#45;ext&#45;graphviz" name="sphinx&#45;ext&#45;graphviz">
2+
</map>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<map id="sphinx&#45;ext&#45;graphviz" name="sphinx&#45;ext&#45;graphviz">
2+
</map>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<map id="sphinx&#45;ext&#45;graphviz" name="sphinx&#45;ext&#45;graphviz">
2+
</map>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<map id="sphinx&#45;ext&#45;graphviz" name="sphinx&#45;ext&#45;graphviz">
2+
</map>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<map id="sphinx&#45;ext&#45;graphviz" name="sphinx&#45;ext&#45;graphviz">
2+
</map>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<map id="sphinx&#45;ext&#45;graphviz" name="sphinx&#45;ext&#45;graphviz">
2+
</map>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<map id="sphinx&#45;ext&#45;graphviz" name="sphinx&#45;ext&#45;graphviz">
2+
</map>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<map id="sphinx&#45;ext&#45;graphviz" name="sphinx&#45;ext&#45;graphviz">
2+
</map>

_images/guidelines_chart.png

23.5 KB

_images/icon-add-suggestion.png

879 Bytes

_images/log_flow.png

11.2 KB
15.2 KB
5.89 KB

_images/notice-recent-pushes.png

8.29 KB
45.9 KB
38.8 KB
20.7 KB

_images/tab-set-double-dev-guide.png

9.76 KB

_images/tab-set-single-dev-guide.png

16 KB

_images/windows_terminal.png

11.8 KB
Lines changed: 114 additions & 0 deletions

0 commit comments

Comments
 (0)