Read this guide before doing development in
To set up the tools you’ll need for developing, you’ll need to install
skrobot in development mode. Start by installing the development
git clone https://github.com/iory/scikit-robot.git cd scikit-robot pip install -e .
Running Code Style Checks¶
You can use the
isort and the
flake8 commands to check whether or not your code follows the guidelines.
In order to avoid confusion from using different tool versions, we pin the versions of those tools.
Install them with the following command (from within the top directory of the Chainer repository):
$ pip install hacking pytest autopep8 isort
And check your code with:
$ autopep8 path/to/your/code.py $ flake8 path/to/your/code.py
autopep8 can automatically correct Python code to conform to the PEP 8 style guide:
$ autopep8 --in-place path/to/your/code.py
isort can automatically correct
$ cd scikit-robot && isort path/to/your/code.py
For more information, please see the flake8 documentation.
This project uses pytest, the standard Python testing framework. Their website has tons of useful details, but here are the basics.
To run the testing suite, simply navigate to the top-level folder
scikit-robot and run the following command:
pytest -v tests
You should see the testing suite run. There are a few useful command line options that are good to know:
-s- Shows the output of
stdout. By default, this output is masked.
--pdb- Instead of crashing, opens a debugger at the first fault.
--lf- Instead of running all tests, just run the ones that failed last.
--trace- Open a debugger at the start of each test.
You can see all of the other command-line options here.
pytest will look in the
tests folder recursively.
It will run any function that starts with
test_ in any file that starts
test_. You can run
pytest on a directory or on a particular file
by specifying the file path:
pytest -v tests/skrobot_tests/coordinates_tests/test_math.py
scikit-robot’s documentation, go to the
docs directory and run
make with the appropriate target.
cd docs/ make html
will generate HTML-based docs, which are probably the easiest to read.
The resulting index page is at
If the docs get stale, just run
make clean to remove all build files.