Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Data Request Broker

This python module includes data model implementation of DRB (Data Request Broker). Implementations are provided outside this project and shall be included into the application according to the needs.

Library usage

Installing drb with execute the following in a terminal:

pip install drb

Notes for developers

pipeline status coverage made-with-python security: bandit security: semgrep

Dev environment setup

The development environment includes all the features required to execute this module unitary test and to deploy it. When loading the project with pycharm, the tool automatically reads requirements file and sets up the virtual environment.

Installation of a virtual environment is not mandatory but greatly recommended in order to avoid any confusion between system or other projects libraries. Linux package python3-venv shall be installed (sudo apt install python3-venv on ubuntu)

The command line to prepare the virtual environment:

python3 -m venv venv
source venv/bin/activate

Once successfully run, the command line prompt is updated with the virtual environment name:

(venv) $~> _

Once the virtual environment installed, the dependencies shall be downloaded:

(venv) $~> pip install -r requirements.txt --no-cache-dir
Collecting pip==21.1.2
  Downloading pip-21.1.2-py3-none-any.whl (1.5 MB)
     |████████████████████████████████| 1.5 MB 54 kB/s 
Collecting setuptools==57.0.0
  Downloading setuptools-57.0.0-py3-none-any.whl (821 kB)
     |████████████████████████████████| 821 kB 73 kB/s 
Installing collected packages: pip, setuptools
  Attempting uninstall: pip
    Found existing installation: pip 20.0.2
    Uninstalling pip-20.0.2:
      Successfully uninstalled pip-20.0.2
  Attempting uninstall: setuptools
    Found existing installation: setuptools 44.0.0
    Uninstalling setuptools-44.0.0:
      Successfully uninstalled setuptools-44.0.0
Successfully installed pip-21.1.2 setuptools-57.0.0

At this stage the environment is installed.

Other environment virtualization solution such as Vagrant are also stable solutions for production.

Git Contributions

Contribution process

We are pleased to receive all users contributions as merge requests. Each contribution shall be documented in english, and code styling shall follow pep8 recommendations. You can also join the moderators team. Please contact me.

Contribution process is based on gitlab best practice and processes the following schema:

How to contribute

For authorized user allowed creating branch in the official repository and for the project launch stage. Starting from 24/08/2021 the contribution branching strategy was changed. Contributor is not anymore obliged to create its own fork. He can create a feature/debug branch into the official repository. Contributor still cannot push modification into the main branch, and shall submit a merge request to be approved and merged by the maintainers. So the step-by-step procedure to contribute is:

  • Locally clone the official repository with the command line : git clone git@gitlab.com:gael10/drb/drb-python/drb.git
  • Implement features into feature-xxx branch, and bug into bug-xxx branch.
  • Once created the branch could be submitted as merge request as Draft proposal.
  • Once feature/bug finalized, Draft flag shall be removed and the assignees/maintainers notified for merge.

Other contributions merge requests can also be submitted from users private forks of the projet.

Configuration management

Thanks to the versioneer tool, the release process has been simplified. The version management and deployment are coupled and can be performed in a same process. This process secures the deployment process preventing a developer from accidentally deploying and erasing a release version. Versioneer tool checks the local repository then generates a dirty release when repository is not clean. This process can also be useful when developer needs to deploy snapshots.

Setup the environment

The environment shall be configured to deploy the python library onto the Gael's private Pypi repository. The application used to manage module deployment is twine. This application shall be configured via ${HOME}/.pypirc file as followed:

[distutils]
index-servers =
  pypi
  gael

[pypi]
repository = https://upload.pypi.org/legacy/

[gael]
repository: https://repository.gael-systems.com/repository/python-gael/
username: username
password: password

The important part is the gael section which defines the remote repository and credentials for the deployment. As it is coupled to the git environment versioneer tool that has been already installed into the project repository and is a part of this source code.

Perform the release and deployment

The version management is performed automatically with git tags. Setting the version is now coupled with the deployment process within the CI/CD process.

To generate a new version, tag the master branch with the expected version, then deploy the local folder as usual.

git tag 1.0-rc1
git push origin 1.0-rc1

A dedicated release branch can be created starting from this tag when necessary (i.e. when main branch diverged, and a hotfix is required)

Command line

The environment comes with a preconfigured Makefile able to set up and prepare python environment to run tests and coverage. It also provides target to deploy new release manually.

make clean

Clean-up the environment from cache and lightweight components. It does not removed downloaded dependencies (from venv directory), nor distributions.

make dist-clean

The dist-clean command full cleans the repository as it has been cloned first. Following the call of dist-clean the virtual environment and all the caches will be removed.

make test

Run the unitary tests.

make lint

Check if the source code properly follows the pep8 directives. This test is also used in gitlab piplines to accept pushed sources.

make coverage

Run the test coverage and generates a html report into htmlcov directory.

make dist

Prepare a distribution locally into dist directory. When no tag is present on the current commit, or modified files are present into the local directory, the distribution process creates a dirty version to be safety deploy to the repository.

make dist-deploy

Prepare and deploy a distribution into the gael's remote Pipy repository. This command is run automatically when pushing a new tag.

Metadata

Release files for drb 1.0a1

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

Built distribution (wheel)

Table of built distributions (wheels) for drb 1.0a1
File Interpreter ABI Platform Actions
drb-1.0a1-py3-none-any.whl Python 3 none any Details for drb-1.0a1-py3-none-any.whl

Release files / drb-1.0a1-py3-none-any.whl

Download URL drb-1.0a1-py3-none-any.whl
Size 17.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7dc68c3f26039e7376f916747fef03ffdb1466d3f2e9becc69947811b17a1eb6
BLAKE2b-256 checksum
How to use checksums
62a65b1553110a4ca2b31b01708d1c5304f6dfe2dcfde176701a2b75da8c185d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

Security for drb 1.0a1

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.

Release history Release notifications | RSS feed

This release
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