diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index b2c25cc5..c96c0dc9 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -39,7 +39,7 @@ jobs: options: "-u=0:0 --entrypoint /bin/bash" credentials: username: ${{ secrets.GH_USERNAME }} - password: ${{ secrets.MY_TOKEN }} + password: ${{ secrets.GITHUB_TOKEN }} env: ON_LOCAL: true ON_UBUNTU: true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 994ad3d5..3e9bd8d6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/psf/black - rev: 23.1.0 # IF VERSION CHANGES --> MODIFY "blacken-docs" MANUALLY AS WELL!! + rev: 23.3.0 # IF VERSION CHANGES --> MODIFY "blacken-docs" MANUALLY AS WELL!! hooks: - id: black @@ -8,14 +8,14 @@ repos: rev: 1.13.0 hooks: - id: blacken-docs - additional_dependencies: [black==23.1.0] + additional_dependencies: [black==23.3.0] - repo: https://github.com/PyCQA/flake8 rev: 6.0.0 hooks: - id: flake8 - repo: https://github.com/codespell-project/codespell - rev: v2.2.2 + rev: v2.2.4 hooks: - id: codespell args: ["--toml", "pyproject.toml"] @@ -34,7 +34,7 @@ repos: # this validates our github workflow files - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.21.0 + rev: 0.22.0 hooks: - id: check-github-workflows diff --git a/README.rst b/README.rst index 70ef269a..b2c85a80 100644 --- a/README.rst +++ b/README.rst @@ -1,25 +1,26 @@ -Pytools path -============ +ansys-tools-path +================ + |pyansys| |python| |pypi| |GH-CI| |codecov| |MIT| |black| .. |pyansys| image:: https://img.shields.io/badge/Py-Ansys-ffc107.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABDklEQVQ4jWNgoDfg5mD8vE7q/3bpVyskbW0sMRUwofHD7Dh5OBkZGBgW7/3W2tZpa2tLQEOyOzeEsfumlK2tbVpaGj4N6jIs1lpsDAwMJ278sveMY2BgCA0NFRISwqkhyQ1q/Nyd3zg4OBgYGNjZ2ePi4rB5loGBhZnhxTLJ/9ulv26Q4uVk1NXV/f///////69du4Zdg78lx//t0v+3S88rFISInD59GqIH2esIJ8G9O2/XVwhjzpw5EAam1xkkBJn/bJX+v1365hxxuCAfH9+3b9/+////48cPuNehNsS7cDEzMTAwMMzb+Q2u4dOnT2vWrMHu9ZtzxP9vl/69RVpCkBlZ3N7enoDXBwEAAA+YYitOilMVAAAAAElFTkSuQmCC :target: https://docs.pyansys.com/ :alt: PyAnsys -.. |python| image:: https://img.shields.io/pypi/pyversions/pytools-path?logo=pypi - :target: https://pypi.org/project/pytools-path/ +.. |python| image:: https://img.shields.io/pypi/pyversions/ansys-tools-path?logo=pypi + :target: https://pypi.org/project/ansys-tools-path/ :alt: Python -.. |pypi| image:: https://img.shields.io/pypi/v/pytools-path.svg?logo=python&logoColor=white - :target: https://pypi.org/project/pytools-path +.. |pypi| image:: https://img.shields.io/pypi/v/ansys-tools-path.svg?logo=python&logoColor=white + :target: https://pypi.org/project/ansys-tools-path :alt: PyPI -.. |codecov| image:: https://codecov.io/gh/pyansys/pytools-path/branch/main/graph/badge.svg - :target: https://codecov.io/gh/pyansys/pytools-path +.. |codecov| image:: https://codecov.io/gh/pyansys/ansys-tools-path/branch/main/graph/badge.svg + :target: https://codecov.io/gh/pyansys/ansys-tools-path :alt: Codecov -.. |GH-CI| image:: https://github.com/pyansys/pytools-path/actions/workflows/ci_cd.yml/badge.svg - :target: https://github.com/pyansys/pytools-path/actions/workflows/ci_cd.yml +.. |GH-CI| image:: https://github.com/pyansys/ansys-tools-path/actions/workflows/ci_cd.yml/badge.svg + :target: https://github.com/pyansys/ansys-tools-path/actions/workflows/ci_cd.yml :alt: GH-CI .. |MIT| image:: https://img.shields.io/badge/License-MIT-yellow.svg @@ -33,6 +34,7 @@ Pytools path Library to locate Ansys products in a local machine. +.. contribute_start How to install -------------- @@ -42,7 +44,9 @@ At least two installation modes are provided: user and developer. For users ^^^^^^^^^ -In order to install Pytools path, make sure you +.. howtoinstallusers_start + +In order to install ``ansys-tools-path``, make sure you have the latest version of `pip`_. To do so, run: .. code:: bash @@ -55,10 +59,12 @@ Then, you can simply execute: python -m pip install ansys-tools-path +.. howtoinstallusers_end + For developers ^^^^^^^^^^^^^^ -Installing Pytools path in developer mode allows +Installing ``ansys-tools-path`` in developer mode allows you to modify the source and enhance it. Before contributing to the project, please refer to the `PyAnsys Developer's guide`_. You will @@ -97,13 +103,11 @@ need to follow these steps: #. Install the project in editable mode: - .. code:: bash + .. code:: bash python -m pip install --editable ansys-tools-path -.. howtouse - How to testing -------------- @@ -157,5 +161,4 @@ the building requirements and then executing the build module: .. _PyAnsys Developer's guide: https://dev.docs.pyansys.com/ .. _pytest: https://docs.pytest.org/en/stable/ .. _Sphinx: https://www.sphinx-doc.org/en/master/ -.. _tox: https://tox.wiki/ -.. _api: +.. _tox: https://tox.wiki/ \ No newline at end of file diff --git a/doc/source/conf.py b/doc/source/conf.py index 1dc269f3..32a7d224 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -68,6 +68,22 @@ } +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. +exclude_patterns = [ + "_build", + "Thumbs.db", + ".DS_Store", + "links.rst", +] + +# make rst_epilog a variable, so you can add other epilog parts to it +rst_epilog = "" +# Read link all targets from file +with open("links.rst") as f: + rst_epilog += f.read() + # static path html_static_path = ["_static"] diff --git a/doc/source/contribute.rst b/doc/source/contribute.rst new file mode 100644 index 00000000..019c180b --- /dev/null +++ b/doc/source/contribute.rst @@ -0,0 +1,6 @@ + +Contributing +============ + +.. include:: ../../README.rst + :start-after: .. contribute_start \ No newline at end of file diff --git a/doc/source/index.rst b/doc/source/index.rst index cb0fc361..a5ef60ca 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -9,11 +9,19 @@ :maxdepth: 3 API + contribute -.. include:: ../../README.rst - :end-before: .. howtouse +================================================= +ansys-tools-path: A tool to locate ansys products +================================================= + +How to install +============== +.. include:: ../../README.rst + :start-after: .. howtoinstallusers_start + :end-before: .. howtoinstallusers_end How to use @@ -31,6 +39,3 @@ to locate the path of the latest ANSYS installation available: >>> find_ansys() 'C:/Program Files/ANSYS Inc/v211/ANSYS/bin/winx64/ansys211.exe', 21.1 - -.. include:: ../../README.rst - :start-after: .. howtouse \ No newline at end of file diff --git a/doc/source/links.rst b/doc/source/links.rst new file mode 100644 index 00000000..00aaa632 --- /dev/null +++ b/doc/source/links.rst @@ -0,0 +1,10 @@ +.. LINKS AND REFERENCES +.. _black: https://github.com/psf/black +.. _flake8: https://flake8.pycqa.org/en/latest/ +.. _isort: https://github.com/PyCQA/isort +.. _pip: https://pypi.org/project/pip/ +.. _pre-commit: https://pre-commit.com/ +.. _PyAnsys Developer's guide: https://dev.docs.pyansys.com/ +.. _pytest: https://docs.pytest.org/en/stable/ +.. _Sphinx: https://www.sphinx-doc.org/en/master/ +.. _tox: https://tox.wiki/