vivarium-public-health 3.0.4__py3-none-any.whl → 3.0.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- __version__ = "3.0.4"
1
+ __version__ = "3.0.5"
@@ -1,7 +1,7 @@
1
1
  """
2
- ===================
3
- Disability Observer
4
- ===================
2
+ ====================
3
+ Disability Observers
4
+ ====================
5
5
 
6
6
  This module contains tools for observing years lived with disability (YLDs)
7
7
  in the simulation.
@@ -102,7 +102,7 @@ class DisabilityObserver(PublicHealthObserver):
102
102
  )
103
103
  # Convert to SimpleCause instances and add on all_causes
104
104
  causes_of_disability = [
105
- SimpleCause.create_from_disease_state(cause) for cause in causes_of_disability
105
+ SimpleCause.create_from_specific_cause(cause) for cause in causes_of_disability
106
106
  ] + [SimpleCause("all_causes", "all_causes", "cause")]
107
107
 
108
108
  excluded_causes = (
@@ -1,7 +1,7 @@
1
1
  """
2
- ================
3
- Disease Observer
4
- ================
2
+ =================
3
+ Disease Observers
4
+ =================
5
5
 
6
6
  This module contains tools for observing disease incidence and prevalence
7
7
  in the simulation.
@@ -1,7 +1,7 @@
1
1
  """
2
- ==================
3
- Mortality Observer
4
- ==================
2
+ ===================
3
+ Mortality Observers
4
+ ===================
5
5
 
6
6
  This module contains tools for observing cause-specific and
7
7
  excess mortality in the simulation, including "other causes".
@@ -130,7 +130,7 @@ class MortalityObserver(PublicHealthObserver):
130
130
 
131
131
  # Convert to SimpleCauses and add on other_causes and not_dead
132
132
  self.causes_of_death = [
133
- SimpleCause.create_from_disease_state(cause) for cause in causes_of_death
133
+ SimpleCause.create_from_specific_cause(cause) for cause in causes_of_death
134
134
  ] + [
135
135
  SimpleCause("not_dead", "not_dead", "cause"),
136
136
  SimpleCause("other_causes", "other_causes", "cause"),
@@ -1,3 +1,13 @@
1
+ """
2
+ ===============
3
+ Basic Observers
4
+ ===============
5
+
6
+ This module contains convenience classes for building concrete observers in
7
+ public health models.
8
+
9
+ """
10
+
1
11
  from typing import Callable, List, Optional, Union
2
12
 
3
13
  import pandas as pd
@@ -1,12 +1,21 @@
1
+ """
2
+ ============
3
+ Simple Cause
4
+ ============
5
+
6
+ This module contains tools for creating a minimal representation of a cause
7
+ as required by observers.
8
+
9
+ """
10
+
1
11
  from dataclasses import dataclass
2
12
 
3
13
 
4
14
  @dataclass
5
15
  class SimpleCause:
6
- """A simple dataclass to represent the bare minimum information needed
7
- for observers, e.g. 'all_causes' as a cause of disability.
16
+ """A simple dataclass to represent the bare minimum information needed by observers.
8
17
 
9
- It also includes a class method to convert a provided disease state into a
18
+ It also includes a class method to convert a provided cause into a
10
19
  ``SimpleCause`` instance.
11
20
 
12
21
  """
@@ -19,6 +28,16 @@ class SimpleCause:
19
28
  """The cause type of the cause."""
20
29
 
21
30
  @classmethod
22
- def create_from_disease_state(cls, disease_state: type) -> "SimpleCause":
23
- """Create a SimpleCause instance from a"""
24
- return cls(disease_state.state_id, disease_state.model, disease_state.cause_type)
31
+ def create_from_specific_cause(cls, cause: type) -> "SimpleCause":
32
+ """Create a SimpleCause instance from a more specific cause.
33
+
34
+ Parameters
35
+ ----------
36
+ cause
37
+ The cause to be converted into a SimpleCause instance.
38
+
39
+ Returns
40
+ -------
41
+ A SimpleCause instance.
42
+ """
43
+ return cls(cause.state_id, cause.model, cause.cause_type)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vivarium_public_health
3
- Version: 3.0.4
3
+ Version: 3.0.5
4
4
  Summary: Components for modelling diseases, risks, and interventions with ``vivarium``
5
5
  Home-page: https://github.com/ihmeuw/vivarium_public_health
6
6
  Author: The vivarium developers
@@ -1,6 +1,6 @@
1
1
  vivarium_public_health/__about__.py,sha256=RgWycPypKZS80TpSX7o41cREnG8PfguNHDHLuLyl820,487
2
2
  vivarium_public_health/__init__.py,sha256=tomMOl3PI7O8GdxDWGBiBjT0Bwd31GpyQTYTzwIv108,361
3
- vivarium_public_health/_version.py,sha256=gNoy6uoSQO4ZzowTZAJz3hphzq1F_Y-3X9YrQdb7ppc,22
3
+ vivarium_public_health/_version.py,sha256=3kxZhPRWwAKER8BleEtUBQTUGwcBGPmrbjLu-HEi-hI,22
4
4
  vivarium_public_health/utilities.py,sha256=5cl9jjVkOQ1UeXT4DjDMAhaBNNjAsDo-SVJwpv6FDw0,3071
5
5
  vivarium_public_health/disease/__init__.py,sha256=RuuiRcvAJfX9WQGt_WZZjxN7Cu3E5rMTmuaRS-UaFPM,419
6
6
  vivarium_public_health/disease/model.py,sha256=0WIYDEx-hwlUJp6Zl8m8bUMoWxuVkOWsJvh_YlZiOPs,8234
