@@ -27,30 +27,31 @@ Ansys pre-commit hooks
2727 :alt: Black
2828
2929
30- A repository containing a collection of `pre-commit `_ hooks for different purposes.
30+ This Ansys repository contains `pre-commit `_ hooks for different purposes.
31+ Currently, these hooks are available:
3132
32- The available hooks are the following:
33-
34- * ``add-license-headers ``: Add missing license headers to files by using reuse lint and annotate.
35- Requires repositories to have `REUSE <https://reuse.software/ >`_ implemented.
33+ * ``add-license-headers ``: Add missing license headers to files by using
34+ `REUSE <https://reuse.software/ >`_ . To use this hook, you must
35+ have ``REUSE `` implemented in your repository.
3636
3737
3838How to install
3939--------------
4040
41- At least two installation modes are provided: user and developer.
41+ The following sections provide instructions for installing the ``ansys-pre-commit-hooks ``
42+ package in two installation modes: user and developer.
4243
4344For users
4445^^^^^^^^^
4546
46- In order to install ansys-pre-commit-hooks library, make sure you
47- have the latest version of `pip `_. To do so , run:
47+ Before installing the package, to ensure that you
48+ have the latest version of `pip `_, run this command :
4849
4950.. code :: bash
5051
5152 python -m pip install -U pip
5253
53- Then, you can simply execute :
54+ Then, to install the package, run this command :
5455
5556.. code :: bash
5657
@@ -59,19 +60,21 @@ Then, you can simply execute:
5960 For developers
6061^^^^^^^^^^^^^^
6162
62- Installing ansys-pre-commit-hooks library in developer mode allows
63- you to modify the source and enhance it.
63+ Installing the package in developer mode allows you to modify and
64+ enhance the source code.
65+
66+ Before contributing to the project, ensure that you are familiar with
67+ the `PyAnsys Developer's Guide `_.
6468
65- Before contributing to the project, please refer to the `PyAnsys Developer's guide `_. You will
66- need to follow these steps:
69+ For a developer installation, you must follow these steps:
6770
68- #. Start by cloning this repository :
71+ #. Clone the repository with this command :
6972
7073 .. code :: bash
7174
7275 git clone https://github.com/ansys/pre-commit-hooks
7376
74- #. Create a fresh-clean Python environment and activate it:
77+ #. Create a fresh-clean Python environment and activate it with these commands :
7578
7679 .. code :: bash
7780
@@ -87,14 +90,15 @@ need to follow these steps:
8790 # Activate it in Windows Powershell
8891 .venv\S cripts\A ctivate.ps1
8992
90- #. Make sure you have the latest required build system tools:
93+ #. Ensure that you have the latest required build system tools by
94+ running this command:
9195
9296 .. code :: bash
9397
9498 python -m pip install -U pip flit tox twine
9599
96100
97- #. Install the project in editable mode:
101+ #. Install the project in editable mode by running one of these commands :
98102
99103 .. code :: bash
100104
@@ -110,7 +114,7 @@ need to follow these steps:
110114 # Install all requirements
111115 python -m pip install -e .[tests,doc]
112116
113- #. Finally, verify your development installation by running:
117+ #. Verify your development installation by running this command :
114118
115119 .. code :: bash
116120
@@ -120,37 +124,40 @@ need to follow these steps:
120124 How to test it
121125--------------
122126
123- This project takes advantage of `tox `_. This tool allows to automate common
124- development tasks (similar to Makefile) but it is oriented towards Python
125- development.
127+ This project takes advantage of `tox `_. This tool automates common
128+ development tasks (similar to Makefile), but it is oriented towards
129+ Python development.
126130
127- Using tox
128- ^^^^^^^^^
131+ Using ``tox ``
132+ ^^^^^^^^^^^^^
133+
134+ While Makefile has rules, ``tox `` has environments. In fact, ``tox `` creates its
135+ own virtual environment so that anything being tested is isolated from the project
136+ to guarantee the project's integrity.
129137
130- As Makefile has rules, `tox `_ has environments. In fact, the tool creates its
131- own virtual environment so anything being tested is isolated from the project in
132- order to guarantee project's integrity. The following environments commands are provided:
138+ These environment commands are provided:
133139
134- - **tox -e style **: will check for coding style quality.
135- - **tox -e py **: checks for unit tests.
136- - **tox -e py-coverage **: checks for unit testing and code coverage.
137- - **tox -e doc **: checs for documentation building process .
140+ - **tox -e style **: Checks for coding style quality.
141+ - **tox -e py **: Checks for unit tests.
142+ - **tox -e py-coverage **: Checks for unit testing and code coverage.
143+ - **tox -e doc **: Checks for successfully building the documentation .
138144
139145
140146Raw testing
141147^^^^^^^^^^^
142148
143- If required, you can always call the style commands (`black `_, `isort `_,
144- `flake8 `_...) or unit testing ones (`pytest `_) from the command line. However,
145- this does not guarantee that your project is being tested in an isolated
146- environment, which is the reason why tools like `tox `_ exist.
149+ If required, you can always call style commands, such as `black `_, `isort `_,
150+ and `flake8 `_, or unit testing commands, such as `pytest `_, from the command line.
151+ However, calling these commands does not guarantee that your project is
152+ being tested in an isolated environment, which is the reason why tools like
153+ ``tox `` exist.
147154
148155
149156A note on ``pre-commit ``
150157^^^^^^^^^^^^^^^^^^^^^^^^
151158
152159The style checks take advantage of `pre-commit `_. Developers are not forced but
153- encouraged to install this tool via :
160+ encouraged to install this tool by running this command :
154161
155162.. code :: bash
156163
@@ -160,14 +167,15 @@ encouraged to install this tool via:
160167 Documentation
161168-------------
162169
163- For building documentation, you can either run the usual rules provided in the
164- `Sphinx `_ Makefile, such us :
170+ For building documentation, you can run the usual rules provided in the
171+ `Sphinx `_ Makefile with a command that is formatted like this :
165172
166173.. code :: bash
167174
168175 make -C doc/ html && your_browser_name doc/html/index.html
169176
170- However, the recommended way of checking documentation integrity is using:
177+ However, the recommended way of checking documentation integrity is by
178+ running ``tox `` with a command that is formatted like this:
171179
172180.. code :: bash
173181
@@ -177,8 +185,8 @@ However, the recommended way of checking documentation integrity is using:
177185 Distributing
178186------------
179187
180- If you would like to create either source or wheel files, start by installing
181- the building requirements and then executing the build module:
188+ If you would like to create either source or wheel files, install
189+ the building requirements and then execute the build module with these commands :
182190
183191.. code :: bash
184192
@@ -193,7 +201,7 @@ the building requirements and then executing the build module:
193201.. _isort : https://github.com/PyCQA/isort
194202.. _pip : https://pypi.org/project/pip/
195203.. _pre-commit : https://pre-commit.com/
196- .. _PyAnsys Developer's guide : https://dev.docs.pyansys.com/
204+ .. _PyAnsys Developer's Guide : https://dev.docs.pyansys.com/
197205.. _pytest : https://docs.pytest.org/en/stable/
198206.. _Sphinx : https://www.sphinx-doc.org/en/master/
199207.. _tox : https://tox.wiki/
0 commit comments