Skip to content

Commit 38c3823

Browse files
clatapieRobPasMueRevathyvenugopal162PipKat
authored
Changing package name into pyconverter-xml2py (#79)
Co-authored-by: Roberto Pastor Muela <[email protected]> Co-authored-by: Revathy Venugopal <[email protected]> Co-authored-by: Kathy Pippert <[email protected]>
1 parent 4146008 commit 38c3823

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+161
-152
lines changed

.coveragerc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[run]
22
source =
3-
pydita_ast
3+
pyconverter.xml2py
44

55
[report]
66
show_missing = true

.github/workflows/autodoc_cicd.yml

+16-16
Original file line numberDiff line numberDiff line change
@@ -35,27 +35,27 @@ jobs:
3535
uses: actions/cache@v3
3636
with:
3737
path: ~/.cache/pip
38-
key: Python-pydita-generatedcommands-v${{ env.RESET_PIP_CACHE_2 }}-${{ hashFiles('pyproject.toml') }}
38+
key: Python-pyconverter-generatedcommands-v${{ env.RESET_PIP_CACHE_2 }}-${{ hashFiles('pyproject.toml') }}
3939
restore-keys: |
40-
Python-pydita-generatedcommands-v${{ env.RESET_PIP_CACHE_2 }}
40+
Python-pyconverter-generatedcommands-v${{ env.RESET_PIP_CACHE_2 }}
4141
4242
# The token will expire in 2024.
4343
- name: "Checkout mapdl-cmd-doc repository"
4444
uses: actions/checkout@v3
4545
with:
4646
repository: ansys-internal/mapdl-cmd-doc
47-
ref: feat/pydita-ast-predifined-format
47+
ref: feat/pyconverter-xml2py-predifined-format
4848
token: ${{ secrets.MAPDL_CMD_DOC_TOKEN }}
4949
path: mapdl-cmd-doc
5050

51-
- name: "Install pydita-ast"
51+
- name: "Install pyconverter-xml2py"
5252
run: |
5353
pip install --upgrade pip
5454
pip install .[doc]
5555
56-
- name: "Create pydita-autogenerated doc"
56+
- name: "Create pyconverter-autogenerated doc"
5757
run: |
58-
pydita-ast package -x ${{ github.workspace }}/mapdl-cmd-doc -f ${{ github.workspace }}/tests/customized_functions
58+
pyconverter-xml2py package -x ${{ github.workspace }}/mapdl-cmd-doc -f ${{ github.workspace }}/tests/customized_functions
5959
6060
- name: Upload autogenerated doc artifacts
6161
uses: actions/upload-artifact@v3
@@ -98,34 +98,34 @@ jobs:
9898
uses: actions/cache@v3
9999
with:
100100
path: ~/.cache/pip
101-
key: Python-pydita-generatedcommands-v${{ env.RESET_PIP_CACHE_2 }}-${{ inputs.MAIN_PYTHON_VERSION }}-${{ hashFiles('pyproject.toml') }}
101+
key: Python-pyconverter-generatedcommands-v${{ env.RESET_PIP_CACHE_2 }}-${{ inputs.MAIN_PYTHON_VERSION }}-${{ hashFiles('pyproject.toml') }}
102102
restore-keys: |
103-
Python-pydita-generatedcommands-v${{ env.RESET_PIP_CACHE_2 }}-${{ inputs.MAIN_PYTHON_VERSION }}
103+
Python-pyconverter-generatedcommands-v${{ env.RESET_PIP_CACHE_2 }}-${{ inputs.MAIN_PYTHON_VERSION }}
104104
105-
- name: "Install pydita-generatedcommands"
105+
- name: "Install pyconverter-generatedcommands"
106106
run: |
107107
pip install .
108108
109-
- name: "Retrieve PyDita-Generatedcommands version"
109+
- name: "Retrieve PyConverter-GeneratedCommands version"
110110
run: |
111-
echo "PYDITA_GENERATED_VERSION=$(python -c 'from pydita.generatedcommands import __version__; print(__version__)')" >> $GITHUB_ENV
112-
echo "PyDita-Generatedcommands version is: $(python -c 'from pydita.generatedcommands import __version__; print(__version__)')"
111+
echo "PYCONVERTER_GENERATED_VERSION=$(python -c 'from pyconverter.generatedcommands import __version__; print(__version__)')" >> $GITHUB_ENV
112+
echo "PyConverter-GeneratedCommands version is: $(python -c 'from pyconverter.generatedcommands import __version__; print(__version__)')"
113113
114114
- name: "Cache docs build directory"
115115
uses: actions/cache@v3
116116
with:
117117
path: doc/_build
118-
key: doc-build-pydita-generatedcommands-v${{ env.RESET_DOC_BUILD_CACHE_2 }}-${{ inputs.PYDITA_GENERATED_VERSION }}-${{ github.sha }}
118+
key: doc-build-pyconverter-generatedcommands-v${{ env.RESET_DOC_BUILD_CACHE_2 }}-${{ inputs.PYCONVERTER_GENERATED_VERSION }}-${{ github.sha }}
119119
restore-keys: |
120-
doc-build-pydita-generatedcommands-v${{ env.RESET_DOC_BUILD_CACHE_2 }}-${{ inputs.PYDITA_GENERATED_VERSION }}
120+
doc-build-pyconverter-generatedcommands-v${{ env.RESET_DOC_BUILD_CACHE_2 }}-${{ inputs.PYCONVERTER_GENERATED_VERSION }}
121121
122122
- name: "Cache autosummary"
123123
uses: actions/cache@v3
124124
with:
125125
path: doc/source/_autosummary/*.rst
126-
key: autosummary-pydita-generatedcommands-v${{ env.RESET_AUTOSUMMARY_CACHE_2 }}-${{ inputs.PYDITA_GENERATED_VERSION }}-${{ github.sha }}
126+
key: autosummary-pyconverter-generatedcommands-v${{ env.RESET_AUTOSUMMARY_CACHE_2 }}-${{ inputs.PYCONVERTER_GENERATED_VERSION }}-${{ github.sha }}
127127
restore-keys: |
128-
autosummary-pydita-generatedcommands-v${{ env.RESET_AUTOSUMMARY_CACHE_2 }}-${{ inputs.PYDITA_GENERATED_VERSION }}
128+
autosummary-pyconverter-generatedcommands-v${{ env.RESET_AUTOSUMMARY_CACHE_2 }}-${{ inputs.PYCONVERTER_GENERATED_VERSION }}
129129
130130
- name: "Run Ansys documentation building action"
131131
uses: ansys/actions/doc-build@v4

.github/workflows/ci_cd.yml

+15-15
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ on:
1515

1616
env:
1717
MAIN_PYTHON_VERSION: '3.10'
18-
PACKAGE_NAME: 'pydita-ast'
19-
PACKAGE_NAMESPACE: 'pydita_ast'
20-
DOCUMENTATION_CNAME: 'pydita-ast.docs.pyansys.com'
18+
PACKAGE_NAME: 'pyconverter-xml2py'
19+
PACKAGE_NAMESPACE: 'pyconverter.xml2py'
20+
DOCUMENTATION_CNAME: 'pyconverter-xml2py.docs.pyansys.com'
2121
RESET_PIP_CACHE: 0
2222
RESET_AUTOSUMMARY_CACHE: 0
2323
RESET_DOC_BUILD_CACHE: 0
@@ -121,7 +121,7 @@ jobs:
121121
uses: actions/checkout@v3
122122
with:
123123
repository: ansys-internal/mapdl-cmd-doc
124-
ref: feat/pydita-ast-predifined-format
124+
ref: feat/pyconverter-xml2py-predifined-format
125125
token: ${{ secrets.MAPDL_CMD_DOC_TOKEN }}
126126
path: mapdl-cmd-doc
127127

@@ -133,7 +133,7 @@ jobs:
133133
run: |
134134
pytest -v --durations=10 --maxfail=10 \
135135
--reruns 7 --reruns-delay 3 --ghdir ${{ github.workspace }}\
136-
--cov=pydita_ast --cov-report=xml:coverage.xml --cov-report=html\
136+
--cov=pyconverter.xml2py --cov-report=xml:coverage.xml --cov-report=html\
137137
--cov-report term
138138
139139
- name: "Upload coverage to Codecov"
@@ -166,35 +166,35 @@ jobs:
166166
uses: actions/cache@v3
167167
with:
168168
path: ~/.cache/pip
169-
key: Python-pydita_ast-v${{ env.RESET_PIP_CACHE }}-${{ env.MAIN_PYTHON_VERSION }}-${{ hashFiles('pyproject.toml') }}
169+
key: Python-pyconverter.xml2py-v${{ env.RESET_PIP_CACHE }}-${{ env.MAIN_PYTHON_VERSION }}-${{ hashFiles('pyproject.toml') }}
170170
restore-keys: |
171-
Python-pydita_ast-v${{ env.RESET_PIP_CACHE }}-${{ env.MAIN_PYTHON_VERSION }}
171+
Python-pyconverter.xml2py-v${{ env.RESET_PIP_CACHE }}-${{ env.MAIN_PYTHON_VERSION }}
172172
173-
- name: "Install pydita-ast"
173+
- name: "Install pyconverter-xml2py"
174174
run: |
175175
pip install --upgrade pip
176176
pip install .[doc]
177177
178-
- name: "Retrieve pydita_ast version"
178+
- name: "Retrieve pyconverter.xml2py version"
179179
run: |
180-
echo "PYDITA_VERSION=$(python -c 'from pydita_ast import __version__; print(__version__)')" >> $GITHUB_ENV
181-
echo "pydita_ast version is: $(python -c 'from pydita_ast import __version__; print(__version__)')"
180+
echo "PYCONVERTER_VERSION=$(python -c 'from pyconverter.xml2py import __version__; print(__version__)')" >> $GITHUB_ENV
181+
echo "pyconverter.xml2py version is: $(python -c 'from pyconverter.xml2py import __version__; print(__version__)')"
182182
183183
- name: "Cache docs build directory"
184184
uses: actions/cache@v3
185185
with:
186186
path: doc/_build
187-
key: doc-build-pydita-ast-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ env.PYDITA_VERSION }}-${{ github.sha }}
187+
key: doc-build-pyconverter-xml2py-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ env.PYCONVERTER_VERSION }}-${{ github.sha }}
188188
restore-keys: |
189-
doc-build-pydita-ast-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ env.PYDITA_VERSION }}
189+
doc-build-pyconverter-xml2py-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ env.PYCONVERTER_VERSION }}
190190
191191
- name: "Cache autosummary"
192192
uses: actions/cache@v3
193193
with:
194194
path: doc/source/**/_autosummary/**/*.rst
195-
key: autosummary-pydita-ast-v${{ env.RESET_AUTOSUMMARY_CACHE }}-${{ env.PYDITA_VERSION }}-${{ github.sha }}
195+
key: autosummary-pyconverter-xml2py-v${{ env.RESET_AUTOSUMMARY_CACHE }}-${{ env.PYCONVERTER_VERSION }}-${{ github.sha }}
196196
restore-keys: |
197-
autosummary-pydita-ast-v${{ env.RESET_AUTOSUMMARY_CACHE }}-${{ env.PYDITA_VERSION }}
197+
autosummary-pyconverter-xml2py-v${{ env.RESET_AUTOSUMMARY_CACHE }}-${{ env.PYCONVERTER_VERSION }}
198198
199199
- name: "Run Ansys documentation building action"
200200
uses: ansys/actions/doc-build@v4

.github/workflows/label.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ jobs:
7979
issue-number: ${{ github.event.pull_request.number }}
8080
body: |
8181
Please add one of the following labels to add this contribution to the Release Notes :point_down:
82-
- [bug](https://github.com/ansys/pydita-ast/pulls?q=label%3Abug+)
83-
- [documentation](https://github.com/ansys/pydita-ast/pulls?q=label%3Adocumentation+)
84-
- [enhancement](https://github.com/ansys/pydita-ast/pulls?q=label%3Aenhancement+)
85-
- [good first issue](https://github.com/ansys/pydita-ast/pulls?q=label%3Agood+first+issue)
86-
- [maintenance](https://github.com/ansys/pydita-ast/pulls?q=label%3Amaintenance+)
87-
- [release](https://github.com/ansys/pydita-ast/pulls?q=label%3Arelease+)
82+
- [bug](https://github.com/ansys/pyconverter-xml2py/pulls?q=label%3Abug+)
83+
- [documentation](https://github.com/ansys/pyconverter-xml2py/pulls?q=label%3Adocumentation+)
84+
- [enhancement](https://github.com/ansys/pyconverter-xml2py/pulls?q=label%3Aenhancement+)
85+
- [good first issue](https://github.com/ansys/pyconverter-xml2py/pulls?q=label%3Agood+first+issue)
86+
- [maintenance](https://github.com/ansys/pyconverter-xml2py/pulls?q=label%3Amaintenance+)
87+
- [release](https://github.com/ansys/pyconverter-xml2py/pulls?q=label%3Arelease+)

README.rst

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
PyDita-AST
2-
==========
1+
PyConverter-XML2Py
2+
==================
33

44
A Python wrapper to convert XML documentation into Python source code
55
with its related Sphinx documentation.
@@ -10,14 +10,14 @@ with its related Sphinx documentation.
1010
:target: https://docs.pyansys.com/
1111
:alt: PyAnsys
1212

13-
.. |pypi| image:: https://img.shields.io/pypi/v/pydita-ast.svg?logo=python&logoColor=white
14-
:target: https://pypi.org/project/pydita-ast/
13+
.. |pypi| image:: https://img.shields.io/pypi/v/pyconverter-xml2py.svg?logo=python&logoColor=white
14+
:target: https://pypi.org/project/pyconverter-xml2py/
1515

16-
.. |codecov| image:: https://codecov.io/gh/ansys/pydita-ast/branch/main/graph/badge.svg
17-
:target: https://codecov.io/gh/ansys/pydita-ast
16+
.. |codecov| image:: https://codecov.io/gh/ansys/pyconverter-xml2py/branch/main/graph/badge.svg
17+
:target: https://codecov.io/gh/ansys/pyconverter-xml2py
1818

19-
.. |GH-CI| image:: https://github.com/ansys/pydita-ast/actions/workflows/ci_cd.yml/badge.svg
20-
:target: https://github.com/ansys/pydita-ast/actions/workflows/ci_cd.yml
19+
.. |GH-CI| image:: https://github.com/ansys/pyconverter-xml2py/actions/workflows/ci_cd.yml/badge.svg
20+
:target: https://github.com/ansys/pyconverter-xml2py/actions/workflows/ci_cd.yml
2121

2222
.. |MIT| image:: https://img.shields.io/badge/License-MIT-yellow.svg
2323
:target: https://opensource.org/licenses/MIT
@@ -30,26 +30,26 @@ with its related Sphinx documentation.
3030
Overview
3131
--------
3232

33-
The PyDita-AST project aims to automatically generate a Python library and a related
33+
The PyConverter-XML2Py project aims to automatically generate a Python library and a related
3434
Sphinx documentation from an XML documentation.
3535

3636

3737
Documentation and issues
3838
------------------------
3939

40-
On the `PyDita-AST Issues <https://github.com/ansys/pydita-ast/issues>`_ for this repository,
40+
On the `PyConverter-XML2Py Issues <https://github.com/ansys/pyconverter-xml2py/issues>`_ for this repository,
4141
you can create issues to submit questions, report bugs, and request new features.
4242
To reach the PyAnsys support team, email `[email protected] <[email protected]>`_.
4343

4444

4545
Getting started
4646
---------------
4747

48-
Install the ``pydita-ast`` package with:
48+
Install the ``pyconverter-xml2py`` package with:
4949

5050
.. code:: bash
5151
52-
python -m pip install pydita-ast
52+
python -m pip install pyconverter-xml2py
5353
5454
5555
It is recommended to organize the XML documentation as follow:
@@ -66,14 +66,14 @@ Once the ``XML_directory`` is correctly organized, the converter can be run.
6666

6767
.. code:: bash
6868
69-
pydita-ast package -x XML_directory_path
69+
pyconverter-xml2py package -x XML_directory_path
7070
7171
If some functions need to be customized, the path containing the python
7272
files can be specified.
7373

7474
.. code:: bash
7575
76-
pydita-ast package -x XML_directory_path -f customized_function_directory_path
76+
pyconverter-xml2py package -x XML_directory_path -f customized_function_directory_path
7777
7878
7979
A new package is then automatically generated. Its default name is ``package``.

_package/doc/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ clean:
2525
pdf:
2626
@$(SPHINXBUILD) -M latex "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
2727
cd $(BUILDDIR)/latex && latexmk -r latexmkrc -pdf *.tex -interaction=nonstopmode || true
28-
(test -f $(BUILDDIR)/latex/pydita-generatedcommands-Documentation-*.pdf && echo pdf exists) || exit 1
28+
(test -f $(BUILDDIR)/latex/pyconverter-generatedcommands-Documentation-*.pdf && echo pdf exists) || exit 1

_package/doc/source/conf.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
from datetime import datetime
22

3-
from pydita.generatedcommands import __version__
3+
from pyconverter.generatedcommands import __version__
44

55
# Project information
6-
project = "pydita-generatedcommands"
6+
project = "pyconverter-generatedcommands"
77
copyright = f"(c) {datetime.now().year} ANSYS, Inc. All rights reserved"
88
author = "ANSYS, Inc."
99
release = version = __version__
1010

11-
REPOSITORY_NAME = "pydita-generatedcommands"
11+
REPOSITORY_NAME = "pyconverter-generatedcommands"
1212
USERNAME = "pyansys"
1313
BRANCH = "main"
1414

1515
# Options for HTML output
16-
html_short_title = html_title = "Documentation"
16+
html_short_title = html_title = "PyConverter-GeneratedCommands"
1717
html_theme = "pydata_sphinx_theme"
1818
html_theme_options = {
1919
"show_prev_next": False,

_package/pyproject.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi"
44

55
[project]
66
# Check https://flit.readthedocs.io/en/latest/pyproject_toml.html for all available sections
7-
name = "pydita-generatedcommands"
7+
name = "pyconverter-generatedcommands"
88
version = "0.1.dev0"
99
description = "Documentation."
1010
readme = "README.rst"
@@ -53,12 +53,12 @@ doc = [
5353
]
5454

5555
[tool.flit.module]
56-
name = "pydita.generatedcommands"
56+
name = "pyconverter.generatedcommands"
5757

5858
[project.urls]
59-
Source = "https://github.com/ansys/pydita-ast/"
60-
Tracker = "https://github.com/ansys/pydita-ast/issues"
61-
Homepage = "https://github.com/ansyspydita-ast"
59+
Source = "https://github.com/ansys/pyconverter-xml2py/"
60+
Tracker = "https://github.com/ansys/pyconverter-xml2py/issues"
61+
Homepage = "https://github.com/ansyspyconverter-xml2py"
6262

6363

6464
[tool.black]

doc/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ clean:
2525
pdf:
2626
@$(SPHINXBUILD) -M latex "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
2727
cd $(BUILDDIR)/latex && latexmk -r latexmkrc -pdf *.tex -interaction=nonstopmode || true
28-
(test -f $(BUILDDIR)/latex/pydita-ast-Documentation-*.pdf && echo pdf exists) || exit 1
28+
(test -f $(BUILDDIR)/latex/pyconverter-xml2py-Documentation-*.pdf && echo pdf exists) || exit 1

doc/source/api/ast_class.rst

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1-
AST tree
2-
========
1+
AST (abstract syntax tree)
2+
==========================
33

4-
.. currentmodule:: pydita_ast.ast_tree
4+
.. currentmodule:: pyconverter.xml2py.ast_tree
55

6-
The following classes are used to create the AST tree:
6+
An AST (Abstract Syntax Tree) is an abstract syntactic structure of text.
7+
Each node of the tree denotes a construct occurring in the XML file.
8+
Every element the AST contains can be edited using properties
9+
and functions to obtain the desired rendering.
10+
11+
The following classes are used to create the AST:
712

813
.. autosummary::
914
:toctree: _autosummary/ast_class

doc/source/api/ast_functions.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
AST functions
22
=============
33

4-
.. currentmodule:: pydita_ast.ast_tree
4+
.. currentmodule:: pyconverter.xml2py.ast_tree
55

6-
The following functions are used to create the AST tree:
6+
The following functions are used to create the AST:
77

88
.. autosummary::
99
:toctree: _autosummary/ast_functions

doc/source/api/autogenerateddirectory.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Autogenerated directory
22
=======================
33

4-
.. currentmodule:: pydita_ast.version_variables
4+
.. currentmodule:: pyconverter.xml2py.version_variables
55

66
The following class returns the variables related to the XML documentation.
77

doc/source/api/custom_functions.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Customized functions
22
====================
33

4-
.. currentmodule:: pydita_ast.custom_functions
4+
.. currentmodule:: pyconverter.xml2py.custom_functions
55

66
The following class and functions are used to customize functions.
77

doc/source/api/directory_format.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Directory format
22
================
33

4-
.. currentmodule:: pydita_ast.directory_format
4+
.. currentmodule:: pyconverter.xml2py.directory_format
55

66
The following functions return the paths needed when the XML directory
77
follows the predefined format.

doc/source/api/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
API reference
44
=============
5-
This section provides descriptions of classes, functions, and attributes for the PyDita-AST API.
5+
This section provides descriptions of classes, functions, and attributes for the PyConverter-XML2Py API.
66
Use the search feature or click links to view API documentation.
77

88
.. toctree::

doc/source/api/load_xml_doc.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Load XML documentation
22
======================
33

4-
.. currentmodule:: pydita_ast.load_xml_doc
4+
.. currentmodule:: pyconverter.xml2py.load_xml_doc
55

66
The following functions load the XML documentation.
77

0 commit comments

Comments
 (0)