@@ -24,12 +24,12 @@ vivarium_public_health/population/data_transformations.py,sha256=QVh_63Wwg9BUkaQ
24
24
  vivarium_public_health/population/mortality.py,sha256=w7b_TUssHjRcnULdXu7MXKfZBjCrlYWbB94oO3JWogI,10264
25
25
  vivarium_public_health/results/__init__.py,sha256=XKuX9HTXUur1kpHM7zuMSnkJxlg-W7eMAPmh8LP9Xp4,281
26
26
  vivarium_public_health/results/columns.py,sha256=V-L3JgTcsk51Zx9PcUwSgaE1iZjuGyfZ8aShPjynadU,495
27
- vivarium_public_health/results/disability.py,sha256=DqSNI1CEdhNXy-mhTtuTXom22e6XGrvFoaeQwyBdlig,9872
28
- vivarium_public_health/results/disease.py,sha256=q5-g495tPbcs1zfApwoCTfkionAwQbCeXn3JigBUOIk,12526
29
- vivarium_public_health/results/mortality.py,sha256=Bo8l8CYcBmI6BsXl8l_7mPieGLzyUp3XeFBm497mThE,9652
30
- vivarium_public_health/results/observer.py,sha256=-VoOYOaT-vmxVNi0bxm3It0ZFdLIq8D9Ng28xO1JuLw,7143
27
+ vivarium_public_health/results/disability.py,sha256=JQm3Q7CoGCT2AgxaoH6MKkvnq4xF83wfFmEvEOvTmvA,9876
28
+ vivarium_public_health/results/disease.py,sha256=OwxhPrfDsCnCZSaw8Yiq2AnibWikoqI-gM7xDdhFLcM,12529
29
+ vivarium_public_health/results/mortality.py,sha256=imH5OGze_rb0i60hmFs-JUjE6XXoH8Gt9wWeut0sk_M,9656
30
+ vivarium_public_health/results/observer.py,sha256=SQmKL1OCs2gDS8clIuJvZ3WiuspMkGEVDhnuNMJAvHc,7300
31
31
  vivarium_public_health/results/risk.py,sha256=GS4qJVjW3MqsDeRDDac2etFQlqIluxOxIZFMy1Ytmp8,6622
32
- vivarium_public_health/results/simple_cause.py,sha256=jlrllbSiEIOrf69gQvrJww29uMrR8xzK_5TApu1Mxqg,724
32
+ vivarium_public_health/results/simple_cause.py,sha256=ibdE6KwhDfQWntCVkOEooBcmUydEoupmd3_poHSHyu8,1007
33
33
  vivarium_public_health/results/stratification.py,sha256=4I3YGHVabNAZENE7YboOtWsWU4X-8LUBJ9iwYMbpl6E,5387
34
34
  vivarium_public_health/risks/__init__.py,sha256=z8DcnZGxqNVAyFZm2WAV-IVNGvrSS4izju_0DNe2Ghw,212
35
35
  vivarium_public_health/risks/base_risk.py,sha256=WhvB0RRYIsGsPQvJEWckcBlOVSh4Rx-B-VGZDSWWb7s,10416
@@ -42,8 +42,8 @@ vivarium_public_health/treatment/__init__.py,sha256=wONElu9aJbBYwpYIovYPYaN_GYfV
42
42
  vivarium_public_health/treatment/magic_wand.py,sha256=i9N57-MEuQv5B6dQ5iVMTAdOPghYcgiRRz-dTzigf1s,1980
43
43
  vivarium_public_health/treatment/scale_up.py,sha256=aKJmZ2G6N80n7oPkJM8IpqZOhftUBkAMBn4hR4EZzhE,7015
44
44
  vivarium_public_health/treatment/therapeutic_inertia.py,sha256=8Z97s7GfcpfLu1U1ESJSqeEk4L__a3M0GbBV21MFg2s,2346
45
- vivarium_public_health-3.0.4.dist-info/LICENSE.txt,sha256=mN4bNLUQNcN9njYRc_3jCZkfPySVpmM6MRps104FxA4,1548
46
- vivarium_public_health-3.0.4.dist-info/METADATA,sha256=mVOUpc6PRXAW7lnKkJ3BRJPKHT3erLyQuS60qlMFUzU,4061
47
- vivarium_public_health-3.0.4.dist-info/WHEEL,sha256=UvcQYKBHoFqaQd6LKyqHw9fxEolWLQnlzP0h_LgJAfI,91
48
- vivarium_public_health-3.0.4.dist-info/top_level.txt,sha256=VVInlpzCFD0UNNhjOq_j-a29odzjwUwYFTGfvqbi4dY,23
49
- vivarium_public_health-3.0.4.dist-info/RECORD,,
45
+ vivarium_public_health-3.0.5.dist-info/LICENSE.txt,sha256=mN4bNLUQNcN9njYRc_3jCZkfPySVpmM6MRps104FxA4,1548
46
+ vivarium_public_health-3.0.5.dist-info/METADATA,sha256=FX6CeaoApBMGJFO3USOMhAIsMpl7srL1gQIkUV8Ay54,4061
47
+ vivarium_public_health-3.0.5.dist-info/WHEEL,sha256=UvcQYKBHoFqaQd6LKyqHw9fxEolWLQnlzP0h_LgJAfI,91
48
+ vivarium_public_health-3.0.5.dist-info/top_level.txt,sha256=VVInlpzCFD0UNNhjOq_j-a29odzjwUwYFTGfvqbi4dY,23
49
+ vivarium_public_health-3.0.5.dist-info/RECORD,,