Skip to content

Commit

Permalink
MAINT: Update files as per pyansys standards (#762)
Browse files Browse the repository at this point in the history
Co-authored-by: pyansys-ci-bot <pyansys.github.bot@ansys.com>
  • Loading branch information
dipinknair and pyansys-ci-bot authored Jun 10, 2024
1 parent 4d636f3 commit b98396e
Show file tree
Hide file tree
Showing 12 changed files with 142 additions and 104 deletions.
3 changes: 0 additions & 3 deletions .codespellrc

This file was deleted.

7 changes: 0 additions & 7 deletions .flake8

This file was deleted.

File renamed without changes.
2 changes: 1 addition & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ documentation:

maintenance:
- changed-files:
- any-glob-to-any-file: ['.github/**/*', 'codecov.yml', '.flake8', '.coveragerc', '.codespellrc', '.pre-commit-config.yaml', 'tox.ini']
- any-glob-to-any-file: ['.github/**/*', '.pre-commit-config.yaml']

dependencies:
- changed-files:
Expand Down
13 changes: 13 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
repos:

- repo: https://github.com/pre-commit-ci/pre-commit-ci-config
rev: v1.6.1
hooks:
- id: check-pre-commit-ci-config

- repo: https://github.com/psf/black
rev: 24.4.2 # IF VERSION CHANGES --> MODIFY "blacken-docs" MANUALLY AS WELL!!
hooks:
Expand All @@ -20,6 +25,7 @@ repos:
rev: 7.0.0
hooks:
- id: flake8
additional_dependencies: [flake8-pyproject]

- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
Expand Down Expand Up @@ -57,5 +63,12 @@ repos:
- id: debug-statements
- id: check-yaml
- id: trailing-whitespace
- id: no-commit-to-branch
- id: check-added-large-files

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.4
hooks:
- id: check-github-workflows

exclude: '^tests/embedding/assets/.*$|^tests/parts/.*$'
27 changes: 12 additions & 15 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
# Authors

## Project Lead

* [Sam Sangili](https://github.com/samigithub2022)

## Contributors

* [Alexander Kaszynski](https://github.com/akaszynski)
* [Dipin Nair](https://github.com/dipinknair)
* [Kathy Pippert](https://github.com/PipKat)
* [Kerry McAdams](https://github.com/klmcadams)
* [Maxime Rey](https://github.com/MaxJPRey)
* [Mohamed Koubaa](https://github.com/koubaa)
* [Roberto Pastor](https://github.com/RobPasMue)
# This is the list of PyMechanical's significant contributors.
#
# This file does not necessarily list everyone who has contributed code.
#
# For contributions made under a Corporate CLA, the organization is
# added to this file.
#
# If you have contributed to the repository and want to be added to this file,
# submit a request.
#
#
ANSYS, Inc.
17 changes: 14 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Contributing
# Contributors

For contributing to this project, please refer to the [PyAnsys Developer's Guide].
## Project Lead

[PyAnsys Developer's Guide]: https://dev.docs.pyansys.com/
* [Sam Sangili](https://github.com/samigithub2022)
* [Mohamed Koubaa](https://github.com/koubaa)

## Individual Contributors

* [Alexander Kaszynski](https://github.com/akaszynski)
* [Dipin Nair](https://github.com/dipinknair)
* [Kathy Pippert](https://github.com/PipKat)
* [Kerry McAdams](https://github.com/klmcadams)
* [Maxime Rey](https://github.com/MaxJPRey)
* [Revathy Venugopal](https://github.com/Revathyvenugopal162)
* [Roberto Pastor](https://github.com/RobPasMue)
22 changes: 8 additions & 14 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
:alt: Python

.. |codecov| image:: https://codecov.io/gh/ansys/pymechanical/branch/main/graph/badge.svg
:target: https://codecov.io/gh/ansys/ansys-mechanical-core
:target: https://app.codecov.io/gh/ansys/pymechanical
:alt: Codecov

.. |GH-CI| image:: https://github.com/ansys/pymechanical/actions/workflows/ci_cd.yml/badge.svg
Expand All @@ -32,9 +32,13 @@
:target: https://github.com/psf/black
:alt: Black

.. |pre-commit| image:: https://results.pre-commit.ci/badge/github/ansys/pymechanical/main.svg?style=flat
:target: https://results.pre-commit.ci/latest/github/ansys/pymechanical/main
:alt: pre-commit

Overview
--------

PyMechanical brings Ansys Mechanical to Python. It enables your Python programs to use
Mechanical within Python's ecosystem. It includes the ability to:

Expand All @@ -44,6 +48,7 @@ Mechanical within Python's ecosystem. It includes the ability to:

Install the package
-------------------

Install PyMechanical using `pip` with::

pip install ansys-mechanical-core
Expand Down Expand Up @@ -121,7 +126,7 @@ Documentation and issues
------------------------

Documentation for the latest stable release of PyMechanical is hosted at `PyMechanical documentation
<https://mechanical.docs.pyansys.com/version/stable/>`_.
<https://mechanical.docs.pyansys.com/>`_.

In the upper right corner of the documentation's title bar, there is an option for switching from
viewing the documentation for the latest stable release to viewing the documentation for the
Expand All @@ -144,15 +149,4 @@ Testing and development

If you would like to test or contribute to the development of PyMechanical, see
`Contribute <https://mechanical.docs.pyansys.com/version/stable/contributing.html>`_ in
the PyMechanical documentation.

.. LINKS AND REFERENCES
.. _black: https://github.com/psf/black
.. _flake8: https://flake8.pycqa.org/en/latest/
.. _isort: https://github.com/PyCQA/isort
.. _pip: https://pypi.org/project/pip/
.. _pre-commit: https://pre-commit.com/
.. _PyAnsys Developer's Guide: https://dev.docs.pyansys.com/
.. _pytest: https://docs.pytest.org/en/stable/
.. _Sphinx: https://www.sphinx-doc.org/en/master/
.. _tox: https://tox.wiki/
the PyMechanical documentation.
1 change: 1 addition & 0 deletions doc/changelog.d/762.dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MAINT: Update files as per pyansys standards
4 changes: 3 additions & 1 deletion doc/styles/config/vocabularies/ANSYS/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,6 @@ middleware
REST
cli
VPN
ACT
ACT
globaly
ans
100 changes: 90 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,9 @@ description = "A python wrapper for Ansys Mechanical"
readme = "README.rst"
requires-python = ">=3.9,<4.0"
license = {file = "LICENSE"}
authors = [
{name = "ANSYS, Inc.", email = "pyansys.core@ansys.com"},
]
maintainers = [
{name = "ANSYS, Inc.", email = "pyansys.core@ansys.com"},
]
authors = [{name = "ANSYS, Inc.", email = "pyansys.core@ansys.com"}]
maintainers = [{name = "ANSYS, Inc.", email = "pyansys.core@ansys.com"}]
keywords = ["pymechanical", "mechanical", "ansys", "pyansys",]

classifiers = [
"Development Status :: 4 - Beta",
Expand Down Expand Up @@ -43,10 +40,11 @@ dependencies = [
]

[project.urls]
Documentation = "https://mechanical.docs.pyansys.com"
Source = "https://github.com/ansys/pymechanical"
Homepage = "https://github.com/ansys/pymechanical"
Tracker = "https://github.com/ansys/pymechanical/issues"
Documentation = "https://mechanical.docs.pyansys.com"
Repository = "https://github.com/ansys/pymechanical"
Issues = "https://github.com/ansys/pymechanical/issues"
Changelog = "https://mechanical.docs.pyansys.com/version/stable/changelog.html"

[project.optional-dependencies]
tests = [
Expand Down Expand Up @@ -102,6 +100,10 @@ line_length = 100

src_paths = ["doc", "src", "tests"]

# ========================================================
# Pytest and Coverage Configuration
# ========================================================

[tool.coverage.run]
relative_files = true
source = ["ansys.mechanical"]
Expand Down Expand Up @@ -141,6 +143,10 @@ markers = [
]
xfail_strict = true

# ========================================================
# Towncrier Configuration
# ========================================================

[tool.towncrier]
package = "ansys.mechanical.core"
directory = "doc/changelog.d"
Expand Down Expand Up @@ -174,4 +180,78 @@ showcontent = true
[[tool.towncrier.type]]
directory = "miscellaneous"
name = "Miscellaneous"
showcontent = true
showcontent = true

# ========================================================
# Flake8 Configuration
# ========================================================

[tool.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"
]
count = true
max-complexity = 10
max-line-length = 100
statistics = true

# ========================================================
# Tox Configuration
# ========================================================

[tool.tox]
legacy_tox_ini = """
[tox]
description = Default tox environments list
envlist =
style,{py38,py39,py310,py311}{,-coverage},doc
passenv = AWP_ROOT
skip_missing_interpreters = true
isolated_build = true
isolated_build_env = build
[gh-actions]
description = The tox environment to be executed in gh-actions for a given python version
python =
3.9: style,py39-coverage,doc
3.10: style,py310-coverage,doc
3.11: style,py311-coverage,doc
3.12: style,py311-coverage,doc
[testenv]
description = Checks for project unit tests and coverage (if desired)
basepython =
py39: python3.9
py310: python3.10
py311: python3.11
py312: python3.12
py: python3
{style,reformat,doc,build}: python3
passenv = *
setenv =
PYTHONUNBUFFERED = yes
coverage: PYTEST_EXTRA_ARGS = --cov=ansys.mechanical --cov-report=term --cov-report=xml:.cov/coverage.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
passenv = *
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
passenv = *
extras = doc
commands =
sphinx-build -d "{toxworkdir}/doc_doctree" doc/source "{toxinidir}/doc/_build/html" --color -vW -bhtml
"""
50 changes: 0 additions & 50 deletions tox.ini

This file was deleted.

0 comments on commit b98396e

Please sign in to comment.