From af36dd18c80711937ad74f4e2cbbddda05f30de3 Mon Sep 17 00:00:00 2001 From: Thomas Guyet <thomas.guyet@inria.fr> Date: Mon, 3 Mar 2025 10:53:07 +0100 Subject: [PATCH] reformat files with black --- Marie/Simu_VICAN.py | 13 +++++-------- Marie/pathways.py | 6 +++--- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/Marie/Simu_VICAN.py b/Marie/Simu_VICAN.py index 5ed2a08..98542c6 100644 --- a/Marie/Simu_VICAN.py +++ b/Marie/Simu_VICAN.py @@ -1,25 +1,22 @@ -##### Simulation âge - +"""Script for simulating a database inspired by the VICAN study (breast cancer)""" +import logging +import random as rd import numpy as np import pandas as pd from scipy.stats import truncnorm, bernoulli -import random as rd from pathways import P1, P2, P3, P4, P5, P6, P7, P8, P9, P10 from SNDSGenerator.simuExternal import simuExternal from SNDSGenerator.simulationDB import simDB -import logging +# pylint: disable=C0103,C0116 logging.basicConfig(filename="debug.log", encoding="utf-8", level=logging.DEBUG) - -### Profil 1 - # Nombre total de points à générer # total_points = 10500 -total_patients = 105 +total_patients = 10500 # Définition des proportions pour chaque tranche d'âge proportions = [0.2143, 0.2571, 0.2857, 0.2429] diff --git a/Marie/pathways.py b/Marie/pathways.py index e5008d0..12ca493 100644 --- a/Marie/pathways.py +++ b/Marie/pathways.py @@ -1221,7 +1221,7 @@ class CT_bi(pathwayInjector): # change the type of ATC drugs (bitherapy) ucd_list = list(self.code_CT_ATC.keys()) ucd_list.remove(self.ucd_atc) - self.ucd_atc = rd.choice( ucd_list ) + self.ucd_atc = rd.choice(ucd_list) self.ucd = rd.choice(self.code_CT_ATC[self.ucd_atc]) nb = int(rd.uniform(2, 5)) for _ in range(nb): @@ -1610,7 +1610,7 @@ class P7(pathwayInjector): # choose another drug code for CT (bitherapy) ucd_list = list(therapy_phase1.code_CT_ATC.keys()) ucd_list.remove(therapy_phase1.ucd_atc) - ucd_atc = rd.choice( ucd_list ) + ucd_atc = rd.choice(ucd_list) ucd = rd.choice(therapy_phase1.code_CT_ATC[ucd_atc]) while i < 12: care = ShortHospStay(patient, self.sim.etablissements[0], "Z511") @@ -1767,7 +1767,7 @@ class P8(pathwayInjector): # choose another drug code for CT (bitherapy) ucd_list = list(therapy_phase1.code_CT_ATC.keys()) ucd_list.remove(therapy_phase1.ucd_atc) - ucd_atc = rd.choice( ucd_list ) + ucd_atc = rd.choice(ucd_list) ucd = rd.choice(therapy_phase1.code_CT_ATC[ucd_atc]) while i < 12: care = ShortHospStay(patient, self.sim.etablissements[0], "Z511") -- GitLab