Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add to docs a procedure note on code_tests #402

Merged
merged 3 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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`.
Loading