Developer’s guide

This API-REST was developped with python 3.10.6 with the version 2.1.0 of pygoslin.


Dependencies required

This API rests on several dependencies :

Note

All theses dependencies are listed in the requierements.txt file and can be install at once with the command :

$ pip install -r requierements.txt

Unit and functional testing

Unit and functional tests are in the tests directory. To run all tests, use the following command :

$ make tests

If you already set up a virtual environment with all the required dependencies, you can use this command instead from the API root directory :

$ python3 -m unittest tests/test_*

Code organisation

.
├── conf
│   ├── goslin_about.json
│   ├── goslin_doc.yaml
│   └── lipid-list.csv
├── doc
│   ├── conf.py
│   ├── developers_guide.rst
│   ├── functions.rst
│   ├── home.rst
│   ├── index.rst
│   ├── output.rst
│   ├── request_with_python.rst
│   └── vars.rst
├── Dockerfile
├── main
│   ├── goslin_fct.py
│   ├── goslin_rest.py
│   ├── messages.py
│   └── vars.py
├── Makefile
├── README.md
├── requirements.txt
└── tests
   ├── test_argument.py
   ├── test_fct_goslin.py
   └── test_unit_goslin.py
conf

Directory containing the configuration files

  • goslin_about.json : Template JSON with the metadata on the microservice and the tool.

  • goslin_doc.yaml : YAML file configuring the Swagger documentation following the OpenAPI 3.0 standard.

  • lipid-list.csv : CSV file containing the lipid class supported by the tool.

doc

Directory containing the documentation

main

Code of this Goslin REST-API

  • goslin_fct : Module containing core functions used by the REST-API.

  • goslin_rest : Module defining and configuring the REST-API.

  • messages : Module defining messages that can me returned by the REST-API.

  • vars : Module defining variables used by the REST-API

tests

Unit and functional tests

  • test_argument : Tests for the arguments that can be used when running the REST-API.

  • test_fct_goslin : Fonctional tests of the REST-API.

  • test_unit_goslin : Unit tests of the REST-API.


Functions and variables