@@ -5,37 +5,25 @@ Contribute
5
5
6
6
Overall guidance on contributing to a PyAnsys library appears in the
7
7
`Contributing <dev_guide_contributing _>`_ topic
8
- in the *PyAnsys Developer 's Guide *. Ensure that you are thoroughly familiar
9
- with this guide before attempting to contribute to Ansys Engineering Workflow API.
8
+ in the *PyAnsys developer 's guide *. Ensure that you are thoroughly familiar
9
+ with this guide before attempting to contribute to the Ansys Engineering Workflow API.
10
10
11
- The following contribution information is specific to Ansys Engineering Workflow API.
11
+ The following contribution information is specific to the Ansys Engineering Workflow API.
12
12
13
- Installation
14
- ------------
13
+ Install in developer mode
14
+ -------------------------
15
15
16
- The ``ansys-engineeringworkflow-api `` package currently supports Python
17
- 3.9 through 3.12 on Windows, MacOS, and Linux.
16
+ Installing the ``ansys-engineeringworkflow-api `` package in developer mode allows
17
+ you to modify the source and enhance it. This package supports Python 3.9 through 3.12
18
+ on Windows, MacOS, and Linux.
18
19
19
- You can install the ``ansys-engineeringworkflow-api `` package with this command:
20
-
21
- .. code ::
22
-
23
- pip install ansys-engineeringworkflow-api
24
-
25
- Alternatively, install the latest version from `ansys-engineeringworkflow-api GitHub
26
- <ansys-engineeringworkflow-api_repo_> `_ with this command:
27
-
28
- .. code ::
29
-
30
- pip install git+https://github.com/ansys/ansys-engineeringworkflow-api
31
-
32
- For a local development version, you can create a new virtual environment with this command:
20
+ For a local development version, you can create a clean virtual environment with this command:
33
21
34
22
.. code :: bash
35
23
36
24
python -m venv .venv
37
25
38
- You can then activate the virtual environment with the command appropriate for your operating system:
26
+ You can then activate this virtual environment with the command appropriate for your operating system:
39
27
40
28
.. tab-set ::
41
29
@@ -61,7 +49,8 @@ You can then activate the virtual environment with the command appropriate for y
61
49
.\.venv\Scripts\activate
62
50
63
51
64
- Next, install the development version of the project with these commands:
52
+ Next, install the development version of the ``ansys-engineeringworkflow-api `` package
53
+ with these commands:
65
54
66
55
.. code ::
67
56
@@ -70,8 +59,8 @@ Next, install the development version of the project with these commands:
70
59
pip install -e .
71
60
72
61
73
- Documentation
74
- -------------
62
+ Build documentation
63
+ -------------------
75
64
76
65
Install the required dependencies for the documentation with this command:
77
66
@@ -80,7 +69,8 @@ Install the required dependencies for the documentation with this command:
80
69
pip install .[doc]
81
70
82
71
83
- For building documentation, you run the usual rules provided in the Sphinx Makefile for your operating system:
72
+ To build documentation, run the usual rules provided in the Sphinx
73
+ Makefile for your operating system:
84
74
85
75
.. tab-set ::
86
76
@@ -106,26 +96,27 @@ For building documentation, you run the usual rules provided in the Sphinx Makef
106
96
.\doc\make.bat html
107
97
.\doc\build\html\index.html
108
98
109
-
110
99
Post issues
111
100
-----------
112
101
113
- Use the `Ansys Engineering Workflow API Issues <ansys-engineeringworkflow-api_issues _>`_ page to submit questions,
114
- report bugs, and request new features. When possible, use these issue
115
- templates:
116
-
117
- * Bug report template
118
- * Feature request template
119
- * Documentation issue template
120
- * Example request template
102
+ Use the `Ansys Engineering Workflow API Issues <ansys-engineeringworkflow-api_issues _>`_
103
+ page to report bugs and request new features.
121
104
122
- If your issue does not fit into one of these categories, create your own issue.
105
+ When possible, use the issue templates provided. If your issue does not fit into one
106
+ of the templates, you can click the link for opening a blank issue.
123
107
124
108
To reach the PyAnsys support team, email `
[email protected] <
[email protected] >`_.
125
109
110
+ Verify style and unit tests
111
+ ---------------------------
126
112
127
- Testing
128
- -------
113
+ If required, from the command line, you can call commands like `black `_, `isort `_, and `flake8 `_.
114
+ You can also call unit testing commands like `pytest `_. However, running these commands does not
115
+ guarantee that your project is being tested in an isolated environment, which is why you
116
+ might consider using `tox `_.
117
+
118
+ Test
119
+ ----
129
120
You can install the dependencies required for testing with this command:
130
121
131
122
.. code :: bash
@@ -142,8 +133,8 @@ You can then run the tests via ``pytest`` with this command:
142
133
Adhere to code style
143
134
--------------------
144
135
145
- Ansys Engineering Workflow API follows the PEP8 standard as indicated in the
146
- `PyAnsys Developer 's Guide <dev_guide_pyansys_pep8 _>`_ and implements style checking using
136
+ The Ansys Engineering Workflow API follows the PEP8 standard as indicated in the
137
+ `PyAnsys developer 's guide <dev_guide_pyansys_pep8 _>`_ and implements style checking using
147
138
`pre-commit <pre-commit _>`_.
148
139
149
140
To ensure your code meets minimum code styling standards, run these commands:
@@ -173,3 +164,20 @@ This way, it's not possible for you to push code that fails the style checks:
173
164
docformatter.............................................................Passed
174
165
codespell................................................................Passed
175
166
Validate GitHub Workflows................................................Passed
167
+
168
+ Distribute
169
+ ----------
170
+
171
+ If you would like to create either source or wheel files, start by running this
172
+ command to install the building requirements:
173
+
174
+ .. code :: bash
175
+
176
+ python -m pip install -e .[doc,tests]
177
+
178
+ Then, run these commands:
179
+
180
+ .. code :: bash
181
+
182
+ python -m build
183
+ python -m twine check dist/*
0 commit comments