No project description provided
Project description
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
- Run all tests
- Run pre-commit:
pre-commit run
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file umcn_consent-2.0.0rc1.tar.gz.
File metadata
- Download URL: umcn_consent-2.0.0rc1.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34cc6d490369f37c74c62ca96fdb4cfde6f9fcca36ddcffd0a2b04331fdccc6c
|
|
| MD5 |
290e986b1b803ac500ddc2283d2a99a1
|
|
| BLAKE2b-256 |
51c8b7eec7809065b3a9bbb0efb621acc184dbc55f42f270936c8e0366c1e89f
|
File details
Details for the file umcn_consent-2.0.0rc1-py3-none-any.whl.
File metadata
- Download URL: umcn_consent-2.0.0rc1-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49acb245242f5a11439f772d1a36ae2fb1dcd58660292632a138ff080dcb6633
|
|
| MD5 |
7dc6a40628536bcbba6b5823dd6d6e18
|
|
| BLAKE2b-256 |
da799b1ae305f023e15649a45cdda85441ffa1103d9f73cfaaeea98915474fd5
|