Skip to content

Latest commit

 

History

History
73 lines (47 loc) · 1.39 KB

setting_up_the_environment.md

File metadata and controls

73 lines (47 loc) · 1.39 KB

Setting up the development environment

Requirements

The project requires the following:

  • Python 3.7 or above

Creating the virtual environment

Before creating a virtual environment, ensure that the virtualenv package has been installed. This can be installed with:

pip install virtualenv

Once virtualenv has been installed. A new virtual environment can be created with:

python3 -m venv env

Then activate the virtual environment with:

# For Windows
./env/Scripts/activate

# For Linux / MacOS
source env/bin/activate

Once the virtual environment has been activated, install the development dependencies:

pip install -r requirements-dev.txt

Unit Tests

This project uses unittest and coverage. To run the tests with coverage, use:

coverage run -m unittest

The coverage report can then be shown with:

coverage report -m

Coding Standards

This project uses the PEP 8 coding standard. To run the pycodestyle linter, use:

pycodestyle .

This project also uses pylint to run static code analysis checks using the Google Python Style Guide configuration.

To run the check over the Yamlator source code:

pylint yamlator/

Then to apply this check to the test cases:

pylint tests/