diff --git a/.flake8 b/.flake8 index 76ade4848..7ac625bbe 100644 --- a/.flake8 +++ b/.flake8 @@ -3,5 +3,5 @@ exclude = venv, __init__.py, doc/build select = W191, W291, W293, W391, E115, E117, E122, E124, E125, E225, E231, E301, E303, E501, F401, F403 count = True max-complexity = 10 -max-line-length = 100 -statistics = True \ No newline at end of file +max-line-length = 120 +statistics = True diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 000000000..971215877 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,4 @@ +# These owners will be the default owners for everything in the repo. Unless a +# later match takes precedence, the PyDyna team will be requested for review when +# someone opens a pull request. +* @ansys/pydyna diff --git a/.github/labeler.yml b/.github/labeler.yml index c89d5ab6c..a616e8f60 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -4,10 +4,9 @@ documentation: maintenance: - .github/**/* - .flake8 -- setup.py +- pyproject.toml dependencies: -- requirements/**/* -- requirements_docs.txt -- requirements_test.txt +- pyproject.toml testing: -- _unittest/conftest.py \ No newline at end of file +- _unittest/conftest.py +- tests/* \ No newline at end of file diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index fbf7d11c1..0b19492ff 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -126,7 +126,7 @@ jobs: fail-fast: false matrix: os: [windows-latest, ubuntu-latest] - python-version: ['3.7', '3.8', '3.9', '3.10'] + python-version: ['3.8', '3.9', '3.10', '3.11'] steps: - uses: ansys/actions/build-wheelhouse@v4 with: diff --git a/.gitignore b/.gitignore index fe874a728..b6429eebc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,67 +1,123 @@ -# This is an example .gitignore and may need to be adapted per -# project. - -# Compiled source # -################### -*.pyc -*.pyd -*.c -*.cpp -*.so -*.o -*.cache -.pytest_cache/ +# Created by https://www.toptal.com/developers/gitignore/api/python +# Edit at https://www.toptal.com/developers/gitignore?templates=python -# OS generated files # -###################### -.fuse_hidden* -*~ -*swp +### Python ### +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class -# emacs -flycheck* - -# Old files # -_old/ +# C extensions +*.so -# Pip generated folders # -######################### -*.egg-info/ +# Distribution / packaging +.Python build/ +develop-eggs/ dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST -# autogenerated docs -_autosummary +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec +# Installer logs +pip-log.txt +pip-delete-this-directory.txt -# Testing +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ .cov .coverage -*,cover -test-output.xml - -\#* -.\#* -/.ipynb_checkpoints - -/ansys/dyna/pre/Server/input/ -/ansys/dyna/pre/Server/output/ -/client.log -/examples/pre/client.log -/ansys/dyna/pre/Server/output/ -/ansys/dyna/pre/doc/build -/doc/_build -/doc/source/examples -/examples/Airbag/client.log -/examples/EM/client.log -/examples/Explicit/client.log -/examples/ICFD/client.log -/examples/IGA/client.log -/examples/Implicit/client.log -/examples/SALE/client.log - -# Environment -.env +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +doc/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env/ .venv env/ venv/ @@ -69,8 +125,42 @@ ENV/ env.bak/ venv.bak/ -# VSCode -.vscode/ -client.log -/src/ansys/dyna/core/pre/Server/input -/src/ansys/dyna/core/pre/Server/output +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# PyCharm +# JetBrains specific template is maintainted in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +.idea/ + +# Visual Studio +.vs/ + +# End of https://www.toptal.com/developers/gitignore/api/python + +# Ignore rendered examples +doc/source/examples/ +doc/source/API/_autosummary/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 52dfb6483..0c543d9d6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,37 +15,31 @@ exclude: | repos: - repo: https://github.com/psf/black - rev: 23.1.0 # IF VERSION CHANGES --> MODIFY "blacken-docs" MANUALLY AS WELL!! + rev: 23.3.0 # IF VERSION CHANGES --> MODIFY "blacken-docs" MANUALLY AS WELL!! hooks: - id: black - args: - - --line-length=120 - repo: https://github.com/adamchainz/blacken-docs - rev: 1.13.0 + rev: 1.14.0 hooks: - id: blacken-docs - additional_dependencies: [black==23.1.0] + additional_dependencies: [black==23.3.0] -- repo: https://github.com/codespell-project/codespell - rev: v2.2.2 +- repo: https://github.com/pycqa/isort + rev: 5.12.0 hooks: - - id: codespell - args: ["--ignore-words=ignore_words.txt"] + - id: isort - repo: https://github.com/PyCQA/flake8 rev: 6.0.0 hooks: - id: flake8 - args: - - --max-line-length=120 -- repo: https://github.com/pycqa/isort - rev: 5.12.0 +- repo: https://github.com/codespell-project/codespell + rev: v2.2.5 hooks: - - id: isort - args: - - --line-length=120 + - id: codespell + args: ["--ignore-words", "doc/styles/Vocab/ANSYS/accept.txt"] - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.4.0 @@ -55,6 +49,6 @@ repos: # this validates our github workflow files - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.21.0 + rev: 0.23.2 hooks: - - id: check-github-workflows \ No newline at end of file + - id: check-github-workflows diff --git a/AUTHORS.md b/AUTHORS.md new file mode 100644 index 000000000..0e3910a3f --- /dev/null +++ b/AUTHORS.md @@ -0,0 +1,7 @@ +# Authors + +## Contributors + +* [Zhanqun Zhang](https://github.com/zhangzhanqun) +* [Wenhui Yu](https://github.com/wenhuiuy) +* [Srikanth Adya](https://github.com/kanthadya) diff --git a/LICENSE b/LICENSE index a9d9a2ef7..07381af77 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2021 ANSYS, Inc. All rights reserved. +Copyright (c) 2023 ANSYS, Inc. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/doc/create_documentation.bat b/doc/create_documentation.bat deleted file mode 100644 index 34786add5..000000000 --- a/doc/create_documentation.bat +++ /dev/null @@ -1,3 +0,0 @@ -sphinx-build -b html source build -./make html -pause \ No newline at end of file diff --git a/doc/source/API/index.rst b/doc/source/API/index.rst deleted file mode 100644 index 4a5f5c4cc..000000000 --- a/doc/source/API/index.rst +++ /dev/null @@ -1,15 +0,0 @@ -============= -API reference -============= - -This section describes PyDyna core classes, methods, and functions -for LS-Dyna apps and modules. Use the search feature or click links -to view API documentation. - -.. toctree:: - :maxdepth: 5 - - pre - solver - - \ No newline at end of file diff --git a/doc/source/API/pre.rst b/doc/source/API/pre.rst deleted file mode 100644 index 3bbeb848c..000000000 --- a/doc/source/API/pre.rst +++ /dev/null @@ -1,25 +0,0 @@ -PyDyna-pre APIs -=============== - -The PyDyna-pre API includes classes for apps and modules. - -.. currentmodule:: ansys.dyna.core - -.. autosummary:: - :template: custom-module-template.rst - :toctree: _autosummary - - pre.dynabase - pre.dynasolution - pre.dynamech - pre.dynaem - pre.dynaicfd - pre.dynaiga - pre.dynaisph - pre.dynamaterial - pre.dynanvh - pre.dynasale - pre.dynadem - - - \ No newline at end of file diff --git a/doc/source/API/solver.rst b/doc/source/API/solver.rst deleted file mode 100644 index aea8147b4..000000000 --- a/doc/source/API/solver.rst +++ /dev/null @@ -1,11 +0,0 @@ -PyDyna-solver APIs -=================== -The PyDyna-solver API includes classes for apps and modules. - -.. currentmodule:: ansys.dyna.core - -.. autosummary:: - :template: custom-module-template.rst - :toctree: _autosummary - - solver.dynasolver diff --git a/doc/source/Resources/Contributing.rst b/doc/source/Resources/Contributing.rst index 9fc662378..a39e45d67 100644 --- a/doc/source/Resources/Contributing.rst +++ b/doc/source/Resources/Contributing.rst @@ -1,8 +1,76 @@ Contributing -------------- +============ Overall guidance on contributing to a PyAnsys repository appears in the `Contributing `_ topic in the *PyAnsys Developer's Guide*. Ensure that you are thoroughly familiar with it and all `Guidelines and Best Practices `_ -before attempting to contribute to PyDyna. \ No newline at end of file +before attempting to contribute to PyDyna. + +The following contribution information is specific to PyDyna. + +Clone the repository +-------------------- + +To clone and install the latest PyDyna release in development mode, run: + +.. code:: + + git clone https://github.com/pyansys/pydyna + cd pydyna + python -m pip install --upgrade pip + pip install -e . + + +Post issues +----------- + +Use the `PyDyna Issues `_ +page to submit questions, report bugs, and request new features. When possible, you +should use these issue templates: + +* Bug report template +* Feature request template + +If your issue does not fit into these categories, create your own issue. + +To reach the PyAnsys team, email `pyansys.core@ansys.com `_. + +View documentation +------------------ + +Documentation for the latest stable release of PyDyna is hosted at +`PyDyna Documentation `_. + +Documentation for the latest development version, which tracks the +``main`` branch, is hosted at `Development PyDyna Documentation `_. +This version is automatically kept up to date via GitHub actions. + +Code style +---------- + +PyDyna follows the PEP8 standard as outlined in the `PyAnsys Development Guide +`_ and implements style checking using +`pre-commit `_. + +To ensure your code meets minimum code styling standards, run:: + + pip install pre-commit + pre-commit run --all-files + +You can also install this as a pre-commit hook by running:: + + pre-commit install + +This way, it is not possible for you to push code that fails the style checks. For example:: + + $ pre-commit install + $ git commit -am "added my cool feature" + black....................................................................Passed + blacken-docs.............................................................Passed + codespell................................................................Passed + flake8...................................................................Passed + isort....................................................................Passed + check for merge conflicts................................................Passed + debug statements (python)................................................Passed + Validate GitHub Workflows................................................Passed \ No newline at end of file diff --git a/doc/source/Resources/Getting_Started.rst b/doc/source/Resources/Getting_Started.rst index 03ea27823..edec34423 100644 --- a/doc/source/Resources/Getting_Started.rst +++ b/doc/source/Resources/Getting_Started.rst @@ -5,7 +5,7 @@ Installation ~~~~~~~~~~~~ This package is not yet available on the public PyPI, but you can still install -it using ``pip`` from our private PyPI repository. +it using ``pip`` from the private PyPI repository. The following on Windows: @@ -24,7 +24,7 @@ And if you are running Linux: python -m pip install ansys-dyna-core --index-url $INDEX_URL Email your friendly PyAnsys team member for the ``PYANSYS_PYPI_PRIVATE_PAT`` -at `pyansys.core@ansys.com `_ or send us a message via Teams. +at `pyansys.core@ansys.com `_ or send a message via Teams. **Installing from git** diff --git a/doc/source/_autoapi_templates/index.rst b/doc/source/_autoapi_templates/index.rst new file mode 100644 index 000000000..b9fa1cc76 --- /dev/null +++ b/doc/source/_autoapi_templates/index.rst @@ -0,0 +1,14 @@ +API reference +============= + +This page contains the ``ansys-dyna-core`` API reference. + +.. toctree:: + :titlesonly: + :maxdepth: 2 + + {% for page in pages %} + {% if (page.top_level_object or page.name.split('.') | length == 3) and page.display %} + {{ page.include_path }} + {% endif %} + {% endfor %} diff --git a/doc/source/_templates/autosummary/base.rst b/doc/source/_templates/autosummary/base.rst deleted file mode 100644 index 5536fa108..000000000 --- a/doc/source/_templates/autosummary/base.rst +++ /dev/null @@ -1,5 +0,0 @@ -{{ name | escape | underline}} - -.. currentmodule:: {{ module }} - -.. auto{{ objtype }}:: {{ objname }} diff --git a/doc/source/_templates/autosummary/class.rst b/doc/source/_templates/autosummary/class.rst deleted file mode 100644 index 1fbe69615..000000000 --- a/doc/source/_templates/autosummary/class.rst +++ /dev/null @@ -1,38 +0,0 @@ -.. vale off - -{{ fullname | escape | underline}} - -.. currentmodule:: {{ module }} - -.. autoclass:: {{ objname }} - - {% block methods %} - - {% if methods %} - .. rubric:: {{ _('Methods') }} - - .. autosummary:: - :toctree: - {% for item in methods %} - {% if item != "__init__" %} - {{ name }}.{{ item }} - {% endif %} - {%- endfor %} - {% endif %} - {% endblock %} - - {% block attributes %} - {% if attributes %} - .. rubric:: {{ _('Attributes') }} - - .. autosummary:: - :toctree: - {% for item in attributes %} - {% if item.0 != item.upper().0 %} - {{ name }}.{{ item }} - {% endif %} - {%- endfor %} - {% endif %} - {% endblock %} - -.. vale on \ No newline at end of file diff --git a/doc/source/_templates/custom-class-template.rst b/doc/source/_templates/custom-class-template.rst deleted file mode 100644 index 1fbe69615..000000000 --- a/doc/source/_templates/custom-class-template.rst +++ /dev/null @@ -1,38 +0,0 @@ -.. vale off - -{{ fullname | escape | underline}} - -.. currentmodule:: {{ module }} - -.. autoclass:: {{ objname }} - - {% block methods %} - - {% if methods %} - .. rubric:: {{ _('Methods') }} - - .. autosummary:: - :toctree: - {% for item in methods %} - {% if item != "__init__" %} - {{ name }}.{{ item }} - {% endif %} - {%- endfor %} - {% endif %} - {% endblock %} - - {% block attributes %} - {% if attributes %} - .. rubric:: {{ _('Attributes') }} - - .. autosummary:: - :toctree: - {% for item in attributes %} - {% if item.0 != item.upper().0 %} - {{ name }}.{{ item }} - {% endif %} - {%- endfor %} - {% endif %} - {% endblock %} - -.. vale on \ No newline at end of file diff --git a/doc/source/_templates/custom-module-template.rst b/doc/source/_templates/custom-module-template.rst deleted file mode 100644 index 009898a32..000000000 --- a/doc/source/_templates/custom-module-template.rst +++ /dev/null @@ -1,70 +0,0 @@ -.. vale off - -{{ fullname | escape | underline}} - -.. automodule:: {{ fullname }} - - {% block attributes %} - {% if attributes %} - .. rubric:: Module Attributes - - .. autosummary:: - :toctree: - {% for item in attributes %} - {{ item }} - {%- endfor %} - {% endif %} - {% endblock %} - - {% block functions %} - {% if functions %} - .. rubric:: {{ _('Functions') }} - - .. autosummary:: - :toctree: - {% for item in functions %} - {{ item }} - {%- endfor %} - {% endif %} - {% endblock %} - - {% block classes %} - {% if classes %} - .. rubric:: {{ _('Classes') }} - - .. autosummary:: - :toctree: - :template: custom-class-template.rst - {% for item in classes %} - {{ item }} - {%- endfor %} - {% endif %} - {% endblock %} - - {% block exceptions %} - {% if exceptions %} - .. rubric:: {{ _('Exceptions') }} - - .. autosummary:: - :toctree: - {% for item in exceptions %} - {{ item }} - {%- endfor %} - {% endif %} - {% endblock %} - -{% block modules %} -{% if modules %} -.. rubric:: Modules - -.. autosummary:: - :toctree: - :template: custom-module-template.rst - :recursive: -{% for item in modules %} - {{ item }} -{%- endfor %} -{% endif %} -{% endblock %} - -.. vale on \ No newline at end of file diff --git a/doc/source/conf.py b/doc/source/conf.py index 6d257c6d5..25c2ff31c 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -25,10 +25,10 @@ 'sphinx.ext.intersphinx', 'sphinx.ext.autodoc', 'sphinx.ext.viewcode', - 'sphinx_gallery.gen_gallery', 'numpydoc', 'sphinx.ext.autosummary', 'sphinx.ext.inheritance_diagram', + "sphinx_jinja", ] # Intersphinx mapping @@ -41,33 +41,6 @@ "pytest": ("https://docs.pytest.org/en/stable", None), } -sphinx_gallery_conf = { - # convert rst to md for ipynb - "pypandoc": True, - # path to your examples scripts - "examples_dirs": ["../../examples/"], - # path where to save gallery generated examples - "gallery_dirs": ["examples"], - # Patter to search for examples files - "filename_pattern": r"\.py", - # Patter to omit some files - "ignore_pattern": r"/*_data.py", - # Remove the "Download all examples" button from the top level gallery - "download_all_examples": False, - # Sort gallery examples by file name instead of number of lines (default) - "within_subsection_order": FileNameSortKey, - # directory where function granular galleries are stored - "backreferences_dir": None, - # Modules for which function level galleries are created. In - "doc_module": "ansys-dyna-core", - "image_scrapers": ("pyvista", "matplotlib"), - "thumbnail_size": (600, 300), - # 'first_notebook_cell': ("%matplotlib inline\n" - # "from pyvista import set_plot_theme\n" - # "set_plot_theme('document')"), - 'remove_config_comments': True, - } - # Numpydoc config numpydoc_use_plots = True numpydoc_show_class_members = False # we take care of autosummary on our own @@ -150,5 +123,66 @@ # static path html_static_path = ['_static'] -# necessary for pyvista when building the sphinx gallery -pyvista.BUILDING_GALLERY = True + +# -- Declare the Jinja context ----------------------------------------------- +BUILD_API = True if os.environ.get("BUILD_API", "true") == "true" else False +if not BUILD_API: + exclude_patterns.append("_autoapi_templates") +else: + # Configuration for Sphinx autoapi + extensions.append("autoapi.extension") + autoapi_dirs = ["../../src/ansys"] + autoapi_type = "python" + autoapi_dirs = ["../../src/ansys"] + autoapi_options = [ + "members", + "undoc-members", + "show-inheritance", + "show-module-summary", + "special-members", + ] + autoapi_template_dir = "_autoapi_templates" + suppress_warnings = ["autoapi.python_import_resolution"] + exclude_patterns.append("_autoapi_templates/index.rst") + autoapi_python_use_implicit_namespaces = True + +BUILD_EXAMPLES = ( + True if os.environ.get("BUILD_EXAMPLES", "true") == "true" else False +) +if BUILD_EXAMPLES is True: + # Necessary for pyvista when building the sphinx gallery + extensions.append("sphinx_gallery.gen_gallery") + pyvista.BUILDING_GALLERY = True + sphinx_gallery_conf = { + # convert rst to md for ipynb + "pypandoc": True, + # path to your examples scripts + "examples_dirs": ["../../examples/"], + # path where to save gallery generated examples + "gallery_dirs": ["examples"], + # Patter to search for examples files + "filename_pattern": r"\.py", + # Patter to omit some files + "ignore_pattern": r"/*_data.py", + # Remove the "Download all examples" button from the top level gallery + "download_all_examples": False, + # Sort gallery examples by file name instead of number of lines (default) + "within_subsection_order": FileNameSortKey, + # directory where function granular galleries are stored + "backreferences_dir": None, + # Modules for which function level galleries are created. In + "doc_module": "ansys-dyna-core", + "image_scrapers": ("pyvista", "matplotlib"), + "thumbnail_size": (600, 300), + # 'first_notebook_cell': ("%matplotlib inline\n" + # "from pyvista import set_plot_theme\n" + # "set_plot_theme('document')"), + 'remove_config_comments': True, + } + +jinja_contexts = { + "main_toctree": { + "build_api": BUILD_API, + "build_examples": BUILD_EXAMPLES, + }, +} diff --git a/doc/source/index.rst b/doc/source/index.rst index b55d5d7e3..456dfb0bd 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -3,11 +3,18 @@ PyDyna documentation |version| .. include:: ../../README.rst -.. toctree:: - :hidden: - - Resources/Getting_Started - Resources/User_Guide - API/index - Resources/Contributing - examples/index + +.. jinja:: main_toctree + + .. toctree:: + :hidden: + + Resources/Getting_Started + Resources/User_Guide + {% if build_api %} + autoapi/index + {% endif %} + Resources/Contributing + {% if build_examples %} + examples/index + {% endif %} diff --git a/doc/styles/Google/AMPM.yml b/doc/styles/Google/AMPM.yml deleted file mode 100644 index fbdc6e4f8..000000000 --- a/doc/styles/Google/AMPM.yml +++ /dev/null @@ -1,9 +0,0 @@ -extends: existence -message: "Use 'AM' or 'PM' (preceded by a space)." -link: 'https://developers.google.com/style/word-list' -level: error -nonword: true -tokens: - - '\d{1,2}[AP]M' - - '\d{1,2} ?[ap]m' - - '\d{1,2} ?[aApP]\.[mM]\.' diff --git a/doc/styles/Google/Acronyms.yml b/doc/styles/Google/Acronyms.yml deleted file mode 100644 index f41af0189..000000000 --- a/doc/styles/Google/Acronyms.yml +++ /dev/null @@ -1,64 +0,0 @@ -extends: conditional -message: "Spell out '%s', if it's unfamiliar to the audience." -link: 'https://developers.google.com/style/abbreviations' -level: suggestion -ignorecase: false -# Ensures that the existence of 'first' implies the existence of 'second'. -first: '\b([A-Z]{3,5})\b' -second: '(?:\b[A-Z][a-z]+ )+\(([A-Z]{3,5})\)' -# ... with the exception of these: -exceptions: - - API - - ASP - - CLI - - CPU - - CSS - - CSV - - DEBUG - - DOM - - DPI - - FAQ - - GCC - - GDB - - GET - - GPU - - GTK - - GUI - - HTML - - HTTP - - HTTPS - - IDE - - JAR - - JSON - - JSX - - LESS - - LLDB - - NET - - NOTE - - NVDA - - OSS - - PATH - - PDF - - PHP - - POST - - RAM - - REPL - - RSA - - SCM - - SCSS - - SDK - - SQL - - SSH - - SSL - - SVG - - TBD - - TCP - - TODO - - URI - - URL - - USB - - UTF - - XML - - XSS - - YAML - - ZIP diff --git a/doc/styles/Google/Colons.yml b/doc/styles/Google/Colons.yml deleted file mode 100644 index 99363fbd4..000000000 --- a/doc/styles/Google/Colons.yml +++ /dev/null @@ -1,8 +0,0 @@ -extends: existence -message: "'%s' should be in lowercase." -link: 'https://developers.google.com/style/colons' -nonword: true -level: warning -scope: sentence -tokens: - - ':\s[A-Z]' diff --git a/doc/styles/Google/Contractions.yml b/doc/styles/Google/Contractions.yml deleted file mode 100644 index 95234987b..000000000 --- a/doc/styles/Google/Contractions.yml +++ /dev/null @@ -1,30 +0,0 @@ -extends: substitution -message: "Feel free to use '%s' instead of '%s'." -link: 'https://developers.google.com/style/contractions' -level: suggestion -ignorecase: true -action: - name: replace -swap: - are not: aren't - cannot: can't - could not: couldn't - did not: didn't - do not: don't - does not: doesn't - has not: hasn't - have not: haven't - how is: how's - is not: isn't - it is: it's - should not: shouldn't - that is: that's - they are: they're - was not: wasn't - we are: we're - we have: we've - were not: weren't - what is: what's - when is: when's - where is: where's - will not: won't diff --git a/doc/styles/Google/DateFormat.yml b/doc/styles/Google/DateFormat.yml deleted file mode 100644 index e9d227fa1..000000000 --- a/doc/styles/Google/DateFormat.yml +++ /dev/null @@ -1,9 +0,0 @@ -extends: existence -message: "Use 'July 31, 2016' format, not '%s'." -link: 'https://developers.google.com/style/dates-times' -ignorecase: true -level: error -nonword: true -tokens: - - '\d{1,2}(?:\.|/)\d{1,2}(?:\.|/)\d{4}' - - '\d{1,2} (?:Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)|May|Jun(?:e)|Jul(?:y)|Aug(?:ust)|Sep(?:tember)?|Oct(?:ober)|Nov(?:ember)?|Dec(?:ember)?) \d{4}' diff --git a/doc/styles/Google/Ellipses.yml b/doc/styles/Google/Ellipses.yml deleted file mode 100644 index 1e070517b..000000000 --- a/doc/styles/Google/Ellipses.yml +++ /dev/null @@ -1,9 +0,0 @@ -extends: existence -message: "In general, don't use an ellipsis." -link: 'https://developers.google.com/style/ellipses' -nonword: true -level: warning -action: - name: remove -tokens: - - '\.\.\.' diff --git a/doc/styles/Google/EmDash.yml b/doc/styles/Google/EmDash.yml deleted file mode 100644 index 1befe72aa..000000000 --- a/doc/styles/Google/EmDash.yml +++ /dev/null @@ -1,12 +0,0 @@ -extends: existence -message: "Don't put a space before or after a dash." -link: 'https://developers.google.com/style/dashes' -nonword: true -level: error -action: - name: edit - params: - - remove - - ' ' -tokens: - - '\s[—–]\s' diff --git a/doc/styles/Google/EnDash.yml b/doc/styles/Google/EnDash.yml deleted file mode 100644 index b314dc4e9..000000000 --- a/doc/styles/Google/EnDash.yml +++ /dev/null @@ -1,13 +0,0 @@ -extends: existence -message: "Use an em dash ('—') instead of '–'." -link: 'https://developers.google.com/style/dashes' -nonword: true -level: error -action: - name: edit - params: - - replace - - '-' - - '—' -tokens: - - '–' diff --git a/doc/styles/Google/Exclamation.yml b/doc/styles/Google/Exclamation.yml deleted file mode 100644 index 3e15181b2..000000000 --- a/doc/styles/Google/Exclamation.yml +++ /dev/null @@ -1,7 +0,0 @@ -extends: existence -message: "Don't use exclamation points in text." -link: 'https://developers.google.com/style/exclamation-points' -nonword: true -level: error -tokens: - - '\w!(?:\s|$)' diff --git a/doc/styles/Google/FirstPerson.yml b/doc/styles/Google/FirstPerson.yml deleted file mode 100644 index 0b7b8828c..000000000 --- a/doc/styles/Google/FirstPerson.yml +++ /dev/null @@ -1,13 +0,0 @@ -extends: existence -message: "Avoid first-person pronouns such as '%s'." -link: 'https://developers.google.com/style/pronouns#personal-pronouns' -ignorecase: true -level: warning -nonword: true -tokens: - - (?:^|\s)I\s - - (?:^|\s)I,\s - - \bI'm\b - - \bme\b - - \bmy\b - - \bmine\b diff --git a/doc/styles/Google/Gender.yml b/doc/styles/Google/Gender.yml deleted file mode 100644 index c8486181d..000000000 --- a/doc/styles/Google/Gender.yml +++ /dev/null @@ -1,9 +0,0 @@ -extends: existence -message: "Don't use '%s' as a gender-neutral pronoun." -link: 'https://developers.google.com/style/pronouns#gender-neutral-pronouns' -level: error -ignorecase: true -tokens: - - he/she - - s/he - - \(s\)he diff --git a/doc/styles/Google/GenderBias.yml b/doc/styles/Google/GenderBias.yml deleted file mode 100644 index 261cfb666..000000000 --- a/doc/styles/Google/GenderBias.yml +++ /dev/null @@ -1,45 +0,0 @@ -extends: substitution -message: "Consider using '%s' instead of '%s'." -link: 'https://developers.google.com/style/inclusive-documentation' -ignorecase: true -level: error -swap: - (?:alumna|alumnus): graduate - (?:alumnae|alumni): graduates - air(?:m[ae]n|wom[ae]n): pilot(s) - anchor(?:m[ae]n|wom[ae]n): anchor(s) - authoress: author - camera(?:m[ae]n|wom[ae]n): camera operator(s) - chair(?:m[ae]n|wom[ae]n): chair(s) - congress(?:m[ae]n|wom[ae]n): member(s) of congress - door(?:m[ae]|wom[ae]n): concierge(s) - draft(?:m[ae]n|wom[ae]n): drafter(s) - fire(?:m[ae]n|wom[ae]n): firefighter(s) - fisher(?:m[ae]n|wom[ae]n): fisher(s) - fresh(?:m[ae]n|wom[ae]n): first-year student(s) - garbage(?:m[ae]n|wom[ae]n): waste collector(s) - lady lawyer: lawyer - ladylike: courteous - landlord: building manager - mail(?:m[ae]n|wom[ae]n): mail carriers - man and wife: husband and wife - man enough: strong enough - mankind: human kind - manmade: manufactured - manpower: personnel - men and girls: men and women - middle(?:m[ae]n|wom[ae]n): intermediary - news(?:m[ae]n|wom[ae]n): journalist(s) - ombuds(?:man|woman): ombuds - oneupmanship: upstaging - poetess: poet - police(?:m[ae]n|wom[ae]n): police officer(s) - repair(?:m[ae]n|wom[ae]n): technician(s) - sales(?:m[ae]n|wom[ae]n): salesperson or sales people - service(?:m[ae]n|wom[ae]n): soldier(s) - steward(?:ess)?: flight attendant - tribes(?:m[ae]n|wom[ae]n): tribe member(s) - waitress: waiter - woman doctor: doctor - woman scientist[s]?: scientist(s) - work(?:m[ae]n|wom[ae]n): worker(s) diff --git a/doc/styles/Google/HeadingPunctuation.yml b/doc/styles/Google/HeadingPunctuation.yml deleted file mode 100644 index b538be5b4..000000000 --- a/doc/styles/Google/HeadingPunctuation.yml +++ /dev/null @@ -1,13 +0,0 @@ -extends: existence -message: "Don't put a period at the end of a heading." -link: 'https://developers.google.com/style/capitalization#capitalization-in-titles-and-headings' -nonword: true -level: warning -scope: heading -action: - name: edit - params: - - remove - - '.' -tokens: - - '[a-z0-9][.]\s*$' diff --git a/doc/styles/Google/Headings.yml b/doc/styles/Google/Headings.yml deleted file mode 100644 index a53301338..000000000 --- a/doc/styles/Google/Headings.yml +++ /dev/null @@ -1,29 +0,0 @@ -extends: capitalization -message: "'%s' should use sentence-style capitalization." -link: 'https://developers.google.com/style/capitalization#capitalization-in-titles-and-headings' -level: warning -scope: heading -match: $sentence -indicators: - - ':' -exceptions: - - Azure - - CLI - - Code - - Cosmos - - Docker - - Emmet - - gRPC - - I - - Kubernetes - - Linux - - macOS - - Marketplace - - MongoDB - - REPL - - Studio - - TypeScript - - URLs - - Visual - - VS - - Windows diff --git a/doc/styles/Google/Latin.yml b/doc/styles/Google/Latin.yml deleted file mode 100644 index d91700de3..000000000 --- a/doc/styles/Google/Latin.yml +++ /dev/null @@ -1,11 +0,0 @@ -extends: substitution -message: "Use '%s' instead of '%s'." -link: 'https://developers.google.com/style/abbreviations' -ignorecase: true -level: error -nonword: true -action: - name: replace -swap: - '\b(?:eg|e\.g\.)[\s,]': for example - '\b(?:ie|i\.e\.)[\s,]': that is diff --git a/doc/styles/Google/LyHyphens.yml b/doc/styles/Google/LyHyphens.yml deleted file mode 100644 index ac8f557a4..000000000 --- a/doc/styles/Google/LyHyphens.yml +++ /dev/null @@ -1,14 +0,0 @@ -extends: existence -message: "'%s' doesn't need a hyphen." -link: 'https://developers.google.com/style/hyphens' -level: error -ignorecase: false -nonword: true -action: - name: edit - params: - - replace - - '-' - - ' ' -tokens: - - '\s[^\s-]+ly-' diff --git a/doc/styles/Google/OptionalPlurals.yml b/doc/styles/Google/OptionalPlurals.yml deleted file mode 100644 index f858ea6fe..000000000 --- a/doc/styles/Google/OptionalPlurals.yml +++ /dev/null @@ -1,12 +0,0 @@ -extends: existence -message: "Don't use plurals in parentheses such as in '%s'." -link: 'https://developers.google.com/style/plurals-parentheses' -level: error -nonword: true -action: - name: edit - params: - - remove - - '(s)' -tokens: - - '\b\w+\(s\)' diff --git a/doc/styles/Google/Ordinal.yml b/doc/styles/Google/Ordinal.yml deleted file mode 100644 index d1ac7d27e..000000000 --- a/doc/styles/Google/Ordinal.yml +++ /dev/null @@ -1,7 +0,0 @@ -extends: existence -message: "Spell out all ordinal numbers ('%s') in text." -link: 'https://developers.google.com/style/numbers' -level: error -nonword: true -tokens: - - \d+(?:st|nd|rd|th) diff --git a/doc/styles/Google/OxfordComma.yml b/doc/styles/Google/OxfordComma.yml deleted file mode 100644 index b9ba21ebb..000000000 --- a/doc/styles/Google/OxfordComma.yml +++ /dev/null @@ -1,7 +0,0 @@ -extends: existence -message: "Use the Oxford comma in '%s'." -link: 'https://developers.google.com/style/commas' -scope: sentence -level: warning -tokens: - - '(?:[^,]+,){1,}\s\w+\s(?:and|or)' diff --git a/doc/styles/Google/Parens.yml b/doc/styles/Google/Parens.yml deleted file mode 100644 index 3b8711d0c..000000000 --- a/doc/styles/Google/Parens.yml +++ /dev/null @@ -1,7 +0,0 @@ -extends: existence -message: "Use parentheses judiciously." -link: 'https://developers.google.com/style/parentheses' -nonword: true -level: suggestion -tokens: - - '\(.+\)' diff --git a/doc/styles/Google/Passive.yml b/doc/styles/Google/Passive.yml deleted file mode 100644 index 3265890e5..000000000 --- a/doc/styles/Google/Passive.yml +++ /dev/null @@ -1,184 +0,0 @@ -extends: existence -link: 'https://developers.google.com/style/voice' -message: "In general, use active voice instead of passive voice ('%s')." -ignorecase: true -level: suggestion -raw: - - \b(am|are|were|being|is|been|was|be)\b\s* -tokens: - - '[\w]+ed' - - awoken - - beat - - become - - been - - begun - - bent - - beset - - bet - - bid - - bidden - - bitten - - bled - - blown - - born - - bought - - bound - - bred - - broadcast - - broken - - brought - - built - - burnt - - burst - - cast - - caught - - chosen - - clung - - come - - cost - - crept - - cut - - dealt - - dived - - done - - drawn - - dreamt - - driven - - drunk - - dug - - eaten - - fallen - - fed - - felt - - fit - - fled - - flown - - flung - - forbidden - - foregone - - forgiven - - forgotten - - forsaken - - fought - - found - - frozen - - given - - gone - - gotten - - ground - - grown - - heard - - held - - hidden - - hit - - hung - - hurt - - kept - - knelt - - knit - - known - - laid - - lain - - leapt - - learnt - - led - - left - - lent - - let - - lighted - - lost - - made - - meant - - met - - misspelt - - mistaken - - mown - - overcome - - overdone - - overtaken - - overthrown - - paid - - pled - - proven - - put - - quit - - read - - rid - - ridden - - risen - - run - - rung - - said - - sat - - sawn - - seen - - sent - - set - - sewn - - shaken - - shaven - - shed - - shod - - shone - - shorn - - shot - - shown - - shrunk - - shut - - slain - - slept - - slid - - slit - - slung - - smitten - - sold - - sought - - sown - - sped - - spent - - spilt - - spit - - split - - spoken - - spread - - sprung - - spun - - stolen - - stood - - stridden - - striven - - struck - - strung - - stuck - - stung - - stunk - - sung - - sunk - - swept - - swollen - - sworn - - swum - - swung - - taken - - taught - - thought - - thrived - - thrown - - thrust - - told - - torn - - trodden - - understood - - upheld - - upset - - wed - - wept - - withheld - - withstood - - woken - - won - - worn - - wound - - woven - - written - - wrung diff --git a/doc/styles/Google/Periods.yml b/doc/styles/Google/Periods.yml deleted file mode 100644 index d24a6a6c0..000000000 --- a/doc/styles/Google/Periods.yml +++ /dev/null @@ -1,7 +0,0 @@ -extends: existence -message: "Don't use periods with acronyms or initialisms such as '%s'." -link: 'https://developers.google.com/style/abbreviations' -level: error -nonword: true -tokens: - - '\b(?:[A-Z]\.){3,}' diff --git a/doc/styles/Google/Quotes.yml b/doc/styles/Google/Quotes.yml deleted file mode 100644 index 3cb6f1abd..000000000 --- a/doc/styles/Google/Quotes.yml +++ /dev/null @@ -1,7 +0,0 @@ -extends: existence -message: "Commas and periods go inside quotation marks." -link: 'https://developers.google.com/style/quotation-marks' -level: error -nonword: true -tokens: - - '"[^"]+"[.,?]' diff --git a/doc/styles/Google/Ranges.yml b/doc/styles/Google/Ranges.yml deleted file mode 100644 index 3ec045e77..000000000 --- a/doc/styles/Google/Ranges.yml +++ /dev/null @@ -1,7 +0,0 @@ -extends: existence -message: "Don't add words such as 'from' or 'between' to describe a range of numbers." -link: 'https://developers.google.com/style/hyphens' -nonword: true -level: warning -tokens: - - '(?:from|between)\s\d+\s?-\s?\d+' diff --git a/doc/styles/Google/Semicolons.yml b/doc/styles/Google/Semicolons.yml deleted file mode 100644 index bb8b85b42..000000000 --- a/doc/styles/Google/Semicolons.yml +++ /dev/null @@ -1,8 +0,0 @@ -extends: existence -message: "Use semicolons judiciously." -link: 'https://developers.google.com/style/semicolons' -nonword: true -scope: sentence -level: suggestion -tokens: - - ';' diff --git a/doc/styles/Google/Slang.yml b/doc/styles/Google/Slang.yml deleted file mode 100644 index 63f4c248a..000000000 --- a/doc/styles/Google/Slang.yml +++ /dev/null @@ -1,11 +0,0 @@ -extends: existence -message: "Don't use internet slang abbreviations such as '%s'." -link: 'https://developers.google.com/style/abbreviations' -ignorecase: true -level: error -tokens: - - 'tl;dr' - - ymmv - - rtfm - - imo - - fwiw diff --git a/doc/styles/Google/Spacing.yml b/doc/styles/Google/Spacing.yml deleted file mode 100644 index 27f7ca2bd..000000000 --- a/doc/styles/Google/Spacing.yml +++ /dev/null @@ -1,8 +0,0 @@ -extends: existence -message: "'%s' should have one space." -link: 'https://developers.google.com/style/sentence-spacing' -level: error -nonword: true -tokens: - - '[a-z][.?!] {2,}[A-Z]' - - '[a-z][.?!][A-Z]' diff --git a/doc/styles/Google/Spelling.yml b/doc/styles/Google/Spelling.yml deleted file mode 100644 index 57acb8841..000000000 --- a/doc/styles/Google/Spelling.yml +++ /dev/null @@ -1,8 +0,0 @@ -extends: existence -message: "In general, use American spelling instead of '%s'." -link: 'https://developers.google.com/style/spelling' -ignorecase: true -level: warning -tokens: - - '(?:\w+)nised?' - - '(?:\w+)logue' diff --git a/doc/styles/Google/Units.yml b/doc/styles/Google/Units.yml deleted file mode 100644 index 379fad6b8..000000000 --- a/doc/styles/Google/Units.yml +++ /dev/null @@ -1,8 +0,0 @@ -extends: existence -message: "Put a nonbreaking space between the number and the unit in '%s'." -link: 'https://developers.google.com/style/units-of-measure' -nonword: true -level: error -tokens: - - \d+(?:B|kB|MB|GB|TB) - - \d+(?:ns|ms|s|min|h|d) diff --git a/doc/styles/Google/We.yml b/doc/styles/Google/We.yml deleted file mode 100644 index c7ac7d362..000000000 --- a/doc/styles/Google/We.yml +++ /dev/null @@ -1,11 +0,0 @@ -extends: existence -message: "Try to avoid using first-person plural like '%s'." -link: 'https://developers.google.com/style/pronouns#personal-pronouns' -level: warning -ignorecase: true -tokens: - - we - - we'(?:ve|re) - - ours? - - us - - let's diff --git a/doc/styles/Google/Will.yml b/doc/styles/Google/Will.yml deleted file mode 100644 index 128a91836..000000000 --- a/doc/styles/Google/Will.yml +++ /dev/null @@ -1,7 +0,0 @@ -extends: existence -message: "Avoid using '%s'." -link: 'https://developers.google.com/style/tense' -ignorecase: true -level: warning -tokens: - - will diff --git a/doc/styles/Google/WordList.yml b/doc/styles/Google/WordList.yml deleted file mode 100644 index bb711517e..000000000 --- a/doc/styles/Google/WordList.yml +++ /dev/null @@ -1,80 +0,0 @@ -extends: substitution -message: "Use '%s' instead of '%s'." -link: 'https://developers.google.com/style/word-list' -level: warning -ignorecase: false -action: - name: replace -swap: - '(?:API Console|dev|developer) key': API key - '(?:cell ?phone|smart ?phone)': phone|mobile phone - '(?:dev|developer|APIs) console': API console - '(?:e-mail|Email|E-mail)': email - '(?:file ?path|path ?name)': path - '(?:kill|terminate|abort)': stop|exit|cancel|end - '(?:OAuth ?2|Oauth)': OAuth 2.0 - '(?:ok|Okay)': OK|okay - '(?:WiFi|wifi)': Wi-Fi - '[\.]+apk': APK - '3\-D': 3D - 'Google (?:I\-O|IO)': Google I/O - 'tap (?:&|and) hold': touch & hold - 'un(?:check|select)': clear - above: preceding - account name: username - action bar: app bar - admin: administrator - Ajax: AJAX - Android device: Android-powered device - android: Android - API explorer: APIs Explorer - application: app - approx\.: approximately - authN: authentication - authZ: authorization - autoupdate: automatically update - cellular data: mobile data - cellular network: mobile network - chapter: documents|pages|sections - check box: checkbox - check: select - CLI: command-line tool - click on: click|click in - Cloud: Google Cloud Platform|GCP - Container Engine: Kubernetes Engine - content type: media type - curated roles: predefined roles - data are: data is - Developers Console: Google API Console|API Console - disabled?: turn off|off - ephemeral IP address: ephemeral external IP address - fewer data: less data - file name: filename - firewalls: firewall rules - functionality: capability|feature - Google account: Google Account - Google accounts: Google Accounts - Googling: search with Google - grayed-out: unavailable - HTTPs: HTTPS - in order to: to - ingest: import|load - k8s: Kubernetes - long press: touch & hold - network IP address: internal IP address - omnibox: address bar - open-source: open source - overview screen: recents screen - regex: regular expression - SHA1: SHA-1|HAS-SHA1 - sign into: sign in to - sign-?on: single sign-on - static IP address: static external IP address - stylesheet: style sheet - synch: sync - tablename: table name - tablet: device - touch: tap - url: URL - vs\.: versus - World Wide Web: web diff --git a/doc/styles/Google/meta.json b/doc/styles/Google/meta.json deleted file mode 100644 index a5da2a848..000000000 --- a/doc/styles/Google/meta.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "feed": "https://github.com/errata-ai/Google/releases.atom", - "vale_version": ">=1.0.0" -} diff --git a/doc/styles/Google/vocab.txt b/doc/styles/Google/vocab.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/doc/styles/Vocab/ANSYS/accept.txt b/doc/styles/Vocab/ANSYS/accept.txt index ac18bcecb..d5174a35d 100644 --- a/doc/styles/Vocab/ANSYS/accept.txt +++ b/doc/styles/Vocab/ANSYS/accept.txt @@ -24,4 +24,15 @@ LS-DYNA API APIs postprocessing -PyDPF-post \ No newline at end of file +PyDPF-post +PyDPF-post for LS-DYNA +inout +sourth +solf +outputed +embeded +propt +ba +ot +messag +setyp diff --git a/ignore_words.txt b/ignore_words.txt deleted file mode 100644 index b724ba437..000000000 --- a/ignore_words.txt +++ /dev/null @@ -1,10 +0,0 @@ -inout -sourth -solf -outputed -embeded -propt -ba -ot -messag -setyp \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index cc6212760..a86c85981 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,29 +7,25 @@ name = "ansys-dyna-core" version = "0.3.dev0" description = "Python interface to LS-DYNA Service" readme = "README.rst" -requires-python = ">=3.7,<4" +requires-python = ">=3.8,<4" license = {file = "LICENSE"} -authors = [{name = "ANSYS, Inc.", email = "pyansys.support@ansys.com"}] -maintainers = [{name = "PyAnsys developers", email = "pyansys.support@ansys.com"}] -keywords = ["ANSYS", "LS-DYNA", "gRPC"] +authors = [{name = "ANSYS, Inc.", email = "pyansys.core@ansys.com"}] +maintainers = [{name = "ANSYS, Inc.", email = "pyansys.core@ansys.com"}] +keywords = ["Ansys", "LS-DYNA", "gRPC"] classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Science/Research", "Topic :: Scientific/Engineering :: Information Analysis", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", - "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", ] dependencies = [ - "grpcio>=1.30.0", - "grpcio-tools>=1.39.0", - "protobuf~=3.19", - "google-api-python-client>=1.7.11", - "googleapis-common-protos>=1.52.0", "ansys-dpf-core>=0.7.2", "ansys-api-dyna==0.2.0", ] @@ -71,22 +67,26 @@ doc = [ "scikit-learn==1.2.2", "ipython==8.14.0", "jupyterlab==4.0.2", + "sphinx-jinja==2.0.2", + "sphinx-autoapi==2.1.1", ] +[tool.flit.module] +name = "ansys.dyna.core" + [project.urls] Source = "https://github.com/pyansys/pydyna" +Homepage = "https://dyna.docs.pyansys.com" Documentation = "https://dyna.docs.pyansys.com" - -[tool.flit.module] -name = "ansys.dyna.core" +Tracker = "https://github.com/pyansys/pydyna/issues" [tool.black] -line-length = 100 +line-length = 120 [tool.isort] profile = "black" force_sort_within_sections = true -line_length = 100 +line_length = 120 default_section = "THIRDPARTY" src_paths = ["doc", "src", "tests"] diff --git a/tox.ini b/tox.ini new file mode 100644 index 000000000..c4bd7b0db --- /dev/null +++ b/tox.ini @@ -0,0 +1,40 @@ +[tox] +description = Default tox environments list +envlist = + style,tests,doc +skip_missing_interpreters = true +isolated_build = true +isolated_build_env = build + +[testenv] +description = Checks for project testing with desired extras +basepython = + tests38: python3.8 + tests39: python3.9 + test310: python3.10 + test311: python3.11 + {style,tests,doc}: python3 +passenv = * +setenv = + PYTHONUNBUFFERED = yes + cov: PYTEST_EXTRA_ARGS = --cov=ansys.dyna --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} + +[testenv:style] +description = Checks project code style +skip_install = true +deps = + pre-commit +commands = + pre-commit install + pre-commit run --all-files --show-diff-on-failure + +[testenv:doc] +description = Check if documentation generates properly +extras = + doc +commands = + sphinx-build -d "{toxworkdir}/doc_doctree" doc/source "{toxinidir}/doc/_build/html" --color -vW -b html -j auto