We recommend working on a feature branch and pull request from there.
poetry,PyCharm(recommended).
Make sure your environment contains all the updated versions of the dependencies.
From an OpenSquirrel checkout:
$ poetry shell
$ poetry install
And that you base your feature branch off an updated develop.
From a poetry shell (started from an OpenSquirrel checkout):
$ git checkout develop
$ git fetch origin
$ git pull
$ git branch <feature branch name>
Make sure the tests and the following linters pass.
From a poetry shell (started from an OpenSquirrel checkout):
$ poetry run mypy opensquirrel test --strict
$ poetry run pytest . -vv
$ poetry run ruff check --fix
$ poetry run ruff format
You can choose the Python interpreter from the poetry environment.
- Go to
Settings>Project: OpenSquirrel>Python Interpreter. - Click on
Add Interpeter, and then selectAdd Local Interpreter. - Select
Poetry Environment, and thenExisting environment. - Click on
...to navigate to theInterpreterbinary.
To run/debug all tests:
- Right-click on the
testfolder of the Project tree. - Click
Run 'pytest' in testorDebug 'pytest' in test.
This will also create a Run/Debug Configuration.
If breakpoints are not hit during debugging:
- Go to
Run/Debug Configurations. - Add
--no-covin theAdditional argumentstext box.
This issue may be due to the code coverage module hijacking the tracing mechanism (check this link for a more detailed explanation).