Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pystencils
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pycodegen
pystencils
Commits
c92190d2
Commit
c92190d2
authored
5 months ago
by
Frederik Hennig
Browse files
Options
Downloads
Patches
Plain Diff
Add docs session to nox; adapt CI
parent
1f5a7b44
No related branches found
No related tags found
1 merge request
!436
Introduce Nox for Local and CI Test Automation. Start Writing a Contributors Guide.
Pipeline
#71848
failed
5 months ago
Stage: Code Quality
Stage: Unit Tests
Stage: legacy_test
Stage: docs
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+3
-6
3 additions, 6 deletions
.gitlab-ci.yml
noxfile.py
+28
-12
28 additions, 12 deletions
noxfile.py
pyproject.toml
+3
-1
3 additions, 1 deletion
pyproject.toml
with
34 additions
and
19 deletions
.gitlab-ci.yml
+
3
−
6
View file @
c92190d2
...
@@ -311,14 +311,11 @@ tests-and-coverage:
...
@@ -311,14 +311,11 @@ tests-and-coverage:
build-documentation
:
build-documentation
:
image
:
i10git.cs.fau.de:5005/pycodegen/pycodegen/
full:cupy12.3
image
:
i10git.cs.fau.de:5005/pycodegen/pycodegen/
nox:ubuntu24.04-cuda12
stage
:
docs
stage
:
docs
needs
:
[]
needs
:
[]
before_script
:
-
pip install -e .[doc]
script
:
script
:
-
cd docs
-
nox --session docs
-
make html SPHINXOPTS="-W --keep-going"
tags
:
tags
:
-
docker
-
docker
-
cuda11
-
cuda11
...
@@ -328,7 +325,7 @@ build-documentation:
...
@@ -328,7 +325,7 @@ build-documentation:
pages
:
pages
:
image
:
i10git.cs.fau.de:5005/pycodegen/pycodegen/full
image
:
alpine:latest
stage
:
deploy
stage
:
deploy
needs
:
[
"
tests-and-coverage"
,
"
build-documentation"
]
needs
:
[
"
tests-and-coverage"
,
"
build-documentation"
]
script
:
script
:
...
...
This diff is collapsed.
Click to expand it.
noxfile.py
+
28
−
12
View file @
c92190d2
...
@@ -15,7 +15,7 @@ def get_cuda_version() -> None | tuple[int, ...]:
...
@@ -15,7 +15,7 @@ def get_cuda_version() -> None | tuple[int, ...]:
result
=
subprocess
.
run
(
smi_args
,
capture_output
=
True
)
result
=
subprocess
.
run
(
smi_args
,
capture_output
=
True
)
except
FileNotFoundError
:
except
FileNotFoundError
:
return
None
return
None
smi_output
=
str
(
result
.
stdout
).
splitlines
()
smi_output
=
str
(
result
.
stdout
).
splitlines
()
cuda_version
=
smi_output
[
-
1
].
split
(
"
:
"
)[
1
].
strip
()
cuda_version
=
smi_output
[
-
1
].
split
(
"
:
"
)[
1
].
strip
()
return
tuple
(
int
(
v
)
for
v
in
cuda_version
.
split
(
"
.
"
))
return
tuple
(
int
(
v
)
for
v
in
cuda_version
.
split
(
"
.
"
))
...
@@ -45,18 +45,16 @@ def typecheck(session: nox.Session):
...
@@ -45,18 +45,16 @@ def typecheck(session: nox.Session):
session
.
run
(
"
mypy
"
,
"
src/pystencils
"
)
session
.
run
(
"
mypy
"
,
"
src/pystencils
"
)
@nox.parametrize
(
@nox.parametrize
(
"
cupy_version
"
,
[
None
,
"
12
"
,
"
13
"
],
ids
=
[
"
cpu
"
,
"
cupy12
"
,
"
cupy13
"
])
"
cupy_version
"
,
[
None
,
"
12
"
,
"
13
"
],
ids
=
[
"
cpu
"
,
"
cupy12
"
,
"
cupy13
"
]
)
@nox.session
(
python
=
"
3.10
"
,
tags
=
[
"
test
"
])
@nox.session
(
python
=
"
3.10
"
,
tags
=
[
"
test
"
])
def
testsuite
(
session
:
nox
.
Session
,
cupy_version
:
str
|
None
):
def
testsuite
(
session
:
nox
.
Session
,
cupy_version
:
str
|
None
):
if
cupy_version
is
not
None
:
if
cupy_version
is
not
None
:
cuda_version
=
get_cuda_version
()
cuda_version
=
get_cuda_version
()
if
cuda_version
is
None
or
cuda_version
[
0
]
<
11
:
if
cuda_version
is
None
or
cuda_version
[
0
]
<
11
:
session
.
skip
(
"
No compatible installation of CUDA found - Need at least CUDA 11
"
)
session
.
skip
(
"
No compatible installation of CUDA found - Need at least CUDA 11
"
)
cuda_major
=
cuda_version
[
0
]
cuda_major
=
cuda_version
[
0
]
cupy_package
=
f
"
cupy-cuda
{
cuda_major
}
==
{
cupy_version
}
"
cupy_package
=
f
"
cupy-cuda
{
cuda_major
}
==
{
cupy_version
}
"
session
.
install
(
cupy_package
)
session
.
install
(
cupy_package
)
...
@@ -68,12 +66,30 @@ def testsuite(session: nox.Session, cupy_version: str | None):
...
@@ -68,12 +66,30 @@ def testsuite(session: nox.Session, cupy_version: str | None):
session
.
run
(
session
.
run
(
"
pytest
"
,
"
pytest
"
,
"
-v
"
,
"
-v
"
,
"
-n
"
,
str
(
num_cores
),
"
-n
"
,
str
(
num_cores
),
"
--cov-report=term
"
,
"
--cov-report=term
"
,
"
--cov=.
"
,
"
--cov=.
"
,
"
-m
"
,
"
not longrun
"
,
"
-m
"
,
"
--html
"
,
"
test-report/index.html
"
,
"
not longrun
"
,
"
--junitxml=report.xml
"
"
--html
"
,
"
test-report/index.html
"
,
"
--junitxml=report.xml
"
,
)
)
session
.
run
(
"
coverage
"
,
"
html
"
)
session
.
run
(
"
coverage
"
,
"
html
"
)
session
.
run
(
"
coverage
"
,
"
xml
"
)
session
.
run
(
"
coverage
"
,
"
xml
"
)
@nox.session
(
python
=
[
"
3.10
"
],
tags
=
[
"
docs
"
])
def
docs
(
session
:
nox
.
Session
):
"""
Build the documentation pages
"""
editable_install
(
session
,
[
"
doc
"
])
session
.
chdir
(
"
docs
"
)
session
.
run
(
"
make
"
,
"
html
"
,
external
=
True
,
env
=
{
"
SPHINXOPTS
"
:
"
-W --keep-going
"
}
)
This diff is collapsed.
Click to expand it.
pyproject.toml
+
3
−
1
View file @
c92190d2
...
@@ -57,7 +57,9 @@ doc = [
...
@@ -57,7 +57,9 @@ doc = [
'sphinx_autodoc_typehints'
,
'sphinx_autodoc_typehints'
,
'pandoc'
,
'pandoc'
,
'sphinx_design'
,
'sphinx_design'
,
'myst-nb'
'myst-nb'
,
'matplotlib'
,
'graphviz'
,
]
]
testsuite
=
[
testsuite
=
[
'pytest'
,
'pytest'
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment