Skip to main content

CDSLib - Agents

Welcome to CDSLib - Agents package.

Open Source Love svg2 PyPI PyPI - Python Version Maintenance GitHub contributors

License

license

Sponsors

Sponsored by Sponsored by Sponsored by
UdeA logo Minciencias logo Sena logo

Code quality metrics

Quality Gate Status Bugs Code Smells Coverage Duplicated Lines (%) Lines of Code Maintainability Rating Reliability Rating Security Rating Technical Debt Vulnerabilities

Description

As part of the Contagious Disease Simulation Library, the CDSLib - Agents package is intended to be used for modelling and simulating contagious diseases using Agent-Based Models and it has been used for the development of the Contagious 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.

Testing

All 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 the pytest.init file for change 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 is captured. The -s flag
disable 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-header flag disables the initial header.

The -rA flag shows extra test summary info of all the tests.

The -vv flag indicates to pytest run in verbosity mode, this controls all the pytest outputs.

The flag --cov produces a coverage reports. It shows the percentage of code lines covered by the test, while --cov-branch shows the branches covered. A branch is a decision taken by the code when it finds an if sentence or similar.

For more information about pytest flags.

Instead of running one test, it is possible to run all the tests at the same time. You must be inside of tests directory, and type in the command line:

$ poetry run pytest

So as to Modify the initial conditions of the test, use the fixtures methods at the beginning of all the tests files.

repo_logo

Authors and main contributors

GitHub contributors

This package is authored by Camilo Hincapié (main author), Ian Mejía, Emil Rueda, Nicole Rivera and Carolina Rojas Duque and the conceptual contributions about epidemiology of Lina Marcela Ruiz Galvis.

Other remarkably contributors to this work were Alejandro Campillo and Daniel Alfonso Montoya.

Contact us

For any suggestion on the development of this type of models, please our official channels of dicussions provided by GitHub.

Development

Create the virtualenv

This package is managed using Pyenv and Poetry. In order to create the virtualenv correctly use:

$ pyenv install 3.9.7
$ poetry env use 3.9.7
$ poetry install

Then activate the virtualenv running poetry shell, and to deactivate the virtual environment and exit this new shell type exit.

Metadata

Release files for cdslib-agents 0.0.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cdslib-agents 0.0.9
File Size Uploaded Provenance
cdslib_agents-0.0.9.tar.gz 134.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for cdslib-agents 0.0.9
File Interpreter ABI Platform
cdslib_agents-0.0.9-py3-none-any.whl Python 3 none any Details

Total release size: 203.1 kB

Release files / cdslib_agents-0.0.9.tar.gz

Download URL cdslib_agents-0.0.9.tar.gz
Size 134.8 kB
Tags Source
SHA-256 checksum
How to use checksums
af8c78d766797d588a287396a3cd3ebe43326e01cbaba23bbf7d9eb5d2836c17
BLAKE2b-256 checksum
How to use checksums
0451f05ddca76df506d31fd74e8d5cf96f16221015b393346b15238df2f985bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.10.0 Linux/5.13.0-44-generic

Release files / cdslib_agents-0.0.9-py3-none-any.whl

Download URL cdslib_agents-0.0.9-py3-none-any.whl
Size 68.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fd3046909c09239bdd7119c7bcb3c70f0133bd1dcaa0eb72a6e3cd18b1f7a2c1
BLAKE2b-256 checksum
How to use checksums
b52e6330dc0797c8f73cbc02b5e57c1899938e67a794316287bef2e440bd2793
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.10.0 Linux/5.13.0-44-generic

Security for cdslib-agents 0.0.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page