Skip to content

Commit

Permalink
MAINT: collect dependencies under a requirements/ directory (#307)
Browse files Browse the repository at this point in the history
* Collect dependencies under requirements/ dir

* Enhance .gitigore

* Update actions to new requirements layout

* Update documentation

* Update action versions
  • Loading branch information
jorgepiloto committed Jul 15, 2022
1 parent 693b83d commit 79e5bfc
Show file tree
Hide file tree
Showing 9 changed files with 162 additions and 31 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand All @@ -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}}

Expand Down Expand Up @@ -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%
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
176 changes: 153 additions & 23 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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*
Expand All @@ -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
4 changes: 2 additions & 2 deletions docs/source/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -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
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 79e5bfc

Please sign in to comment.