Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maint: general structure #356

Merged
merged 25 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
b4ed5e5
feat: update general structure
clatapie Oct 21, 2024
1fcde94
feat: add pre-commit check in cli option
clatapie Oct 21, 2024
41281ce
fix: kwarg spaces
clatapie Oct 21, 2024
2e28187
fix: taking into account ``custom_functions`` in ``py_signature``
clatapie Oct 24, 2024
7b6b21d
Merge branch 'main' into maint/general_structure
clatapie Oct 24, 2024
a847f4a
Merge branch 'main' into maint/general_structure
clatapie Oct 24, 2024
50adb88
fix: improve ``CustomFunctions``
clatapie Oct 25, 2024
9820b64
Merge branch 'main' into maint/general_structure
clatapie Oct 25, 2024
b8b2396
fix: ``custom_functions`` calls
clatapie Oct 25, 2024
ed03b51
fix: ``get_docstring_lists``
clatapie Oct 25, 2024
c6e38a2
Merge branch 'main' into maint/general_structure
clatapie Oct 25, 2024
c540a5e
Merge branch 'main' into maint/general_structure
clatapie Nov 19, 2024
cf80dd2
fix: error with custom_function args
clatapie Nov 21, 2024
010bae1
Merge branch 'maint/general_structure' of https://github.com/ansys/py…
clatapie Nov 21, 2024
5672f61
fix: flake8 config
clatapie Nov 21, 2024
75dced8
Merge branch 'main' into maint/general_structure
clatapie Nov 21, 2024
2ae888c
fix: error with custom_function args - 2
clatapie Nov 21, 2024
7178a25
Merge branch 'maint/general_structure' of https://github.com/ansys/py…
clatapie Nov 21, 2024
e5ee2f6
Merge branch 'main' into maint/general_structure
clatapie Nov 21, 2024
15fb796
feat: ``ignored_commands`` in ``config.yaml``
clatapie Nov 25, 2024
b98b152
fix: pre-commit
clatapie Nov 25, 2024
900b836
feat: accepting subfolders
clatapie Nov 25, 2024
8647afd
test: fix tests
clatapie Dec 3, 2024
21e9fbe
Merge branch 'main' into maint/general_structure
clatapie Dec 4, 2024
a5b3ffa
Merge branch 'main' into maint/general_structure
clatapie Dec 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[flake8]
exclude = venv, __init__.py, doc/_build, .venv
exclude = venv, __init__.py, doc/_build, .venv, tests/customized_functions/*
select = W191, W291, W293, W391, E115, E117, E122, E124, E125, E225, E301, E303, E501, F401, F403
count = True
max-complexity = 10
Expand Down
76 changes: 76 additions & 0 deletions _package/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
fail_fast: True

ci:
# Commit name when auto fixing PRs.
autofix_commit_msg: |
ci: auto fixes from pre-commit.com hooks.

for more information, see https://pre-commit.ci

# PR name when autoupdate
autoupdate_commit_msg: 'ci: pre-commit autoupdate'


repos:

- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort

- repo: https://github.com/numpy/numpydoc
rev: v1.8.0
hooks:
- id: numpydoc-validation
exclude: |
(?x)(
tests/|
examples|
doc/source/|
src/ansys/mapdl/core/_commands|
src/ansys/mapdl/core/commands
)

- repo: https://github.com/psf/black
rev: 24.10.0 # If version changes --> modify "blacken-docs" manually as well.
hooks:
- id: black
args:
- --line-length=88

- repo: https://github.com/adamchainz/blacken-docs
rev: 1.19.0
hooks:
- id: blacken-docs
additional_dependencies: [black==24.10.0]

- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
hooks:
- id: flake8

- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args: ["--toml", "pyproject.toml"]
additional_dependencies: ["tomli"]

# - repo: https://github.com/pycqa/pydocstyle
# rev: 6.1.1
# hooks:
# - id: pydocstyle
# additional_dependencies: [toml]
# exclude: "tests/"

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-merge-conflict
- id: debug-statements

# this validates our github workflow files
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.29.4
hooks:
- id: check-github-workflows
25 changes: 24 additions & 1 deletion config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ library_name_structured: # Future name of the library
- pyconverter
- generatedcommands

subfolder:
- subfolder
- subsubfolder

new_package_name: package

rules:
Expand All @@ -11,6 +15,25 @@ rules:
specific_command_mapping:
"*DEL": stardel
"C***": c
"/INQUIRE": inquire

ignored_commands:
- "*VWR"
- "*MWR"
- "C***"
- "*CFO"
- "*CRE"
- "*END"
- "/EOF"
- "*ASK"
- "*IF"
- "*ELSE"
- "CMAT"
- "*REP"
- "*RETURN"
- "LSRE"


specific_classes:
2D to 3D Analysis: Analysis 2D to 3D
2D to 3D Analysis: Analysis 2D to 3D
Parameters: Parameter definition
16 changes: 8 additions & 8 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
copyright = f"(c) {datetime.now().year} ANSYS, Inc. All rights reserved"
author = "ANSYS, Inc."
release = version = __version__
cname = os.getenv("DOCUMENTATION_CNAME", "<DEFAULT_CNAME>")
cname = os.getenv("DOCUMENTATION_CNAME", "pyconverter-xml2py.docs.pyansys.com")
switcher_version = get_version_match(__version__)

REPOSITORY_NAME = "pyconverter-xml2py"
Expand Down Expand Up @@ -38,7 +38,7 @@
"icon_links": [
{
"name": "Support",
"url": "https://github.com/ansys/pyconverter-xml2py/discussions",
"url": f"https://github.com/{USERNAME}/{REPOSITORY_NAME}/discussions",
"icon": "fa fa-comment fa-fw",
},
],
Expand All @@ -54,9 +54,9 @@

html_context = {
"display_github": True, # Integrate GitHub
"github_user": "ansys",
"github_user": USERNAME,
"github_repo": REPOSITORY_NAME,
"github_version": "main",
"github_version": BRANCH,
"doc_path": "doc/source",
}

Expand All @@ -65,13 +65,13 @@
"ansys_sphinx_theme.extension.autoapi",
"jupyter_sphinx",
"numpydoc",
"sphinx.ext.autodoc",
"sphinx_autodoc_typehints",
"sphinx.ext.intersphinx",
"sphinx.ext.extlinks",
"sphinx.ext.graphviz",
"sphinx_copybutton",
"sphinx_design",
"sphinx.ext.autodoc",
"sphinx.ext.extlinks",
"sphinx.ext.graphviz",
"sphinx.ext.intersphinx",
]

# Intersphinx mapping
Expand Down
Loading
Loading