Skip to content

Commit acf329f

Browse files
clatapiegerma89PipKatRobPasMue
authored
feat: enabling structured package (#278)
Co-authored-by: German <28149841+germa89@users.noreply.github.com> Co-authored-by: Kathy Pippert <84872299+PipKat@users.noreply.github.com> Co-authored-by: Roberto Pastor Muela <37798125+RobPasMue@users.noreply.github.com>
1 parent 50271fc commit acf329f

25 files changed

+1248
-742
lines changed

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[flake8]
22
exclude = venv, __init__.py, doc/_build, .venv
3-
select = W191, W291, W293, W391, E115, E117, E122, E124, E125, E225, E231, E301, E303, E501, F401, F403
3+
select = W191, W291, W293, W391, E115, E117, E122, E124, E125, E225, E301, E303, E501, F401, F403
44
count = True
55
max-complexity = 10
66
max-line-length = 100

.github/workflows/autodoc_cicd.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ on:
1313

1414

1515
env:
16-
RESET_PIP_CACHE_2: 0
17-
RESET_AUTOSUMMARY_CACHE_2: 0
18-
RESET_DOC_BUILD_CACHE_2: 0
16+
RESET_PIP_CACHE_2: 1
17+
RESET_AUTOSUMMARY_CACHE_2: 1
18+
RESET_DOC_BUILD_CACHE_2: 1
1919

2020

2121
jobs:

.github/workflows/ci_cd.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ env:
1818
PACKAGE_NAME: 'pyconverter-xml2py'
1919
PACKAGE_NAMESPACE: 'pyconverter.xml2py'
2020
DOCUMENTATION_CNAME: 'pyconverter-xml2py.docs.pyansys.com'
21-
RESET_PIP_CACHE: 1
22-
RESET_AUTOSUMMARY_CACHE: 1
23-
RESET_DOC_BUILD_CACHE: 1
21+
RESET_PIP_CACHE: 2
22+
RESET_AUTOSUMMARY_CACHE: 2
23+
RESET_DOC_BUILD_CACHE: 2
2424
ON_CI: true
2525

2626
concurrency:

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ celerybeat.pid
118118

119119
# Environments
120120
.env
121-
.venv
121+
.venv*
122122
env/
123123
venv/
124124
ENV/

_package/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,16 @@ doc = [
4242
"numpydoc==1.8.0",
4343
"pandas==2.2.2",
4444
"parse==1.20.2",
45+
"pydata_sphinx_theme==0.15.4",
4546
"pypandoc==1.13",
4647
"pytest-sphinx==0.6.3",
47-
"pydata_sphinx_theme==0.15.4",
48+
"pyyaml==6.0.1",
4849
"sphinx-autobuild==2024.4.16",
4950
"sphinx-autodoc-typehints==2.2.3",
5051
"sphinx-copybutton==0.5.2",
5152
"sphinx-notfound-page==1.0.4",
5253
"sphinx-gallery==0.17.1",
5354
]
54-
5555
[tool.flit.module]
5656
name = "pyconverter.generatedcommands"
5757

config.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
library_name_structured: # Future name of the library
2+
- pyconverter
3+
- generatedcommands
4+
5+
new_package_name: package
6+
7+
rules:
8+
"/": slash
9+
"*": star
10+
11+
specific_command_mapping:
12+
"*DEL": stardel
13+
"C***": c
14+
15+
specific_classes:
16+
2D to 3D Analysis: Analysis 2D to 3D

make_package_doc.ps1

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#! /bin/sh
2+
3+
function Green
4+
{
5+
process { Write-Host $_ -ForegroundColor Green }
6+
}
7+
8+
deactivate
9+
cd .\package\
10+
python -m venv .venv
11+
.\.venv\Scripts\activate
12+
Write-Output "A new virtual environment has been created within the package folder." | Green
13+
pip install -e .[doc]
14+
Write-Output "The package has successfully been installed in the virtual environment." | Green
15+
Write-Output "The documentation is about to be built." | Green
16+
.\doc\make.bat html
17+
Write-Output "The documentation has been successfully built." | Green
18+
.\doc\_build\html\index.html
19+
deactivate
20+
cd ..

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ dependencies = [
3434
"numpy>=1.14.0; python_version>='3.9'",
3535
"py-asciimath==0.3.0",
3636
"pylatexenc==2.10",
37+
"pyyaml>=5.1.0",
3738
"tqdm>=4.64.1",
39+
"regex>=2021.4.4",
3840
]
3941

4042
[project.optional-dependencies]
@@ -47,6 +49,8 @@ tests = [
4749
"pytest==8.3.2",
4850
"pytest-cov==5.0.0",
4951
"pytest-rerunfailures==14.0",
52+
"pyyaml==6.0.1",
53+
"regex==2024.5.15",
5054
]
5155
doc = [
5256
"Sphinx==8.0.2",
@@ -60,6 +64,7 @@ doc = [
6064
"parse==1.20.2",
6165
"pypandoc==1.13",
6266
"pytest-sphinx==0.6.3",
67+
"regex==2024.5.15",
6368
"sphinx-autobuild==2024.4.16",
6469
"sphinx-autodoc-typehints==2.2.2",
6570
"sphinx-copybutton==0.5.2",

0 commit comments

Comments
 (0)