Skip to main content

No project description provided

Project description

CI PyPI PyPI - Python Version Code style: black

UMCN_Consent

A Python layer for UMCN research usage consent systems

Installation

pip install git+ssh://git@github.com:ResearchBureau/umcn-consent.git

Usage

Set USER, PASWORD, CLIENT_ID and URL in your local environment

To check consent status for a patient:

import os
from umcn_consent.auth import authenticate
from umcn_consent.core import AuthenticatedClient


session = authenticate(username=os.getenv("USER"),
                       password=os.getenv("PASSWORD"),
                       client_id=os.getenv("CLIENT_ID"))

client = AuthenticatedClient(session=session, url=os.getenv("URL"))
client.has_given_consent(pid="12345") 

see examples/example.py

Contributing

How to contribute to this repo

Get the code

Fork this repo, create a feature branch

Set up environment

umcn_consent uses uv for dependency and package management

  • Install uv (see uv docs)

  • Create a virtual env. Go to the folder where you cloned umcn_consent and use

    uv sync 
    
  • Install pre-commit hooks.

    pre-commit install
    

Add your code

Make your code contributions. Make sure document and add tests for new features. To automatically publish to pypi, increment the version number and push to master. See below.

Lint your code

Publish

Create a pull request: https://github.com/ResearchBureau/umcn_consent/pulls

Incrementing the version number

A merged pull request will only be published to pypi if it has a new version number. To bump umcn_consent's version, do the following:

  • umcn_consent uses semantic versioning Check whether your addition is a PATCH, MINOR or MAJOR version.

  • Manually increment the version number: pyproject.toml -> version = "0.1.2"

  • Add a brief description of your updates new version to HISTORY.md

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

umcn_consent-2.0.0rc1.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

umcn_consent-2.0.0rc1-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page