Skip to content

Commit

Permalink
feat: enabling structured package (#278)
Browse files Browse the repository at this point in the history
Co-authored-by: German <[email protected]>
Co-authored-by: Kathy Pippert <[email protected]>
Co-authored-by: Roberto Pastor Muela <[email protected]>
  • Loading branch information
4 people authored Aug 27, 2024
1 parent 50271fc commit acf329f
Show file tree
Hide file tree
Showing 25 changed files with 1,248 additions and 742 deletions.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[flake8]
exclude = venv, __init__.py, doc/_build, .venv
select = W191, W291, W293, W391, E115, E117, E122, E124, E125, E225, E231, E301, E303, E501, F401, F403
select = W191, W291, W293, W391, E115, E117, E122, E124, E125, E225, E301, E303, E501, F401, F403
count = True
max-complexity = 10
max-line-length = 100
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/autodoc_cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ on:


env:
RESET_PIP_CACHE_2: 0
RESET_AUTOSUMMARY_CACHE_2: 0
RESET_DOC_BUILD_CACHE_2: 0
RESET_PIP_CACHE_2: 1
RESET_AUTOSUMMARY_CACHE_2: 1
RESET_DOC_BUILD_CACHE_2: 1


jobs:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ env:
PACKAGE_NAME: 'pyconverter-xml2py'
PACKAGE_NAMESPACE: 'pyconverter.xml2py'
DOCUMENTATION_CNAME: 'pyconverter-xml2py.docs.pyansys.com'
RESET_PIP_CACHE: 1
RESET_AUTOSUMMARY_CACHE: 1
RESET_DOC_BUILD_CACHE: 1
RESET_PIP_CACHE: 2
RESET_AUTOSUMMARY_CACHE: 2
RESET_DOC_BUILD_CACHE: 2
ON_CI: true

concurrency:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ celerybeat.pid

# Environments
.env
.venv
.venv*
env/
venv/
ENV/
Expand Down
4 changes: 2 additions & 2 deletions _package/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@ doc = [
"numpydoc==1.8.0",
"pandas==2.2.2",
"parse==1.20.2",
"pydata_sphinx_theme==0.15.4",
"pypandoc==1.13",
"pytest-sphinx==0.6.3",
"pydata_sphinx_theme==0.15.4",
"pyyaml==6.0.1",
"sphinx-autobuild==2024.4.16",
"sphinx-autodoc-typehints==2.2.3",
"sphinx-copybutton==0.5.2",
"sphinx-notfound-page==1.0.4",
"sphinx-gallery==0.17.1",
]

[tool.flit.module]
name = "pyconverter.generatedcommands"

Expand Down
16 changes: 16 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
library_name_structured: # Future name of the library
- pyconverter
- generatedcommands

new_package_name: package

rules:
"/": slash
"*": star

specific_command_mapping:
"*DEL": stardel
"C***": c

specific_classes:
2D to 3D Analysis: Analysis 2D to 3D
20 changes: 20 additions & 0 deletions make_package_doc.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#! /bin/sh

function Green
{
process { Write-Host $_ -ForegroundColor Green }
}

deactivate
cd .\package\
python -m venv .venv
.\.venv\Scripts\activate
Write-Output "A new virtual environment has been created within the package folder." | Green
pip install -e .[doc]
Write-Output "The package has successfully been installed in the virtual environment." | Green
Write-Output "The documentation is about to be built." | Green
.\doc\make.bat html
Write-Output "The documentation has been successfully built." | Green
.\doc\_build\html\index.html
deactivate
cd ..
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ dependencies = [
"numpy>=1.14.0; python_version>='3.9'",
"py-asciimath==0.3.0",
"pylatexenc==2.10",
"pyyaml>=5.1.0",
"tqdm>=4.64.1",
"regex>=2021.4.4",
]

[project.optional-dependencies]
Expand All @@ -47,6 +49,8 @@ tests = [
"pytest==8.3.2",
"pytest-cov==5.0.0",
"pytest-rerunfailures==14.0",
"pyyaml==6.0.1",
"regex==2024.5.15",
]
doc = [
"Sphinx==8.0.2",
Expand All @@ -60,6 +64,7 @@ doc = [
"parse==1.20.2",
"pypandoc==1.13",
"pytest-sphinx==0.6.3",
"regex==2024.5.15",
"sphinx-autobuild==2024.4.16",
"sphinx-autodoc-typehints==2.2.2",
"sphinx-copybutton==0.5.2",
Expand Down
Loading

0 comments on commit acf329f

Please sign in to comment.