@@ -10,43 +10,128 @@ with this guide before attempting to contribute to PyConverter-XML2Py.
1010
1111The following contribution information is specific to PyConverter-XML2Py.
1212
13- Clone the repository
14- --------------------
13+ Developer installation
14+ ----------------------
1515
16+ Follow these steps to install the package in developer mode:
1617
17- Run this code to clone and install the latest version of PyConverter-XML2Py in development mode :
18+ #. Clone the repository :
1819
19- .. code :: console
20+ .. code :: bash
21+
22+ git clone https://github.com/ansys/pyconverter-xml2py.git
23+
24+ #. Create a fresh-clean Python environment and activate it. If you require
25+ additional information on creation of a virtual environment, see the
26+ official Python `venv `_ documentation.
27+
28+ .. tab-set ::
29+
30+ .. tab-item :: Linux
31+ :sync: linux
32+
33+ ::
34+
35+ python -m venv .venv
36+ source .venv/bin/activate
37+
38+ .. tab-item :: macOS
39+ :sync: macos
40+
41+ ::
42+
43+ python -m venv .venv
44+ source .venv/bin/activate
45+
46+ .. tab-item :: Windows
47+ :sync: windows
48+
49+ ::
50+
51+ python -m venv .venv
52+ .\.venv\Scripts\activate
53+
54+
55+ #. Make sure you have the latest version of `pip `_:
56+
57+ .. code :: bash
58+
59+ python -m pip install -U pip
60+
61+ #. Install the project in editable mode:
62+
63+ .. code :: bash
64+
65+ python -m pip install -e .
66+
67+ #. Install additional requirements (if needed):
68+
69+ .. code :: bash
70+
71+ python -m pip install .[doc,tests]
2072
21- git clone https://github.com/ansys/pyconverter-xml2py
22- cd pyconverter-xml2py
23- python -m pip install --upgrade pip
24- pip install -e .
73+ #. Verify your development installation:
2574
26- Post issues
27- -----------
75+ .. code :: bash
2876
29- Use the `PyConverter-XML2Py Issues <pyconverter.xml2py_issues _>`_ page to submit questions,
30- report bugs, and request new features. When possible, use these issue
31- templates:
77+ pytest tests -v
3278
33- * Bug report template
34- * Feature request template
3579
36- If your issue does not fit into one of these categories, create your own issue.
80+ Style and testing
81+ -----------------
3782
38- To reach the PyAnsys support team, email `pyansys.core@ansys.com <pyansys.core@ansys.com >`_.
83+ If required, you can call style commands (such as `black `_, `isort `_,
84+ and `flake8 `_) or unit testing commands (such as `pytest `_) from the command line.
85+ However, this does not guarantee that your project is being tested in an isolated
86+ environment, which is why you might consider using `tox `_.
3987
4088
89+ Documentation
90+ -------------
4191
42- Build documentation
43- -------------------
92+ For building documentation, you can run the usual rules provided in the
93+ ` Sphinx `_ Makefile or make.bat:
4494
45- To build the PyConverter-XML2Py documentation locally, in the root directory of the repository,
46- run these commands::
47-
48- pip install .[doc]
49- .\doc\make.bat html
95+ .. tab-set ::
96+
97+ .. tab-item :: Makefile
98+
99+ ::
100+
101+ python -m pip install .[doc]
102+ make -C doc html
103+
104+
105+ .. tab-item :: make.bat
106+
107+ ::
108+
109+ python -m pip install .[doc]
110+ .\doc\make.bat html
111+
112+ Once the documentation is built, you can open it as follows.
113+
114+ .. tab-set ::
115+
116+ .. tab-item :: Linux
117+ :sync: linux
118+
119+ By running the command:
120+ ::
121+
122+ your_browser_name doc/html/index.html
123+
124+ .. tab-item :: macOS
125+ :sync: macos
126+
127+ By opening the documentation, which you do by going to the ``doc/html `` directory
128+ and opening the ``index.html `` file.
129+
130+ .. tab-item :: Windows
131+ :sync: windows
132+
133+ By opening the documentation, which you do by going to the ``doc/html `` directory
134+ and opening the ``index.html `` file.
50135
51136
52137Adhere to code style
@@ -83,3 +168,21 @@ This way, it's not possible for you to push code that fails the style checks
83168 check for merge conflicts................................................Passed
84169 debug statements (python)................................................Passed
85170 Validate GitHub Workflows................................................Passed
171+
172+
173+ Distributing
174+ ------------
175+
176+ If you would like to create either source or wheel files, start by installing
177+ the building requirements:
178+
179+ .. code :: bash
180+
181+ python -m pip install -e .[doc,tests]
182+
183+ Then, execute these commands:
184+
185+ .. code :: bash
186+
187+ python -m build
188+ python -m twine check dist/*
0 commit comments