Skip to content

First steps for developers

Carlos Ramos Carreño edited this page Feb 23, 2024 · 3 revisions

This documentation is intended to be useful for future developers of scikit-fda. Please read it carefully.

1. Clone the repository

The first step is to clone the repository to your local machine. Go to your preferred directory for git projects (such as ~/git) and execute

git clone https://github.com/GAA-UAM/scikit-fda.git

2. Setup Python

You should install a Python distribution different from the one used by your system programs, in order not to disturb them. A good option is Miniconda, a minimal Conda installation. If you plan to work on several Python projects, it is also advisable to use different environments for each of them.

Install the project from source

You then need to change to the cloned directory and install the project using the following commands while inside your environment:

cd scikit-fda
pip install -e .

Note the -e (editable) option! This ensures that your changes are applied to the installed version, so that you don't need to reinstall it after every modification.

3. Execute tests locally

To ensure that everything works properly, you need to execute the test suite. First install Pytest using

pip install pytest

and then inside the clone directory execute

pytest

This will execute the tests. You will see the files where the tests are found, and a green dot for each test that passes. A yellow "s" indicates skipped tests and failed tests are shown with a red "F".

4. Generate documentation locally

The documentation can also be generated locally. It is recommended to do that when you change docstrings or examples, before submitting the final version. In order to be able to generate the documentation you will need to install Sphinx as well as a few plugins. All the necessary packages for the documentation are listed inside the optional dependence docs, so you can install them as:

pip install ".[docs]"

Then, from the project directory, you can generate the online documentation by doing:

cd docs
make html

The generated documentation will then be inside the _build/html subdirectory of docs.

5. Install and configure your IDE

It is recommended to use an IDE for your development. With an IDE you can automate some tasks, such as code formatting, and Mypy and flake8 running. They usually also provide several useful functionalities, such as search, code completion and refactor tools, or more user-friendly integration with Git. The choice of IDE is not mandated, choose what you are more comfortable with. In order to configure your IDE for the needs of the project take a look at the IDE configuration page. If that page does not have your IDE but you know how to configure it, please update the page to add that information.