Developer’s notes

Getting Started For Developers

Warning

the following guide is used only if you want to develop the rlagent package. If you just want to write code that uses it externally, you should rather install it as explained there.

This guide assumes you are using the Anaconda Python distribution, installed locally (miniconda should also work).

Step 1: Set up your package environment

In your terminal, change to the directory where you cloned rlagent, and type:

conda env create -f environment.yml

This will create a conda virtual environment called rlagent-dev with all the Accenta RL Agent Example dependencies and a few useful packages for development and interaction.

If you want to give a different name to this environment, replace the previous command by:

conda env create -n NAME_OF_THE_ENVIROMENT -f environment.yml

and don’t forget to adapt the following commands.

You can check the virtual environment has been successfully created with the following command:

conda env list

Next, switch to this new virtual environment:

  • On Windows, in your Anaconda Prompt, run activate rlagent-dev

  • On MacOSX and Linux, in your Terminal, run source activate rlagent-dev

You will need to type that last command any time you open a new terminal to activate the virtual environment (you can of course install everything into the base Anaconda environment without creating a virtual environment, but then you may have trouble if you want to install other packages with different requirements on the dependencies).

If you want to see the list of packages installed in the virtual environment, type:

conda list -n rlagent-dev

If later you want to leave the rlagent-dev virtual environment:

  • On Windows, in your Anaconda Prompt, run deactivate

  • On MacOSX and Linux, in your Terminal, run source deactivate

Also if you want to completely remove this environment from your system, you can type:

conda remove --name rlagent-dev --all

See https://conda.io/docs/user-guide/tasks/manage-environments.html for more information on Anaconda virtual environments.

Step 2: Setup Accenta RL Agent Example for development

Now setup this cloned version for development. The following command will make symlinks in your python library directory to your Accenta RL Agent Example installation (it creates a .pth file, there is no need to set PYTHONPATH, in fact it should be blank to avoid other problems). From then on, all the Accenta RL Agent Example binaries and the library itself will be usable from anywhere.

For Linux/MacOSX users, type:

python3 setup.py develop

or as a shorter alternative:

make develop

For Windows users, type:

py setup.py develop

If you want to remove the

Bug reports

To search for bugs or report them, please use the Bug Tracker at:

Contribute

This project is written for Python 3.x. Python 2.x is not supported.

The TODO.md file contains the TODO list.

All contributions should at least comply with the following PEPs:

  • PEP8 “Python’s good practices”

  • PEP257 “Docstring Conventions”

  • PEP287 “reStructuredText Docstring Format”

All contribution should be properly documented and tested with unittest and/or doctest.

pylint, pep8 and pyflakes should also be used to check the quality of each module.

Docstrings should be compatible with the Sphinx “napoleon” extension and follow the Numpy style:

Changes