Package: cdslib-agents
CDSLib - AgentsWelcome toCDSLib - Agentspackage.LicenseSponsorsCode quality metricsDescriptionAs part of theContagious Disease Simulation Library, theCDSLib - Agentspackage is intended to be used for modelling and simulating
contagious diseases using Agent-Based Models and it has been used for the development
of theContagious Disease Simulation Laboratory.The package consists of different implementations of a heterogeneous population
of agents following rules of behavior that determine their movement and the evolution
of their infectious and clinical states.The current implementation allows Agents to move in a bidemensional space following
a distribution of velocities based on population data. This can be achieved thanks to
the inclusion Distribution module which is a wrapper for different tools that provides
distribution-like function support.In regards to the disease states, the current implementation also allows the user to
add as much states as preferred, and to create custom natural history of the disease
(i.e. the design a custom graph for evolution of disease states).For more information, please refer to the official documentation of the project.TestingAll the tests were developed with the python tool pytest. To see them properly, type
in the command line:$ poetry run pytest <name_of_test_file>in the same ubication of the test file.Flags are used with pytest for modifying the aspect of the output
report. Typing flags using pytest might be tedious, however, it is possible modify thepytest.initfile forchange defaulting command line options. This allows to adopt as many flags
as necesary. In our case, it was adopted the flags:-s,--no-header,-rA,-vv,--cov,--cov-branch.During test execution with pytest, any output sent to stdout and stderr iscaptured. The-sflagdisable all capturing and lets the user look at all the outputs, this is very
important because the description of all tests was typed in the docstring of each method.The--no-headerflag disables theinitial header.The-rAflag shows extra testsummary infoof all the tests.The-vvflag indicates to pytest run inverbositymode, this controls all the pytest outputs.The flag--covproduces acoveragereports. It shows the percentage of code lines covered by the test, while--cov-branchshows the branches covered. A branch is
a decision taken by the code when it finds an if sentence or similar.For more information aboutpytest flags.Instead of running one test, it is possible to run all the tests at the same time. You must be inside oftestsdirectory, and type in the command line:$ poetry run pytestSo as to Modify the initial conditions of the test, use the fixtures methods at the beginning
of all the tests files.Authors and main contributorsThis package is authored byCamilo Hincapié(main author),Ian Mejía,Emil Rueda,Nicole RiveraandCarolina Rojas Duqueand the conceptual contributions about epidemiology ofLina Marcela Ruiz Galvis.Other remarkably contributors to this work wereAlejandro CampilloandDaniel Alfonso Montoya.Contact usFor any suggestion on the development of this type of models, please our official
channels ofdicussionsprovided by GitHub.DevelopmentCreate the virtualenvThis package is managed usingPyenvandPoetry. In order to create the
virtualenv correctly use:$ pyenv install 3.9.7
$ poetry env use 3.9.7
$ poetry installThen activate the virtualenv runningpoetry shell, and to deactivate the virtual
environment and exit this new shell typeexit.