Skip to content

Exceltior/immuni-backend-common

 
 

Repository files navigation

Immuni Backend Common


Table of contents

Context

This repository contains the source code common to all of Immuni's backend services. Before proceeding, we recommend reading their documentation first:

Please take the time to read and consider the other repositories in full before digging into the source code or opening an Issue. They contain a lot of details that are fundamental to understanding the source code and this repository's documentation.

The common logic aims to consistently provide the following:

  • The Sanic App creation logic
  • The Celery App creation logic
  • The Prometheus monitoring logic and common metrics
  • The Python packages dependencies, with optional extras
  • The Python packages dev-dependencies
  • The Dockerfile
  • The linters configurations, and a consistent way to invoke them

Installation

This repository is not meant to be used as a standalone. On the contrary, it assumes the following:

  • It is used as a Git submodule of any of the various Immuni backend services
  • The folder containing the submodule is named common

To leverage the common logic in any of Immuni’s backend services, the following is added into their pyproject.toml:

[tool.poetry.dependencies]
immuni-common = { path = "common", develop = true, extras = ["aioredis", "celery"] }

[tool.poetry.dev-dependencies]
immuni-common-dev = { path = "common/dev", develop = true }

[tool.poetry.scripts]
checks = "common.scripts:checks"

The specific Immuni backend service specifies any extras that it requires to run.

For more information about how the project is generated and structured, please refer to the Contributing section below.

Contributing

Contributions are most welcome. Before proceeding, please read the Code of Conduct for guidance on how to approach the community and create a positive environment. Additionally, please read our CONTRIBUTING file, which contains guidance on ensuring a smooth contribution process.

The Immuni project is composed of different repositories—one for each component or service. Please use this repository for contributions strictly relevant to Immuni's backend services. To propose a feature request, please open an issue in the Documentation repository. This lets everyone involved see it, consider it, and participate in the discussion. Opening an issue or pull request in this repository may slow down the overall process.

Contributors

Here is a list of Immuni's contributors. Thank you to everyone involved for improving Immuni, day by day.

Licence

Authors / Copyright

Copyright 2020 (c) Presidenza del Consiglio dei Ministri.

Please check the AUTHORS file for extended reference.

Third-party component licences

Please see the Technology Description’s Backend Services Technologies section, which also lists the corresponding licences.

Licence details

The licence for this repository is a GNU Affero General Public Licence version 3 (SPDX: AGPL-3.0). Please see the LICENSE file for full reference.

About

Common repository for the app backend

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 97.0%
  • Dockerfile 3.0%