Skip to content

Commit

Permalink
Add more advanced nox config
Browse files Browse the repository at this point in the history
  • Loading branch information
Chad Dombrova committed Aug 4, 2023
1 parent 4d2162d commit 602be7d
Show file tree
Hide file tree
Showing 6 changed files with 431 additions and 25 deletions.
65 changes: 60 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,61 @@
exclude: '.*[.]pyi$'
repos:
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
- repo: local
hooks:
- id: black
name: black
entry: nox
args: [-s, black, --no-install, --]
language: system
pass_filenames: true
require_serial: true
stages:
- commit
- push
- manual
files: ^.*/[^/]*[.]py$
- id: check_yaml
name: check_yaml
entry: nox
args: [-s, check_yaml, --no-install, --]
language: system
pass_filenames: true
require_serial: false
stages:
- commit
- push
- manual
files: ^.*[.](yaml|yml)$
- id: check_toml
name: check_toml
entry: nox
args: [-s, check_toml, --no-install, --]
language: system
pass_filenames: true
require_serial: false
stages:
- commit
- push
- manual
files: ^.*[.]toml$
- id: precommit_gen
name: precommit_gen
entry: nox
args: [-s, precommit_gen, --no-install, --]
language: system
pass_filenames: false
require_serial: false
stages:
- commit
- push
files: ^noxfile[.]py$
- id: self_mypy
name: self_mypy
entry: nox
args: [-s, self_mypy, --no-install, --]
language: system
pass_filenames: false
require_serial: true
stages:
- manual
- push
files: ^.*/[^/]*[.]py$
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Next, build it. Requires python 3.7+:
```
python3 -m venv .venv
. .venv/bin/activate
pip install nox
pip install -r nox-requirements.txt
nox -s 'generate(ocio)'
```

Expand All @@ -43,7 +43,7 @@ If this fails, here's a paranoid/foolproof approach:
unset PYTHONPATH
python3 -m venv .venv37
. .venv37/bin/activate
python3 -m pip install nox
python3 -m pip install -r nox-requirements.txt
rm -rf .nox
python3 -m nox -s 'generate(ocio)'
```
Expand Down
39 changes: 24 additions & 15 deletions houdini/test_stubs.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,30 +26,39 @@ def __getitem__(self, item):

def test_matrix2():
hou.Matrix2(
SizedItems([
SizedItems(range(2)),
SizedItems(range(2)),
]))
SizedItems(
[
SizedItems(range(2)),
SizedItems(range(2)),
]
)
)

hou.Matrix2(SizedItems(range(4)))


def test_matrix3():
hou.Matrix3(
SizedItems([
SizedItems(range(3)),
SizedItems(range(3)),
SizedItems(range(3)),
]))
SizedItems(
[
SizedItems(range(3)),
SizedItems(range(3)),
SizedItems(range(3)),
]
)
)
hou.Matrix3(SizedItems(range(9)))


def test_matrix4():
hou.Matrix4(
SizedItems([
SizedItems(range(4)),
SizedItems(range(4)),
SizedItems(range(4)),
SizedItems(range(4)),
]))
SizedItems(
[
SizedItems(range(4)),
SizedItems(range(4)),
SizedItems(range(4)),
SizedItems(range(4)),
]
)
)
hou.Matrix4(SizedItems(range(16)))
4 changes: 4 additions & 0 deletions nox-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
nox==2023.4.22
ruamel.yaml==0.17.32
tomli>2
pre-commit==2.21.0
Loading

0 comments on commit 602be7d

Please sign in to comment.