Skip to content

Commit 79e5bfc

Browse files
authored
MAINT: collect dependencies under a requirements/ directory (#307)
* Collect dependencies under requirements/ dir * Enhance .gitigore * Update actions to new requirements layout * Update documentation * Update action versions
1 parent 693b83d commit 79e5bfc

File tree

9 files changed

+162
-31
lines changed

9 files changed

+162
-31
lines changed

.github/workflows/ci.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- uses: actions/checkout@v3
3535

3636
- name: "Build Package"
37-
uses: pyansys/pydpf-actions/[email protected]
37+
uses: pyansys/pydpf-actions/[email protected].1
3838
with:
3939
python-version: ${{ matrix.python-version }}
4040
ANSYS_VERSION: ${{env.ANSYS_VERSION}}
@@ -44,7 +44,7 @@ jobs:
4444
install_extras: plotting
4545

4646
- name: "Test Package"
47-
uses: pyansys/pydpf-actions/[email protected]
47+
uses: pyansys/pydpf-actions/[email protected].1
4848
with:
4949
MODULE: ${{env.MODULE}}
5050

@@ -90,7 +90,7 @@ jobs:
9090
- name: Install ansys-dpf-core
9191
shell: cmd
9292
run: |
93-
pip install -r requirements_build.txt
93+
pip install -r requirements/requirements_build.txt
9494
python setup.py bdist_wheel
9595
FOR /F %%a in ('dir /s/b dist\*.whl') do SET WHEELPATH=%%a
9696
ECHO %WHEELPATH%
@@ -114,7 +114,7 @@ jobs:
114114
115115
- name: Install documentation packages for Python
116116
run: |
117-
pip install -r requirements_docs.txt
117+
pip install -r requirements/requirements_docs.txt
118118
119119
- name: Build Documentation
120120
shell: cmd

.github/workflows/style.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333

3434
- name: Install style requirements
3535
run: |
36-
pip install -r requirements_style.txt --disable-pip-version-check
36+
pip install -r requirements/requirements_style.txt --disable-pip-version-check
3737
3838
- name: Codespell
3939
run: |

.gitignore

+153-23
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,164 @@
1-
# cache and pyc
2-
__pycache__
3-
.pytest_cache
1+
### Python ###
2+
# Byte-compiled / optimized / DLL files
3+
__pycache__/
4+
*.py[cod]
5+
*$py.class
6+
7+
# C extensions
8+
*.so
9+
10+
# Distribution / packaging
11+
.Python
12+
build/
13+
develop-eggs/
14+
dist/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
lib/
19+
lib64/
20+
parts/
21+
sdist/
22+
var/
23+
wheels/
24+
share/python-wheels/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
MANIFEST
29+
30+
# PyInstaller
31+
# Usually these files are written by a python script from a template
32+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
33+
*.manifest
34+
*.spec
35+
36+
# Installer logs
37+
pip-log.txt
38+
pip-delete-this-directory.txt
39+
40+
# Unit test / coverage reports
41+
htmlcov/
42+
.tox/
43+
.nox/
44+
.coverage
45+
.coverage.*
46+
.cache
47+
nosetests.xml
48+
coverage.xml
49+
*.cover
50+
*.py,cover
51+
.hypothesis/
52+
.pytest_cache/
53+
cover/
54+
55+
# Translations
56+
*.mo
57+
*.pot
58+
59+
# Django stuff:
60+
*.log
61+
local_settings.py
62+
db.sqlite3
63+
db.sqlite3-journal
64+
65+
# Flask stuff:
66+
instance/
67+
.webassets-cache
68+
69+
# Scrapy stuff:
70+
.scrapy
71+
72+
# Sphinx documentation
73+
doc/_build/
74+
75+
# PyBuilder
76+
.pybuilder/
77+
target/
78+
79+
# Jupyter Notebook
80+
.ipynb_checkpoints
81+
82+
# IPython
83+
profile_default/
84+
ipython_config.py
85+
86+
# pyenv
87+
# For a library or package, you might want to ignore these files since the code is
88+
# intended to run in multiple environments; otherwise, check them in:
89+
# .python-version
90+
91+
# pipenv
92+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
93+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
94+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
95+
# install all needed dependencies.
96+
#Pipfile.lock
97+
98+
# poetry
99+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
100+
# This is especially recommended for binary packages to ensure reproducibility, and is more
101+
# commonly ignored for libraries.
102+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
103+
#poetry.lock
104+
105+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
106+
__pypackages__/
107+
108+
# Celery stuff
109+
celerybeat-schedule
110+
celerybeat.pid
111+
112+
# SageMath parsed files
113+
*.sage.py
114+
115+
# Environments
116+
.env
117+
.venv
118+
env/
119+
venv/
120+
ENV/
121+
env.bak/
122+
venv.bak/
123+
124+
# Spyder project settings
125+
.spyderproject
4126
.spyproject
5127

6-
#tests
7-
__pycache__
8-
/tests/.pytest_cache
128+
# Rope project settings
129+
.ropeproject
9130

10-
#ansys/dpf
11-
/ansys/dpf/__pycache__
131+
# mkdocs documentation
132+
/site
12133

13-
#ansys/dpf/core
14-
/ansys/dpf/core/__pycache__
134+
# mypy
135+
.mypy_cache/
136+
.dmypy.json
137+
dmypy.json
15138

16-
#operators
17-
/ansys/dpf/core/operators/__pycache__
139+
# Pyre type checker
140+
.pyre/
18141

19-
#other
20-
/perso
21-
.ipynb_checkpoints/
142+
# pytype static type analyzer
143+
.pytype/
22144

23-
# compiled documentation
24-
docs/build
145+
# Cython debug symbols
146+
cython_debug/
25147

26-
# pip files
27-
*.egg-info
28-
build/
29-
dist/
148+
# PyCharm
149+
# JetBrains specific template is maintainted in a separate JetBrains.gitignore that can
150+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
151+
# and can be added to the global gitignore or merged into this file. For a more nuclear
152+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
153+
.idea/
154+
155+
# Visual Studio
156+
.vs/
157+
158+
# End of https://www.toptal.com/developers/gitignore/api/python
159+
160+
#other
161+
/perso
30162

31163
# emacs
32164
flycheck*
@@ -38,14 +170,12 @@ flycheck*
38170
docker/v211
39171

40172
# pytest -coverage
41-
.coverage
42173
test-output.xml
43174

44175
# downloaded files
45176
ansys/dpf/core/examples/_cache/
46177

47178
*.orig
48-
venv/*
49179

50180
# Visual studio code settings
51181
.vscode

docs/source/contributing.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ installed. Next, install the testing requirements with:
184184

185185
.. code::
186186
187-
pip install -r requirements_test.txt
187+
pip install -r requirements/requirements_test.txt
188188
189189
Run the primary test suite and generate a coverage report with:
190190

@@ -260,7 +260,7 @@ following from the DPF-Core source directory:
260260

261261
.. code::
262262
263-
pip install -r requirements_docs.txt
263+
pip install -r requirements/requirements_docs.txt
264264
265265
266266
Next, if running Linux/Mac OS, build the documentation with
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

testing.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
## Unit Testing
44

5-
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:
5+
Once ansys-dpf-core package is installed (see README.md), unit tests can be run
6+
by installing the testing requirements with `pip install -r requirements/requirements_test.txt` and then running pytest with:
67

78
```
89
pytest

0 commit comments

Comments
 (0)