Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pystencils-sfg
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
Package registry
Model registry
Operate
Environments
Terraform modules
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-sfg
Commits
425efea7
Commit
425efea7
authored
9 months ago
by
Frederik Hennig
Browse files
Options
Downloads
Patches
Plain Diff
Update CONTRIBUTING & test documentation
parent
3d41d1de
No related branches found
No related tags found
No related merge requests found
Pipeline
#69689
passed
9 months ago
Stage: Code Quality
Stage: Tests
Stage: Documentation
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CONTRIBUTING.md
+15
-2
15 additions, 2 deletions
CONTRIBUTING.md
tests/generator_scripts/test_generator_scripts.py
+5
-0
5 additions, 0 deletions
tests/generator_scripts/test_generator_scripts.py
with
20 additions
and
2 deletions
CONTRIBUTING.md
+
15
−
2
View file @
425efea7
...
@@ -15,8 +15,8 @@ As such, any submission of contributions via merge requests is considered as agr
...
@@ -15,8 +15,8 @@ As such, any submission of contributions via merge requests is considered as agr
### Fork and Clone
### Fork and Clone
To work within the
`pystencils-sfg`
source tree, first create a
*fork*
of this repository
on GitLab and create
To work within the
`pystencils-sfg`
source tree, first create a
*fork*
of this repository
a
local
clone o
f
your
f
ork.
a
nd
clone
it t
o your
w
ork
station
.
### Set up your dev environment
### Set up your dev environment
...
@@ -52,3 +52,16 @@ Both `flake8` and `mypy` are also run in the integration pipeline.
...
@@ -52,3 +52,16 @@ Both `flake8` and `mypy` are also run in the integration pipeline.
You can automate the code quality checks by running them via a git pre-commit hook.
You can automate the code quality checks by running them via a git pre-commit hook.
Such a hook can be installed using the
[
`install_git_hooks.sh`
](
install_git_hooks.sh
)
script located at the project root.
Such a hook can be installed using the
[
`install_git_hooks.sh`
](
install_git_hooks.sh
)
script located at the project root.
### Test Your Code
We are working toward near-complete test coverage of the module source files.
When you add code, make sure to include test cases for both its desired
and exceptional behavior at the appropriate locations in the
[
tests
](
tests
)
directory.
Unit tests should be placed under a path and filename mirroring the location
of the API they are testing within the
*pystencils-sfg*
source tree.
In
[
tests/generator_scripts
](
tests/generator_scripts
)
, a framework is provided to test entire generator scripts
for successful execution, correctness, and compilability of their output.
Read the documentation within
[
test_generator_scripts.py
](
tests/generator_scripts/test_generator_scripts.py
)
for more information.
This diff is collapsed.
Click to expand it.
tests/generator_scripts/test_generator_scripts.py
+
5
−
0
View file @
425efea7
...
@@ -44,6 +44,11 @@ class ScriptInfo:
...
@@ -44,6 +44,11 @@ class ScriptInfo:
return
self
.
script_name
return
self
.
script_name
"""
Scripts under test.
When adding new generator scripts to the `scripts` directory,
do not forget to include them here.
"""
SCRIPTS
=
[
SCRIPTS
=
[
ScriptInfo
.
make
(
"
Structural
"
,
(
"
h
"
,
"
cpp
"
)),
ScriptInfo
.
make
(
"
Structural
"
,
(
"
h
"
,
"
cpp
"
)),
ScriptInfo
.
make
(
"
SimpleJacobi
"
,
(
"
h
"
,
"
cpp
"
),
compilable_output
=
"
cpp
"
),
ScriptInfo
.
make
(
"
SimpleJacobi
"
,
(
"
h
"
,
"
cpp
"
),
compilable_output
=
"
cpp
"
),
...
...
This diff is collapsed.
Click to expand it.
Frederik Hennig
@da15siwa
mentioned in commit
cf2d5d53
·
9 months ago
mentioned in commit
cf2d5d53
mentioned in commit cf2d5d53451b87f6f049417877440fa61bafa0aa
Toggle commit list
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