diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 63ec2e1cd7..68cc1393ad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,7 @@ jobs: - uses: actions/checkout@v3 - name: "Build Package" - uses: pyansys/pydpf-actions/build_package@v2.1 + uses: pyansys/pydpf-actions/build_package@v2.1.1 with: python-version: ${{ matrix.python-version }} ANSYS_VERSION: ${{env.ANSYS_VERSION}} @@ -44,7 +44,7 @@ jobs: install_extras: plotting - name: "Test Package" - uses: pyansys/pydpf-actions/test_package@v2.1 + uses: pyansys/pydpf-actions/test_package@v2.1.1 with: MODULE: ${{env.MODULE}} @@ -90,7 +90,7 @@ jobs: - name: Install ansys-dpf-core shell: cmd run: | - pip install -r requirements_build.txt + pip install -r requirements/requirements_build.txt python setup.py bdist_wheel FOR /F %%a in ('dir /s/b dist\*.whl') do SET WHEELPATH=%%a ECHO %WHEELPATH% @@ -114,7 +114,7 @@ jobs: - name: Install documentation packages for Python run: | - pip install -r requirements_docs.txt + pip install -r requirements/requirements_docs.txt - name: Build Documentation shell: cmd diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 4becda9bf3..06925f4406 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -33,7 +33,7 @@ jobs: - name: Install style requirements run: | - pip install -r requirements_style.txt --disable-pip-version-check + pip install -r requirements/requirements_style.txt --disable-pip-version-check - name: Codespell run: | diff --git a/.gitignore b/.gitignore index e43abd59d1..e8da655cfc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,32 +1,164 @@ -# cache and pyc -__pycache__ -.pytest_cache +### Python ### +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# 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 + +# 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 + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.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/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject .spyproject -#tests -__pycache__ -/tests/.pytest_cache +# Rope project settings +.ropeproject -#ansys/dpf -/ansys/dpf/__pycache__ +# mkdocs documentation +/site -#ansys/dpf/core -/ansys/dpf/core/__pycache__ +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json -#operators -/ansys/dpf/core/operators/__pycache__ +# Pyre type checker +.pyre/ -#other -/perso -.ipynb_checkpoints/ +# pytype static type analyzer +.pytype/ -# compiled documentation -docs/build +# Cython debug symbols +cython_debug/ -# pip files -*.egg-info -build/ -dist/ +# 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 + +#other +/perso # emacs flycheck* @@ -38,14 +170,12 @@ flycheck* docker/v211 # pytest -coverage -.coverage test-output.xml # downloaded files ansys/dpf/core/examples/_cache/ *.orig -venv/* # Visual studio code settings .vscode diff --git a/docs/source/contributing.rst b/docs/source/contributing.rst index eba28ed57a..82cc0a8f3a 100644 --- a/docs/source/contributing.rst +++ b/docs/source/contributing.rst @@ -184,7 +184,7 @@ installed. Next, install the testing requirements with: .. code:: - pip install -r requirements_test.txt + pip install -r requirements/requirements_test.txt Run the primary test suite and generate a coverage report with: @@ -260,7 +260,7 @@ following from the DPF-Core source directory: .. code:: - pip install -r requirements_docs.txt + pip install -r requirements/requirements_docs.txt Next, if running Linux/Mac OS, build the documentation with diff --git a/requirements_build.txt b/requirements/requirements_build.txt similarity index 100% rename from requirements_build.txt rename to requirements/requirements_build.txt diff --git a/requirements_docs.txt b/requirements/requirements_docs.txt similarity index 100% rename from requirements_docs.txt rename to requirements/requirements_docs.txt diff --git a/requirements_style.txt b/requirements/requirements_style.txt similarity index 100% rename from requirements_style.txt rename to requirements/requirements_style.txt diff --git a/requirements_test.txt b/requirements/requirements_test.txt similarity index 100% rename from requirements_test.txt rename to requirements/requirements_test.txt diff --git a/testing.md b/testing.md index 059f371421..31590eec8a 100644 --- a/testing.md +++ b/testing.md @@ -2,7 +2,8 @@ ## Unit Testing -Once ansys-dpf-core package is installed (see README.md), unit tests can be run by installing the testing requirements with `pip install -r requirements_test.txt` and then running pytest with: +Once ansys-dpf-core package is installed (see README.md), unit tests can be run +by installing the testing requirements with `pip install -r requirements/requirements_test.txt` and then running pytest with: ``` pytest