Repository: ansys/pyconverter-xml2py (language: python)

Issue:
Changing the library name into `pydita-ast`
### 📝 Description of the feature

This is to follow-up this [comment](https://github.com/pyansys/pydita-ast/pull/7#issuecomment-1533118650).

### 💡 Steps for implementing the feature

_No response_

### 🔗 Useful links and references

_No response_


Discussion / hints:

Fix patch:
diff --git a/.coveragerc b/.coveragerc
index b8f11a033..59d0997e4 100644
--- a/.coveragerc
+++ b/.coveragerc
@@ -1,6 +1,6 @@
 [run]
 source =
-    ansys.dita.ast
+    pydita.ast
 
 [report]
 show_missing = true
diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml
index a7ab2ae04..109b33538 100644
--- a/.github/workflows/ci_cd.yml
+++ b/.github/workflows/ci_cd.yml
@@ -15,8 +15,8 @@ on:
 
 env:
   MAIN_PYTHON_VERSION: '3.9'
-  PACKAGE_NAME: 'ansys-dita-ast'
-  PACKAGE_NAMESPACE: 'ansys.dita.ast'
+  PACKAGE_NAME: 'pydita-ast'
+  PACKAGE_NAMESPACE: 'pydita.ast'
   RESET_PIP_CACHE: 0
   ON_CI: true
 
@@ -121,7 +121,7 @@ jobs:
         run: |
           pytest -v --durations=10 --maxfail=10 \
             --reruns 7 --reruns-delay 3 --ghdir ${{ github.workspace }}\
-            --cov=ansys.dita.ast --cov-report=xml:coverage.xml --cov-report=html\
+            --cov=pydita.ast --cov-report=xml:coverage.xml --cov-report=html\
             --cov-report term
 
       - name: "Upload coverage to Codecov"
@@ -167,7 +167,7 @@ jobs:
     # - name: "Release to the public PyPI repository"
     #   uses: pyansys/actions/release-pypi-public@v3
     #   with:
-    #     library-name: "ansys-dita-ast"
+    #     library-name: "pydita-ast"
     #     twine-username: "__token__"
     #     twine-token: ${{ secrets.PYPI_TOKEN }}
 
diff --git a/README.rst b/README.rst
index b41bcf13c..b3e6a9a23 100644
--- a/README.rst
+++ b/README.rst
@@ -16,7 +16,7 @@ User installation can be performed by running:
 
 .. code:: bash
 
-    python -m pip install ansys-dita-ast
+    python -m pip install pydita-ast
 
 For developers
 ^^^^^^^^^^^^^^
diff --git a/_package/pyproject.toml b/_package/pyproject.toml
index 75f4ebe87..baeaac934 100644
--- a/_package/pyproject.toml
+++ b/_package/pyproject.toml
@@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi"
 
 [project]
 # Check https://flit.readthedocs.io/en/latest/pyproject_toml.html for all available sections
-name = "ansys-dita-generatedcommands"
+name = "pydita-generatedcommands"
 version = "0.1.dev0"
 description = "Documentation."
 readme = "README.rst"
@@ -46,10 +46,12 @@ tests = [
 doc = [
     "Sphinx==7.0.0",
     "jupyter_sphinx==0.4.0",
+    "linuxdoc==20230506",
     "numpydoc==1.5.0",
     "pandas==2.0.1",
     "pypandoc==1.11",
     "pytest-sphinx==0.5.0",
+    "pydata_sphinx_theme==0.13.3",
     "sphinx-autobuild==2021.3.14",
     "sphinx-autodoc-typehints==1.23.0",
     "sphinx-copybutton==0.5.2",
@@ -58,7 +60,7 @@ doc = [
 ]
 
 [tool.flit.module]
-name = "ansys.dita.generatedcommands"
+name = "pydita.generatedcommands"
 
 [project.urls]
 Source = "https://github.com/pyansys/pydita-ast/"
diff --git a/doc/source/api/ast_class.rst b/doc/source/api/ast_class.rst
index 70c1fe23d..5e98d7f25 100644
--- a/doc/source/api/ast_class.rst
+++ b/doc/source/api/ast_class.rst
@@ -1,7 +1,7 @@
 AST tree
 ========
 
-.. currentmodule:: ansys.dita.ast.ast_tree
+.. currentmodule:: pydita.ast.ast_tree
 
 The following classes are used to create the adequate AST Tree:
 
diff --git a/doc/source/api/ast_functions.rst b/doc/source/api/ast_functions.rst
index 3516ff8a3..655304e2b 100644
--- a/doc/source/api/ast_functions.rst
+++ b/doc/source/api/ast_functions.rst
@@ -1,7 +1,7 @@
 AST functions
 =============
 
-.. currentmodule:: ansys.dita.ast.ast_tree
+.. currentmodule:: pydita.ast.ast_tree
 
 The following functions are used to create the adequate AST Tree:
 
diff --git a/doc/source/api/autogenerateddirectory.rst b/doc/source/api/autogenerateddirectory.rst
index 04b519234..25a017f43 100644
--- a/doc/source/api/autogenerateddirectory.rst
+++ b/doc/source/api/autogenerateddirectory.rst
@@ -1,7 +1,7 @@
 Autogenerated directory
 =======================
 
-.. currentmodule:: ansys.dita.ast.version_variables
+.. currentmodule:: pydita.ast.version_variables
 
 The following class returns the variables related to the XML documentation:
 
diff --git a/doc/source/api/directory_format.rst b/doc/source/api/directory_format.rst
index c810fef01..bddc13d46 100644
--- a/doc/source/api/directory_format.rst
+++ b/doc/source/api/directory_format.rst
@@ -1,7 +1,7 @@
 Directory format
 ================
 
-.. currentmodule:: ansys.dita.ast.directory_format
+.. currentmodule:: pydita.ast.directory_format
 
 The following functions return the paths needed when the XML directory
 follows the pre-defined format.
diff --git a/doc/source/api/load_xml_doc.rst b/doc/source/api/load_xml_doc.rst
index c3b34e81d..28627ce6e 100644
--- a/doc/source/api/load_xml_doc.rst
+++ b/doc/source/api/load_xml_doc.rst
@@ -1,7 +1,7 @@
 Load XML documentation
 ======================
 
-.. currentmodule:: ansys.dita.ast.load_xml_doc
+.. currentmodule:: pydita.ast.load_xml_doc
 
 The following functions load the XML documentation.
 
diff --git a/doc/source/api/oxygen_xml.rst b/doc/source/api/oxygen_xml.rst
index 841359172..5a58d2435 100644
--- a/doc/source/api/oxygen_xml.rst
+++ b/doc/source/api/oxygen_xml.rst
@@ -1,7 +1,7 @@
 Oxygen XML tree
 ===============
 
-.. currentmodule:: ansys.dita.ast.ast_tree
+.. currentmodule:: pydita.ast.ast_tree
 
 The following class enables to get an Oxygen XML Tree:
 
diff --git a/doc/source/api/writer.rst b/doc/source/api/writer.rst
index f03ffac8e..bb8d7566e 100644
--- a/doc/source/api/writer.rst
+++ b/doc/source/api/writer.rst
@@ -1,7 +1,7 @@
 Writer
 ======
 
-.. currentmodule:: ansys.dita.ast.writer
+.. currentmodule:: pydita.ast.writer
 
 The following functions convert the AST tree into a Sphinx documentation.
 
diff --git a/doc/source/conf.py b/doc/source/conf.py
index c1ccdb05e..e741ade0f 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -1,11 +1,11 @@
 """Sphinx documentation configuration file."""
 from datetime import datetime
 
-from ansys.dita.ast import __version__
 from ansys_sphinx_theme import ansys_favicon, pyansys_logo_black
+from pydita.ast import __version__
 
 # Project information
-project = "ansys-dita-ast"
+project = "pydita-ast"
 copyright = f"(c) {datetime.now().year} ANSYS, Inc. All rights reserved"
 author = "ANSYS, Inc."
 release = version = __version__
diff --git a/pyproject.toml b/pyproject.toml
index 251ad2bec..daa1b16f8 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi"
 
 [project]
 # Check https://flit.readthedocs.io/en/latest/pyproject_toml.html for all available sections
-name = "ansys-dita-ast"
+name = "pydita-ast"
 version = "0.1.dev0"
 description = "PyDita AST converter."
 readme = "README.rst"
@@ -30,7 +30,7 @@ dependencies = [
     "lxml==4.9.2",
     "py-asciimath==0.3.0",
     "pylatexenc==2.10",
-    "ansys-sphinx-theme==0.9.7",
+    "ansys-sphinx-theme==0.9.8",
     "tqdm>=4.64.1",
     "flit>=3.8.0",
     "sphinx-notfound-page==0.8.3",
@@ -46,7 +46,7 @@ tests = [
     "pytest-rerunfailures==11.1.2",
 ]
 doc = [
-    "Sphinx==7.0.0",
+    "Sphinx==6.2.1",
     "jupyter_sphinx==0.4.0",
     "numpydoc==1.5.0",
     "pandas==2.0.1",
@@ -60,7 +60,7 @@ doc = [
 ]
 
 [tool.flit.module]
-name = "ansys.dita.ast"
+name = "pydita.ast"
 
 [project.urls]
 Source = "https://github.com/pyansys/pydita-ast/"
diff --git a/src/ansys/dita/ast/__init__.py b/src/pydita/ast/__init__.py
similarity index 93%
rename from src/ansys/dita/ast/__init__.py
rename to src/pydita/ast/__init__.py
index 8abe22f8a..619580cbd 100644
--- a/src/ansys/dita/ast/__init__.py
+++ b/src/pydita/ast/__init__.py
@@ -1,5 +1,5 @@
 """
-ansys.dita.ast
+pydita.ast
 """
 
 try:
diff --git a/src/ansys/dita/ast/ast_tree.py b/src/pydita/ast/ast_tree.py
similarity index 100%
rename from src/ansys/dita/ast/ast_tree.py
rename to src/pydita/ast/ast_tree.py
diff --git a/src/ansys/dita/ast/directory_format.py b/src/pydita/ast/directory_format.py
similarity index 100%
rename from src/ansys/dita/ast/directory_format.py
rename to src/pydita/ast/directory_format.py
diff --git a/src/ansys/dita/ast/load_xml_doc.py b/src/pydita/ast/load_xml_doc.py
similarity index 99%
rename from src/ansys/dita/ast/load_xml_doc.py
rename to src/pydita/ast/load_xml_doc.py
index 293bf14e3..98b2943f5 100644
--- a/src/ansys/dita/ast/load_xml_doc.py
+++ b/src/pydita/ast/load_xml_doc.py
@@ -4,10 +4,10 @@
 import re
 import unicodedata
 
-import ansys.dita.ast.ast_tree as ast
-import ansys.dita.ast.version_variables as var
 from lxml.etree import ParserError
 from lxml.html import fromstring
+import pydita.ast.ast_tree as ast
+import pydita.ast.version_variables as var
 from tqdm import tqdm
 
 
diff --git a/src/ansys/dita/ast/version_variables.py b/src/pydita/ast/version_variables.py
similarity index 95%
rename from src/ansys/dita/ast/version_variables.py
rename to src/pydita/ast/version_variables.py
index de8e87e12..5f2802b55 100644
--- a/src/ansys/dita/ast/version_variables.py
+++ b/src/pydita/ast/version_variables.py
@@ -3,7 +3,7 @@ class Autogenerateddirectory:
 
     def __init__(self, terms) -> None:
         """Class initialization."""
-        self.autogenerated_directory_name = "ansys.dita.generatedcommands"
+        self.autogenerated_directory_name = "pydita.generatedcommands"
         self.version = terms["ansys_internal_version"]
         self.base_url = f"https://ansyshelp.ansys.com/Views/Secured/corp/v{self._version}/en/"
         self.cmd_base_url = f"{self.base_url}/ans_cmd/"
diff --git a/src/ansys/dita/ast/writer.py b/src/pydita/ast/writer.py
similarity index 96%
rename from src/ansys/dita/ast/writer.py
rename to src/pydita/ast/writer.py
index c288a1e16..b832f0ab1 100644
--- a/src/ansys/dita/ast/writer.py
+++ b/src/pydita/ast/writer.py
@@ -2,12 +2,12 @@
 import os
 import shutil
 
-from ansys.dita.ast import ast_tree as ast
-from ansys.dita.ast import directory_format as path
-from ansys.dita.ast import load_xml_doc as load
+from pydita.ast import ast_tree as ast
+from pydita.ast import directory_format as path
+from pydita.ast import load_xml_doc as load
 from tqdm import tqdm
 
-generated_src_code = os.path.join("src", "ansys", "dita", "generatedcommands")
+generated_src_code = os.path.join("src", "pydita", "generatedcommands")
 
 # map APDL command to pymapdl function
 CMD_MAP = {}
@@ -271,7 +271,7 @@ def write_docs(commands, path):
         fid.write("Autosummary\n")
         fid.write("###########\n")
 
-        fid.write(".. currentmodule:: ansys.dita.generatedcommands\n\n")
+        fid.write(".. currentmodule:: pydita.generatedcommands\n\n")
         fid.write(".. autosummary::\n")
         fid.write("   :template: base.rst\n")
         fid.write("   :toctree: _autosummary/\n\n")
diff --git a/tox.ini b/tox.ini
index 0fc5d42be..6521af445 100644
--- a/tox.ini
+++ b/tox.ini
@@ -17,7 +17,7 @@ basepython =
     {style,reformat,doc}: python3
 setenv =
     PYTHONUNBUFFERED = yes
-    coverage: PYTEST_EXTRA_ARGS = --cov=ansys.dita.ast --cov-report=term --cov-report=xml:.cov/xml --cov-report=html:.cov/html
+    coverage: PYTEST_EXTRA_ARGS = --cov=pydita.ast --cov-report=term --cov-report=xml:.cov/xml --cov-report=html:.cov/html
 extras = tests
 commands =
     pytest {env:PYTEST_MARKERS:} {env:PYTEST_EXTRA_ARGS:} {posargs:-vv}
diff --git a/xml2rst.py b/xml2rst.py
index 922eb0e52..73e94eb95 100644
--- a/xml2rst.py
+++ b/xml2rst.py
@@ -1,4 +1,4 @@
-from ansys.dita.ast import writer as wr
+from pydita.ast import writer as wr
 
 """
 Parse MAPDL command XML documentation.


Test patch:
diff --git a/tests/conftest.py b/tests/conftest.py
index bf066ae6b..2c6275b52 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -1,8 +1,8 @@
 import os
 
-import ansys.dita.ast.directory_format as ff
-import ansys.dita.ast.load_xml_doc as lxd
-import ansys.dita.ast.writer as wrt
+import pydita.ast.directory_format as ff
+import pydita.ast.load_xml_doc as lxd
+import pydita.ast.writer as wrt
 import pytest
 
 pytest_plugins = ["pytester"]
diff --git a/tests/test_directory_format.py b/tests/test_directory_format.py
index e8a6b88fe..9a44439cc 100644
--- a/tests/test_directory_format.py
+++ b/tests/test_directory_format.py
@@ -1,6 +1,6 @@
 import os
 
-import ansys.dita.ast.directory_format as ff
+import pydita.ast.directory_format as ff
 import pytest
 
 
diff --git a/tests/test_load_xml_doc.py b/tests/test_load_xml_doc.py
index 69e2442f3..50ff604a4 100644
--- a/tests/test_load_xml_doc.py
+++ b/tests/test_load_xml_doc.py
@@ -1,4 +1,4 @@
-import ansys.dita.ast.load_xml_doc as lxd
+import pydita.ast.load_xml_doc as lxd
 
 
 def test_load_links(link_path):
@@ -24,5 +24,5 @@ def test_load_docu_global(term_path):
 def test_load_terms(load_terms):
     terms, version_variables = load_terms
     assert terms["me"] == "Ansys Mechanical"
-    assert version_variables.autogenerated_directory_name == "ansys.dita.generatedcommands"
+    assert version_variables.autogenerated_directory_name == "pydita.generatedcommands"
     assert version_variables.version == terms["ansys_internal_version"]
diff --git a/tests/test_writer.py b/tests/test_writer.py
index f83468246..8ae96ad81 100644
--- a/tests/test_writer.py
+++ b/tests/test_writer.py
@@ -1,7 +1,7 @@
 import os
 import shutil
 
-import ansys.dita.ast.writer as wrt
+import pydita.ast.writer as wrt
 import pytest
 
 
diff --git a/tests/test_xml_ast.py b/tests/test_xml_ast.py
index 978602230..4353ce528 100644
--- a/tests/test_xml_ast.py
+++ b/tests/test_xml_ast.py
@@ -1,7 +1,7 @@
 # import os
 
-import ansys.dita.ast.ast_tree as ast
 from lxml.html import fromstring
+import pydita.ast.ast_tree as ast
 import pytest