Skip to content

Commit dce3946

Browse files
docs: add contributing section
1 parent f762920 commit dce3946

File tree

2 files changed

+133
-0
lines changed

2 files changed

+133
-0
lines changed

doc/source/contributing.rst

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
Contribute
2+
##########
3+
4+
Overall guidance on contributing to a PyAnsys library appears in the
5+
`Contributing <https://dev.docs.pyansys.com/how-to/contributing.html>`_ topic
6+
in the *PyAnsys Developer's Guide*. Ensure that you are thoroughly familiar
7+
with this guide before attempting to contribute to PyAnsys Quarto Cheat Sheet.
8+
9+
The following contribution information is specific to PyAnsys Quarto Cheat Sheet.
10+
11+
Clone the repository
12+
--------------------
13+
14+
To clone and install the latest PyAnsys Quarto Cheat Sheet in development mode, run
15+
these commands:
16+
17+
.. code::
18+
19+
git clone https://github.com/ansys-internal/pyansys-quarto-cheatsheet.git
20+
cd pyansys-quarto-cheatsheet
21+
22+
# Install the package in development mode
23+
quarto install extension . --no-prompt
24+
25+
26+
Post issues
27+
-----------
28+
29+
Use the `PyAnsys Quarto Cheat Sheet Issues <https://github.com/ansys-internal/pyansys-quarto-cheatsheet/issues>`_
30+
page to submit questions, report bugs, and request new features.
31+
32+
To reach the project support team, email `pyansys.core@ansys.com <pyansys.core@ansys.com>`_.
33+
34+
View documentation
35+
------------------
36+
37+
Documentation for the latest stable release of PyAnsys Quarto Cheat Sheet is hosted at
38+
`PyAnsys Quarto Cheat Sheet Documentation <https://quarto-cheat-sheet.docs.pyansys.com>`_.
39+
40+
In the upper right corner of the documentation's title bar, there is an option
41+
for switching from viewing the documentation for the latest stable release
42+
to viewing the documentation for the development version or previously
43+
released versions.
44+
45+
Adhere to code style
46+
--------------------
47+
48+
PyAnsys Quarto Cheat Sheet implements style checking using
49+
`pre-commit <https://pre-commit.com/>`_.
50+
51+
To ensure your code meets minimum code styling standards, run these commands::
52+
53+
pip install pre-commit
54+
pre-commit run --all-files
55+
56+
You can also install this as a pre-commit hook by running this command::
57+
58+
pre-commit install
59+
60+
This way, it's not possible for you to push code that fails the style checks::
61+
62+
$ pre-commit install
63+
$ git commit -am "feat: Added my cool features"
64+
check yaml...............................................................Passed
65+
trim trailing whitespace.................................................Passed
66+
fix end of files.........................................................Passed
67+
check for merge conflicts................................................Passed
68+
Validate GitHub Workflows................................................Passed
69+
Add License Headers......................................................Passed
70+
71+
72+
Build the cheat sheet
73+
---------------------
74+
.. note::
75+
76+
To build cheat sheet pdf locally, you must have `quarto <https://quarto.org/docs/getting-started/installation.html>`_ installed.
77+
78+
To build the cheat sheet pdf, run this command::
79+
80+
quarto render cheatsheet.qmd
81+
82+
The cheat sheet pdf is built in the ``_build`` directory
83+
since the output directory is set to ``_build`` in the ``_quarto.yml`` file.
84+
if you want to change the output directory, you can change it in the ``_quarto.yml`` file.
85+
86+
Build the documentation
87+
-----------------------
88+
To build the documentation locally, you must run this command to install the
89+
documentation dependencies in requirements_docs.txt in requirements directory::
90+
91+
pip install -r requirements/requirements_docs.txt
92+
93+
Then, navigate to the ``doc`` directory and run this command
94+
95+
.. tab-set::
96+
97+
.. tab-item:: Linux/macOS
98+
99+
.. code::
100+
101+
make html
102+
103+
.. tab-item:: Windows
104+
105+
.. code::
106+
107+
./make.bat html
108+
109+
The documentation is built in the ``doc/_build/html`` directory.
110+
111+
You can clean the documentation build by running this command
112+
113+
.. tab-set::
114+
115+
.. tab-item:: Linux/macOS
116+
117+
.. code::
118+
119+
make clean
120+
121+
.. tab-item:: Windows
122+
123+
.. code::
124+
125+
./make.bat clean

doc/source/index.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,18 @@ markdown and code.
3131
Explore examples that show how to use PyAnsys Quarto Cheat Sheet to
3232
create your own cheat sheets.
3333

34+
.. grid-item-card:: Contributing :fa:`users`
35+
:padding: 2 2 2 2
36+
:link: contributing
37+
:link-type: doc
38+
39+
Learn how to contribute to the development of PyAnsys Quarto Cheat Sheet.
40+
3441

3542
.. toctree::
3643
:hidden:
3744

3845
getting-started
3946
user-guide
4047
examples
48+
contributing

0 commit comments

Comments
 (0)