Skip to content

Commit

Permalink
Add code_tests.md to document os.environ["LOG_INFO"] = "1" for ctest (#…
Browse files Browse the repository at this point in the history
…402)

Co-authored-by: Doruk Ardağ <[email protected]>
  • Loading branch information
metdyn and Dooruk authored Aug 8, 2024
1 parent 56514b0 commit 8070caa
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
- [Task infrastructure](task_infrastructure.md)
- [Tasks](tasks.md)

- Code test before pull request

- [Code Tests](code_tests/code_tests.md)


- Governance

- [Requirements](requirements.md)
Expand Down
9 changes: 9 additions & 0 deletions docs/code_tests/code_tests.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## Ready to create a pull request to SWELL?

Here are a few steps the CI test will run online after your PR, but it can be easier if you run on your terminal before hand.

- Python coding norms: run `python pycodestyle_run.py` at your swell root directory and resolve potential code style issues

- Code test: run `swell test code_tests`. The `swell/test/code_tests/code_tests.py` will test unused variables.
- If you get `assert tq_dicts_rc == 0; AssertionError`, that means your `tasks/task_questions.yaml` source code needs to be updated with the regenerated ymal file, e.g., named '/tmp/task_questions_RKznhVXN.yaml'. If you do not see the print-out information following the error code, check
Line 28 of `swell/test/code_tests/code_tests.py`, which may read `os.environ["LOG_INFO"] = "0" # Set this to 1 when errors are being debugged `. Set its value to `1`, rebuild swell, and run again `swell test code_tests`.

0 comments on commit 8070caa

Please sign in to comment.