diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1bee974e4..ef06a14a5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,7 +21,7 @@ repos: - id: black - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: 'v0.0.286' + rev: 'v0.0.288' hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -36,6 +36,21 @@ repos: types: [python] exclude: "apps|use_cases|tests|cyclops/(process|models|tasks|monitor|report/plot)" + - repo: local + hooks: + - id: nbstripout + name: nbstripout + language: python + entry: nbstripout + exclude: ^docs/source/tutorials/gemini/.*\.ipynb$ + + - repo: https://github.com/nbQA-dev/nbQA + rev: 1.7.0 + hooks: + - id: nbqa-black + - id: nbqa-ruff + args: [--fix, --exit-non-zero-on-fix] + - repo: local hooks: - id: pytest @@ -44,11 +59,3 @@ repos: language: system pass_filenames: false always_run: true - - - repo: local - hooks: - - id: nbstripout - name: nbstripout - language: python - entry: nbstripout - exclude: ^docs/source/tutorials/gemini/.*\.ipynb$ diff --git a/cyclops/query/base.py b/cyclops/query/base.py index f6b5f3730..8aa685036 100644 --- a/cyclops/query/base.py +++ b/cyclops/query/base.py @@ -3,7 +3,7 @@ import logging import os from functools import partial -from typing import Any, Callable, Dict, List, Optional, Union +from typing import Any, Callable, Dict, List, Optional import yaml from hydra import compose, initialize @@ -12,14 +12,12 @@ from sqlalchemy.sql.selectable import Subquery from cyclops.query import ops as qo -from cyclops.query.interface import QueryInterface, QueryInterfaceProcessed +from cyclops.query.interface import QueryInterface from cyclops.query.orm import Database from cyclops.query.util import ( DBSchema, - TableTypes, _to_subquery, get_attr_name, - table_params_to_type, ) from cyclops.utils.file import join as join_path from cyclops.utils.log import setup_logging @@ -35,9 +33,9 @@ def _create_get_table_lambdafn(schema_name: str, table_name: str) -> Callable[.. Parameters ---------- - schema_name: str + schema_name The schema name. - table_name: str + table_name The table name. Returns @@ -54,7 +52,7 @@ def _cast_timestamp_cols(table: Subquery) -> Subquery: Parameters ---------- - table: sqlalchemy.sql.selectable.Subquery + table Table to cast. Returns @@ -78,9 +76,15 @@ class DatasetQuerier: Attributes ---------- - db: cyclops.query.orm.Database + db ORM Database used to run queries. + Parameters + ---------- + config_overrides + Override configuration parameters, specified as kwargs. + + Notes ----- This class is intended to be subclassed to provide methods for querying tables in @@ -96,14 +100,6 @@ def __init__( self, **config_overrides: Dict[str, Any], ) -> None: - """Initialize. - - Parameters - ---------- - **config_overrides - Override configuration parameters, specified as kwargs. - - """ overrides = [] if config_overrides: config_file = join_path(os.path.dirname(__file__), "configs", "config.yaml") @@ -139,25 +135,39 @@ def list_schemas(self) -> List[str]: """ return list(self.db.inspector.get_schema_names()) - def list_tables(self) -> List[str]: + def list_tables(self, schema_name: Optional[str] = None) -> List[str]: """List table methods that can be queried using the database. + Parameters + ---------- + schema_name + Name of schema in the database. + Returns ------- List[str] List of table names. """ - return self.db.list_tables() + if schema_name: + table_names = [] + for table in self.db.list_tables(): + schema_name_, _ = table.split(".") + if schema_name_ == schema_name: + table_names.append(table) + else: + table_names = self.db.list_tables() + + return table_names def list_columns(self, schema_name: str, table_name: str) -> List[str]: """List columns in a table. Parameters ---------- - schema_name: str + schema_name Name of schema in the database. - table_name: str + table_name Name of GEMINI table. Returns @@ -196,36 +206,6 @@ def list_custom_tables(self) -> List[str]: return custom_tables - @table_params_to_type(Subquery) - def get_interface( - self, - table: TableTypes, - ops: Optional[qo.Sequential] = None, - process_fn: Optional[Callable[..., Any]] = None, - ) -> Union[QueryInterface, QueryInterfaceProcessed]: - """Get a query interface for a GEMINI table. - - Parameters - ---------- - table: cyclops.query.util.TableTypes - Table to wrap in the interface. - ops: cyclops.query.ops.Sequential - Operations to perform on the query. - process_fn - Process function to apply on the Pandas DataFrame returned from the query. - - Returns - ------- - cyclops.query.interface.QueryInterface or - cyclops.query.interface.QueryInterfaceProcessed - A query interface using the GEMINI database object. - - """ - if process_fn is None: - return QueryInterface(self.db, table, ops=ops) - - return QueryInterfaceProcessed(self.db, table, ops=ops, process_fn=process_fn) - def get_table( self, schema_name: str, @@ -239,11 +219,11 @@ def get_table( Parameters ---------- - schema_name: str + schema_name Name of schema in the database. - table_name: str + table_name Name of GEMINI table. - cast_timestamp_cols: bool + cast_timestamp_cols Whether to cast timestamp columns to datetime. Returns @@ -263,21 +243,15 @@ def _template_table_method( self, schema_name: str, table_name: str, - join: Optional[qo.JoinArgs] = None, - ops: Optional[qo.Sequential] = None, ) -> QueryInterface: """Template method for table methods. Parameters ---------- - schema_name: str + schema_name Name of schema in the database. - table_name: str + table_name Name of table in the database. - join: cyclops.query.ops.JoinArgs - Join arguments. - ops: cyclops.query.ops.Sequential or cyclops.query.ops.QueryOp, optional - Operations to perform on the query. Returns ------- @@ -288,7 +262,7 @@ def _template_table_method( table = getattr(getattr(self.db, schema_name), table_name).data table = _to_subquery(table) - return QueryInterface(self.db, table, join=join, ops=ops) + return QueryInterface(self.db, table) def _setup_table_methods(self) -> None: """Add table methods. diff --git a/cyclops/query/gemini.py b/cyclops/query/gemini.py index 4ffd0aeb5..dfc8555b6 100644 --- a/cyclops/query/gemini.py +++ b/cyclops/query/gemini.py @@ -1,7 +1,7 @@ """GEMINI query API.""" import logging -from typing import Any, Dict, Optional +from typing import Any, Dict from sqlalchemy import select from sqlalchemy.sql.expression import union_all @@ -40,18 +40,9 @@ def __init__(self, **config_overrides: Dict[str, Any]) -> None: def ip_admin( self, - join: Optional[qo.JoinArgs] = None, - ops: Optional[qo.Sequential] = None, ) -> QueryInterface: """Query GEMINI patient encounters. - Parameters - ---------- - join: qo.JoinArgs, optional - Join arguments. - ops: qo.Sequential, optional - Additional operations to perform on the table. - Returns ------- cyclops.query.interface.QueryInterface @@ -78,22 +69,13 @@ def ip_admin( table = qo.Rename({"description": "discharge_description"})(table) table = qo.Drop("value")(table) - return QueryInterface(self.db, table, join=join, ops=ops) + return QueryInterface(self.db, table) def diagnoses( self, - join: Optional[qo.JoinArgs] = None, - ops: Optional[qo.Sequential] = None, ) -> QueryInterface: """Query diagnosis data. - Parameters - ---------- - join: qo.JoinArgs, optional - Join arguments. - ops: qo.Sequential, optional - Additional operations to perform on the table. - Returns ------- cyclops.query.interface.QueryInterface @@ -117,22 +99,13 @@ def diagnoses( # Trim whitespace from ICD codes. table = qo.Trim("diagnosis_code")(table) - return QueryInterface(self.db, table, join=join, ops=ops) + return QueryInterface(self.db, table) def room_transfer( self, - join: Optional[qo.JoinArgs] = None, - ops: Optional[qo.Sequential] = None, ) -> QueryInterface: """Query room transfer data. - Parameters - ---------- - join: qo.JoinArgs, optional - Join arguments. - ops: qo.Sequential, optional - Additional operations to perform on the table. - Returns ------- cyclops.query.interface.QueryInterface @@ -153,22 +126,13 @@ def room_transfer( )(table) table = qo.Rename({"description": "transfer_description"})(table) - return QueryInterface(self.db, table, join=join, ops=ops) + return QueryInterface(self.db, table) def care_units( self, - join: Optional[qo.JoinArgs] = None, - ops: Optional[qo.Sequential] = None, ) -> QueryInterface: """Query care unit data, fetches transfer info from multiple tables. - Parameters - ---------- - join: qo.JoinArgs, optional - Join arguments. - ops: qo.Sequential, optional - Additional operations to perform on the table. - Returns ------- cyclops.query.interface.QueryInterface @@ -236,22 +200,13 @@ def care_units( select(rt_table), ).subquery() - return QueryInterface(self.db, table, join=join, ops=ops) + return QueryInterface(self.db, table) def imaging( self, - join: Optional[qo.JoinArgs] = None, - ops: Optional[qo.Sequential] = None, ) -> QueryInterface: """Query imaging reports data. - Parameters - ---------- - join: qo.JoinArgs, optional - Join arguments. - ops: qo.Sequential, optional - Additional operations to perform on the table. - Returns ------- cyclops.query.interface.QueryInterface @@ -278,4 +233,4 @@ def imaging( table, ) - return QueryInterface(self.db, table, join=join, ops=ops) + return QueryInterface(self.db, table) diff --git a/cyclops/query/interface.py b/cyclops/query/interface.py index 07e9b508a..dd2c9e09d 100644 --- a/cyclops/query/interface.py +++ b/cyclops/query/interface.py @@ -1,15 +1,16 @@ """A query interface class to wrap database objects and queries.""" import logging -from dataclasses import asdict, dataclass, field -from typing import Any, Callable, Dict, Literal, Optional, Union +from typing import List, Literal, Optional, Tuple, Union import dask.dataframe as dd import pandas as pd +from sqlalchemy.sql.elements import BinaryExpression import cyclops.query.ops as qo from cyclops.query.orm import Database from cyclops.query.util import TableTypes +from cyclops.utils.common import to_list_optional from cyclops.utils.file import save_dataframe from cyclops.utils.log import setup_logging @@ -19,7 +20,6 @@ setup_logging(print_level="INFO", logger=LOGGER) -@dataclass class QueryInterface: """An interface dataclass to wrap queries, and run them. @@ -29,172 +29,149 @@ class QueryInterface: Database object to create ORM, and query data. query: cyclops.query.util.TableTypes The query. - join: cyclops.query.ops.JoinArgs, optional - Join arguments to join the query with another table. - ops: cyclops.query.ops.Sequential or cyclops.query.ops.QueryOp, optional - Operations to perform on the query. - _data: pandas.DataFrame or dask.DataFrame - Data returned from executing the query, as Pandas DataFrame. - _run_args: dict Private dictionary attribute to keep track of arguments - passed to run() method. - - Notes - ----- - After initialization, the query, join operation and chaining of provided operations, - are automatically done and the query attribute is updated. """ - database: Database - query: TableTypes - join: Optional[qo.JoinArgs] = None - ops: Optional[Union[qo.QueryOp, qo.Sequential]] = None - _data: Optional[Union[pd.DataFrame, dd.core.DataFrame]] = None - _run_args: Dict[str, Any] = field(default_factory=dict) - - def __post_init__(self) -> None: - """Post init method to chain operations with original query.""" - if self.join is not None: - self.query = qo.Join(**asdict(self.join))(self.query) - if self.ops is not None: - self.query = self.ops(self.query) + def __init__( + self, + database: Database, + query: Union[TableTypes, "QueryInterface"], + ) -> None: + """Initialize the QueryInterface object, join and chain operations.""" + self.database = database + if isinstance(query, QueryInterface): + self.query = query.query # type: ignore + else: + self.query = query + self._data = None @property def data(self) -> Optional[Union[pd.DataFrame, dd.core.DataFrame]]: """Get data.""" return self._data - def run( + def join( self, - limit: Optional[int] = None, - backend: Literal["pandas", "dask"] = "pandas", - index_col: Optional[str] = None, - n_partitions: Optional[int] = None, - ) -> Union[pd.DataFrame, dd.core.DataFrame]: - """Run the query, and fetch data. + join_table: Union[TableTypes, "QueryInterface"], + on: Optional[ + Union[ + str, + List[str], + Tuple[str], + List[Tuple[str, str]], + ] + ] = None, + on_to_type: Optional[Union[type, List[type]]] = None, + cond: Optional[BinaryExpression] = None, + table_cols: Optional[Union[str, List[str]]] = None, + join_table_cols: Optional[Union[str, List[str]]] = None, + isouter: Optional[bool] = False, + ) -> "QueryInterface": + """Join the query with another table. Parameters ---------- - limit - No. of rows to limit the query return. - backend - Backend computing framework to use, Pandas or Dask. - index_col - Column which becomes the index, and defines the partitioning. - Should be a indexed column in the SQL server, and any orderable type. - n_partitions - Number of partitions. Check dask documentation for additional details. + join_table + Table to join with. + on + Column(s) to join on. + on_to_type + Type(s) to cast the column(s) to join on. + cond + Condition to join on. + table_cols + Columns to select from the original table. + join_table_cols + Columns to select from the joined table. + isouter + Whether to perform an outer join. Returns ------- - pandas.DataFrame or dask.DataFrame - Query result dataframe. + QueryInterface + QueryInterface object with the join operation added. """ - # Only re-run when new run arguments are given. - if self._data is None or self._run_args != locals(): - self._run_args = locals() - self._data = self.database.run_query( - self.query, - limit=limit, - backend=backend, - index_col=index_col, - n_partitions=n_partitions, - ) - - return self._data - - def save( + on = to_list_optional(on) + on_to_type = to_list_optional(on_to_type) + table_cols = to_list_optional(table_cols) + join_table_cols = to_list_optional(join_table_cols) + if isinstance(join_table, QueryInterface): + join_table = join_table.query + query = qo.Join( + join_table=join_table, + on=on, + on_to_type=on_to_type, + cond=cond, + table_cols=table_cols, + join_table_cols=join_table_cols, + isouter=isouter, + )(self.query) + + return QueryInterface(self.database, query) + + def ops( self, - path: str, - file_format: Literal["parquet", "csv"] = "parquet", - ) -> str: - """Save the query. + ops: Union[qo.QueryOp, qo.Sequential], + ) -> "QueryInterface": + """Chain operations with the query. Parameters ---------- - path - Path where the file will be saved. - file_format - File format of the file to save. + ops + Operations to perform on the query. Returns ------- - str - Processed save path for upstream use. + QueryInterface + QueryInterface object with the operations added. """ - # If the query was already run. - if self._data is not None: - return save_dataframe(self._data, path, file_format=file_format) + query = ops(self.query) - # Save without running. - if file_format == "csv": - path = self.database.save_query_to_csv(self.query, path) - elif file_format == "parquet": - path = self.database.save_query_to_parquet(self.query, path) - else: - raise ValueError("Invalid file format specified.") + return QueryInterface(self.database, query) - return path + def union( + self, + other: "QueryInterface", + ) -> "QueryInterface": + """Union the query with another query. - def clear_data(self) -> None: - """Clear data container. + Parameters + ---------- + other + The other query to union with. - Sets the data attribute to None, thus clearing the dataframe contained. + Returns + ------- + QueryInterface + QueryInterface object with the union operation added. """ - self._data = None + query = qo.Union(other.query)(self.query) + return QueryInterface(self.database, query) -@dataclass -class QueryInterfaceProcessed: - """An interface dataclass to wrap queries, and run them with post-processing. + def union_all( + self, + other: "QueryInterface", + ) -> "QueryInterface": + """Union all the query with another query. - A similar dataclass to QueryInterface, where custom post-processing - functions on the pandas dataframe returned from the query can be run. However, - this prevents the query from being further used, and hence is declared as - private attribute. + Parameters + ---------- + other + The other query to union all with. - Parameters - ---------- - database: cyclops.orm.Database - Database object to create ORM, and query data. - _query: cyclops.query.util.TableTypes - The query. - process_fn: Callable - Process function to apply on the pandas dataframe returned from the query. - join: cyclops.query.ops.JoinArgs, optional - Join arguments to join the query with another table. - ops: cyclops.query.ops.Sequential or cyclops.query.ops.QueryOp, optional - Operations to perform on the query. - _data: pandas.DataFrame or dask.DataFrame - Data returned from executing the query, as Pandas DataFrame. - _run_args: dict - Private dictionary attribute to keep track of arguments - passed to run() method. - - Notes - ----- - After initialization, the query, join operation and chaining of provided operations, - are automatically done and the query attribute is updated. + Returns + ------- + QueryInterface + QueryInterface object with the union all operation added. - """ + """ + query = qo.Union(other.query, union_all=True)(self.query) - database: Database - _query: TableTypes - process_fn: Callable[..., Any] - join: Optional[qo.JoinArgs] = None - ops: Optional[Union[qo.QueryOp, qo.Sequential]] = None - _data: Optional[Union[pd.DataFrame, dd.core.DataFrame, None]] = None - _run_args: Dict[str, Any] = field(default_factory=dict) - - def __post_init__(self) -> None: - """Post init method to chain operations with original query.""" - if self.join is not None: - self._query = qo.Join(**asdict(self.join))(self._query) - if self.ops is not None: - self._query = self.ops(self._query) + return QueryInterface(self.database, query) def run( self, @@ -223,36 +200,22 @@ def run( Query result dataframe. """ - # Only re-run when new run arguments are given. - if self._data is None or self._run_args != locals(): - self._run_args = locals() - self._data = self.database.run_query( - self._query, - limit=limit, - backend=backend, - index_col=index_col, - n_partitions=n_partitions, - ) - - LOGGER.info( - "Applying post-processing fn %s to query output", - self.process_fn.__name__, - ) - return self.process_fn(self._data) + self._data = self.database.run_query( + self.query, + limit=limit, + backend=backend, + index_col=index_col, + n_partitions=n_partitions, + ) return self._data - @property - def data(self) -> Optional[Union[pd.DataFrame, dd.core.DataFrame]]: - """Get data.""" - return self._data - def save( self, path: str, file_format: Literal["parquet", "csv"] = "parquet", ) -> str: - """Save the processed query. + """Save the query. Parameters ---------- @@ -267,10 +230,19 @@ def save( Processed save path for upstream use. """ - # The query must be run in order to be processed. - if self._data is None: - self.run() - return save_dataframe(self._data, path, file_format=file_format) + # If the query was already run. + if self._data is not None: + return save_dataframe(self._data, path, file_format=file_format) + + # Save without running. + if file_format == "csv": + path = self.database.save_query_to_csv(self.query, path) + elif file_format == "parquet": + path = self.database.save_query_to_parquet(self.query, path) + else: + raise ValueError("Invalid file format specified.") + + return path def clear_data(self) -> None: """Clear data container. diff --git a/cyclops/query/mimiciii.py b/cyclops/query/mimiciii.py index c6aa88866..bfd499dfd 100644 --- a/cyclops/query/mimiciii.py +++ b/cyclops/query/mimiciii.py @@ -5,7 +5,7 @@ """ import logging -from typing import Any, Dict, Optional +from typing import Any, Dict import cyclops.query.ops as qo from cyclops.query.base import DatasetQuerier @@ -37,18 +37,9 @@ def __init__(self, **config_overrides: Dict[str, Any]) -> None: def diagnoses( self, - join: Optional[qo.JoinArgs] = None, - ops: Optional[qo.Sequential] = None, ) -> QueryInterface: """Query MIMICIII diagnosis data. - Parameters - ---------- - join: qo.JoinArgs, optional - Join arguments. - ops: qo.Sequential, optional - Additional operations to apply to the query. - Returns ------- cyclops.query.interface.QueryInterface @@ -64,22 +55,13 @@ def diagnoses( on_to_type=["str"], )(table) - return QueryInterface(self.db, table, join=join, ops=ops) + return QueryInterface(self.db, table) def labevents( self, - join: Optional[qo.JoinArgs] = None, - ops: Optional[qo.Sequential] = None, ) -> QueryInterface: """Query MIMICIII labevents data. - Parameters - ---------- - join: qo.JoinArgs, optional - Join arguments. - ops: qo.Sequential, optional - Additional operations to apply to the query. - Returns ------- cyclops.query.interface.QueryInterface @@ -95,22 +77,13 @@ def labevents( on_to_type=["str"], )(table) - return QueryInterface(self.db, table, join=join, ops=ops) + return QueryInterface(self.db, table) def chartevents( self, - join: Optional[qo.JoinArgs] = None, - ops: Optional[qo.Sequential] = None, ) -> QueryInterface: """Query MIMICIII chartevents data. - Parameters - ---------- - join: qo.JoinArgs, optional - Join arguments. - ops: qo.Sequential, optional - Additional operations to apply to the query. - Returns ------- cyclops.query.interface.QueryInterface @@ -126,4 +99,4 @@ def chartevents( on_to_type=["str"], )(table) - return QueryInterface(self.db, table, join=join, ops=ops) + return QueryInterface(self.db, table) diff --git a/cyclops/query/mimiciv.py b/cyclops/query/mimiciv.py index cde53e883..d270da84a 100644 --- a/cyclops/query/mimiciv.py +++ b/cyclops/query/mimiciv.py @@ -5,14 +5,13 @@ """ import logging -from typing import Any, Dict, Optional +from typing import Any, Dict from sqlalchemy import Integer, func, select import cyclops.query.ops as qo from cyclops.query.base import DatasetQuerier -from cyclops.query.interface import QueryInterface, QueryInterfaceProcessed -from cyclops.query.post_process.mimiciv import process_mimic_care_units +from cyclops.query.interface import QueryInterface from cyclops.query.util import get_column from cyclops.utils.log import setup_logging @@ -41,18 +40,9 @@ def __init__(self, **config_overrides: Dict[str, Any]) -> None: def patients( self, - join: Optional[qo.JoinArgs] = None, - ops: Optional[qo.Sequential] = None, ) -> QueryInterface: """Query MIMIC patient data. - Parameters - ---------- - join: qo.JoinArgs, optional - Join arguments. - ops: qo.Sequential, optional - Additional operations to apply to the query. - Returns ------- cyclops.query.interface.QueryInterface @@ -110,20 +100,18 @@ def patients( ], )(table) - return QueryInterface(self.db, table, join=join, ops=ops) + return QueryInterface(self.db, table) def diagnoses( self, - join: Optional[qo.JoinArgs] = None, - ops: Optional[qo.Sequential] = None, ) -> QueryInterface: """Query MIMIC diagnosis data. Parameters ---------- - join: qo.JoinArgs, optional + join Join arguments. - ops: qo.Sequential, optional + ops Additional operations to apply to the query. Returns @@ -141,51 +129,13 @@ def diagnoses( on_to_type=["str", "int"], )(table) - return QueryInterface(self.db, table, join=join, ops=ops) - - def care_units( - self, - join: Optional[qo.JoinArgs] = None, - ops: Optional[qo.Sequential] = None, - ) -> QueryInterfaceProcessed: - """Get care unit table within a given set of encounters. - - Parameters - ---------- - join: qo.JoinArgs, optional - Join arguments. - ops: qo.Sequential, optional - Additional operations to apply to the query. - - Returns - ------- - cyclops.query.interface.QueryInterfaceProcessed - Constructed table, wrapped in an interface object. - - """ - table = self.get_table("mimiciv_hosp", "transfers") - return QueryInterfaceProcessed( - self.db, - table, - process_fn=lambda x: process_mimic_care_units(x, specific=False), - join=join, - ops=ops, - ) + return QueryInterface(self.db, table) def labevents( self, - join: Optional[qo.JoinArgs] = None, - ops: Optional[qo.Sequential] = None, ) -> QueryInterface: """Query lab events from the hospital module. - Parameters - ---------- - join: qo.JoinArgs, optional - Join arguments. - ops: qo.Sequential, optional - Additional operations to apply to the query. - Returns ------- cyclops.query.interface.QueryInterface @@ -201,22 +151,13 @@ def labevents( on=["itemid"], )(table) - return QueryInterface(self.db, table, join=join, ops=ops) + return QueryInterface(self.db, table) def chartevents( self, - join: Optional[qo.JoinArgs] = None, - ops: Optional[qo.Sequential] = None, ) -> QueryInterface: """Query ICU chart events from the ICU module. - Parameters - ---------- - join: qo.JoinArgs, optional - Join arguments. - ops: qo.Sequential, optional - Additional operations to apply to the query. - Returns ------- cyclops.query.interface.QueryInterface @@ -232,4 +173,4 @@ def chartevents( on="itemid", )(table) - return QueryInterface(self.db, table, join=join, ops=ops) + return QueryInterface(self.db, table) diff --git a/cyclops/query/omop.py b/cyclops/query/omop.py index 5b4d286ad..978706996 100644 --- a/cyclops/query/omop.py +++ b/cyclops/query/omop.py @@ -65,7 +65,7 @@ def __init__( Parameters ---------- - schema_name: str + schema_name Name of database schema. **config_overrides Override configuration parameters, specified as kwargs. @@ -79,10 +79,10 @@ def __init__( def map_concept_ids_to_name( self, - src_table: Subquery, + src_table: Union[Subquery, QueryInterface], src_cols: Union[str, List[str]], dst_cols: Optional[Union[str, List[str]]] = None, - ) -> Subquery: + ) -> QueryInterface: """Map concept IDs in a source table to concept names from concept table. For each concept ID column with a name like `somecol_concept_ID`, the mapped @@ -92,19 +92,21 @@ def map_concept_ids_to_name( Parameters ---------- - src_table: Subquery + src_table Source table with concept IDs. - src_cols: str or list of str + src_cols Column name(s) to consider as concept IDs for mapping. - dst_cols: str or list of str, optional + dst_cols Column name(s) to assign for the mapped concept name columns. Returns ------- - Subquery + cyclops.query.interface.QueryInterface Query with mapped columns from concept table. """ + if isinstance(src_table, QueryInterface): + src_table = src_table.query concept_table = self.get_table(self.schema_name, "concept") src_cols = to_list(src_cols) if dst_cols: @@ -124,44 +126,42 @@ def map_concept_ids_to_name( dst_col_name = dst_cols[i] if dst_cols else col.replace(ID, NAME) src_table = qo.Rename({CONCEPT_NAME: dst_col_name})(src_table) - return src_table + return QueryInterface(self.db, src_table) - def _map_care_site_id(self, source_table: Subquery) -> Subquery: + def _map_care_site_id( + self, + source_table: Union[Subquery, QueryInterface], + ) -> QueryInterface: """Map care_site_id in a source table to care_site table. Parameters ---------- - source_table: Subquery + source_table Source table with care_site_id. Returns ------- - Subquery + cyclops.query.interface.QueryInterface Query with mapped columns from care_site table. """ + if isinstance(source_table, QueryInterface): + source_table = source_table.query care_site_table = self.get_table(self.schema_name, "care_site") - return qo.Join( + table = qo.Join( care_site_table, on=CARE_SITE_ID, join_table_cols=[CARE_SITE_NAME, CARE_SITE_SOURCE_VALUE], isouter=True, )(source_table) + return QueryInterface(self.db, table) + def visit_occurrence( self, - join: Optional[qo.JoinArgs] = None, - ops: Optional[qo.Sequential] = None, ) -> QueryInterface: """Query OMOP visit_occurrence table. - Parameters - ---------- - join: cyclops.query.ops.JoinArgs, optional - Join arguments. - ops: qo.Sequential, optional - Additional operations to perform on query. - Returns ------- cyclops.query.interface.QueryInterface @@ -178,22 +178,13 @@ def visit_occurrence( ) table = self._map_care_site_id(table) - return QueryInterface(self.db, table, join=join, ops=ops) + return QueryInterface(self.db, table) def visit_detail( self, - join: Optional[qo.JoinArgs] = None, - ops: Optional[qo.Sequential] = None, ) -> QueryInterface: """Query OMOP visit_detail table. - Parameters - ---------- - join: qo.JoinArgs, optional - Join arguments. - ops: qo.Sequential, optional - Additional operations to perform on query. - Returns ------- cyclops.query.interface.QueryInterface @@ -206,22 +197,13 @@ def visit_detail( ["visit_detail_concept_id", "visit_detail_type_concept_id"], ) - return QueryInterface(self.db, table, join=join, ops=ops) + return QueryInterface(self.db, table) def person( self, - join: Optional[qo.JoinArgs] = None, - ops: Optional[qo.Sequential] = None, ) -> QueryInterface: """Query OMOP person table. - Parameters - ---------- - join: qo.JoinArgs, optional - Join arguments. - ops: qo.Sequential, optional - Additional operations to perform on query. - Returns ------- cyclops.query.interface.QueryInterface @@ -234,22 +216,13 @@ def person( ["gender_concept_id", "race_concept_id", "ethnicity_concept_id"], ) - return QueryInterface(self.db, table, join=join, ops=ops) + return QueryInterface(self.db, table) def observation( self, - join: Optional[qo.JoinArgs] = None, - ops: Optional[qo.Sequential] = None, ) -> QueryInterface: """Query OMOP observation table. - Parameters - ---------- - join: qo.JoinArgs, optional - Join arguments. - ops: qo.Sequential, optional - Additional operations to perform on query. - Returns ------- cyclops.query.interface.QueryInterface @@ -262,22 +235,13 @@ def observation( [OBSERVATION_CONCEPT_ID, OBSERVATION_TYPE_CONCEPT_ID], ) - return QueryInterface(self.db, table, join=join, ops=ops) + return QueryInterface(self.db, table) def measurement( self, - join: Optional[qo.JoinArgs] = None, - ops: Optional[qo.Sequential] = None, ) -> QueryInterface: """Query OMOP measurement table. - Parameters - ---------- - join: qo.JoinArgs, optional - Join arguments. - ops: qo.Sequential, optional - Additional operations to perform on query. - Returns ------- cyclops.query.interface.QueryInterface @@ -292,4 +256,4 @@ def measurement( [MEASUREMENT_CONCEPT_ID, MEASUREMENT_TYPE_CONCEPT_ID, UNIT_CONCEPT_ID], ) - return QueryInterface(self.db, table, join=join, ops=ops) + return QueryInterface(self.db, table) diff --git a/cyclops/query/ops.py b/cyclops/query/ops.py index 836f90318..a983c5ebd 100644 --- a/cyclops/query/ops.py +++ b/cyclops/query/ops.py @@ -7,7 +7,6 @@ import typing from abc import abstractmethod from collections import OrderedDict -from dataclasses import dataclass from datetime import datetime, timedelta from itertools import islice @@ -55,53 +54,6 @@ # ruff: noqa: W505 -@dataclass -class JoinArgs: - """Arguments for joining tables. - - Parameters - ---------- - join_table - Table to join. - on - Column(s) to join on. - on_to_type - A list of types to which to convert the on columns before joining. Useful when - two columns have the same values but in different format, e.g., strings of int. - cond - Condition on which to join to tables. - table_cols - Filters to keep only these columns from the table. - join_table_cols - Filters to keep only these columns from the join_table. - isouter - Flag to say if the join is a left outer join. - - """ - - join_table: TableTypes - on: typing.Optional[ - typing.Union[ - str, - typing.List[str], - typing.Tuple[str], - typing.List[typing.Tuple[str, str]], - ] - ] = None - on_to_type: typing.Optional[typing.Union[type, typing.List[type]]] = None - cond: typing.Optional[BinaryExpression] = None - table_cols: typing.Optional[typing.Union[str, typing.List[str]]] = None - join_table_cols: typing.Optional[typing.Union[str, typing.List[str]]] = None - isouter: typing.Optional[bool] = False - - def __post_init__(self) -> None: - """Post initialization.""" - self.on = to_list_optional(self.on) - self.on_to_type = to_list_optional(self.on_to_type) - self.table_cols = to_list_optional(self.table_cols) - self.join_table_cols = to_list_optional(self.join_table_cols) - - def _addindent(s_: str, num_spaces: int = 4) -> str: """Add spaces to a string except the first line. diff --git a/cyclops/query/orm.py b/cyclops/query/orm.py index 02b0bb41b..9a19c853a 100644 --- a/cyclops/query/orm.py +++ b/cyclops/query/orm.py @@ -10,6 +10,7 @@ import pandas as pd import pyarrow.csv as pv import pyarrow.parquet as pq +from datasets import Dataset from omegaconf import DictConfig from sqlalchemy import MetaData, create_engine, inspect from sqlalchemy.engine.base import Engine @@ -166,10 +167,10 @@ def run_query( self, query: Union[TableTypes, str], limit: Optional[int] = None, - backend: Literal["pandas", "dask"] = "pandas", + backend: Literal["pandas", "dask", "datasets"] = "pandas", index_col: Optional[str] = None, n_partitions: Optional[int] = None, - ) -> Union[pd.DataFrame, dd.core.DataFrame]: + ) -> Union[pd.DataFrame, dd.core.DataFrame, Dataset]: """Run query. Parameters @@ -179,7 +180,7 @@ def run_query( limit Limit query result to limit. backend - Backend computing framework to use, Pandas or Dask. + Backend library to use, Pandas or Dask or HF datasets. index_col Column which becomes the index, and defines the partitioning. Should be a indexed column in the SQL server, and any orderable type. @@ -188,7 +189,7 @@ def run_query( Returns ------- - pandas.DataFrame or dask.DataFrame + pandas.DataFrame or dask.DataFrame or datasets.Dataset Extracted data from query. """ @@ -196,8 +197,10 @@ def run_query( raise ValueError( "Cannot use limit argument when running raw SQL string query!", ) - if backend == "pandas" and n_partitions is not None: - raise ValueError("Partitions not applicable with Pandas backend, use Dask!") + if backend in ["pandas", "datasets"] and n_partitions is not None: + raise ValueError( + "Partitions not applicable with pandas or datasets backend, use dask!", + ) # Limit the results returned. if limit is not None: query = query.limit(limit) # type: ignore @@ -206,6 +209,8 @@ def run_query( with self.session.connection(): if backend == "pandas": data = pd.read_sql_query(query, self.engine, index_col=index_col) + elif backend == "datasets": + data = Dataset.from_sql(query, self.conn) elif backend == "dask": data = dd.read_sql_query( # type: ignore query, @@ -215,7 +220,9 @@ def run_query( ) data = data.reset_index(drop=False) else: - raise ValueError("Invalid backend, can either be Pandas or Dask!") + raise ValueError( + "Invalid backend, can either be pandas or dask or datasets!", + ) LOGGER.info("Query returned successfully!") return data diff --git a/docs/source/tutorials/eicu/query_api.ipynb b/docs/source/tutorials/eicu/query_api.ipynb index a51ff85eb..84e348c6f 100644 --- a/docs/source/tutorials/eicu/query_api.ipynb +++ b/docs/source/tutorials/eicu/query_api.ipynb @@ -53,7 +53,7 @@ " password=\"pwd\",\n", ")\n", "# List all tables.\n", - "querier.list_tables()" + "querier.list_tables(\"eicu_crd\")" ] }, { @@ -77,7 +77,8 @@ " qo.ConditionEquals(\"hospitaldischargeyear\", 2014),\n", " qo.ConditionEquals(\"gender\", \"Female\"),\n", ")\n", - "patients = querier.eicu_crd.patient(ops=ops).run(limit=100)\n", + "patients = querier.eicu_crd.patient()\n", + "patients = patients.ops(ops).run(limit=100)\n", "print(f\"{len(patients)} rows extracted!\")" ] }, @@ -100,17 +101,15 @@ }, "outputs": [], "source": [ - "ops = qo.ConditionEquals(\"hospitaldischargeyear\", 2015)\n", - "patients = querier.eicu_crd.patient(ops=ops)\n", - "diagnosis_ops = qo.ConditionSubstring(\"diagnosisstring\", \"schizophrenia\")\n", - "diagnoses = querier.eicu_crd.diagnosis(\n", - " join=qo.JoinArgs(\n", - " join_table=patients.query,\n", - " on=\"patientunitstayid\",\n", - " ),\n", - " ops=diagnosis_ops,\n", - ").run(limit=100)\n", - "print(f\"{len(diagnoses)} rows extracted!\")" + "patients = querier.eicu_crd.patient()\n", + "diagnoses = querier.eicu_crd.diagnosis()\n", + "diagnoses = diagnoses.ops(qo.ConditionSubstring(\"diagnosisstring\", \"schizophrenia\"))\n", + "patient_diagnoses = patients.join(\n", + " join_table=diagnoses,\n", + " on=\"patientunitstayid\",\n", + ")\n", + "patient_diagnoses = patient_diagnoses.run(limit=100)\n", + "print(f\"{len(patient_diagnoses)} rows extracted!\")" ] }, { @@ -131,22 +130,20 @@ "outputs": [], "source": [ "hospitals = querier.eicu_crd.hospital()\n", - "ops = qo.Sequential(\n", - " qo.ConditionEquals(\"hospitaldischargeyear\", 2015),\n", - " qo.ConditionEquals(\"teachingstatus\", True),\n", - ")\n", - "patients = querier.eicu_crd.patient(\n", - " join=qo.JoinArgs(join_table=hospitals.query, on=\"hospitalid\"), ops=ops,\n", + "hospitals = hospitals.ops(qo.ConditionEquals(\"teachingstatus\", True))\n", + "patients = querier.eicu_crd.patient()\n", + "patients = patients.ops(qo.ConditionEquals(\"hospitaldischargeyear\", 2015))\n", + "patients = patients.join(\n", + " join_table=hospitals,\n", + " on=\"hospitalid\",\n", ")\n", - "lab_ops = qo.ConditionEquals(\"labname\", \"potassium\")\n", - "labs = querier.eicu_crd.lab(\n", - " join=qo.JoinArgs(\n", - " join_table=patients.query,\n", - " on=\"patientunitstayid\",\n", - " ),\n", - " ops=lab_ops,\n", + "labs = querier.eicu_crd.lab()\n", + "labs = labs.ops(qo.ConditionEquals(\"labname\", \"potassium\"))\n", + "patient_labs = patients.join(\n", + " join_table=labs,\n", + " on=\"patientunitstayid\",\n", ").run(limit=100)\n", - "print(f\"{len(labs)} rows extracted!\")" + "print(f\"{len(patient_labs)} rows extracted!\")" ] }, { @@ -170,13 +167,15 @@ " qo.ConditionEquals(\"hospitaldischargeyear\", 2014),\n", " qo.ConditionEquals(\"gender\", \"Female\"),\n", ")\n", - "patients = querier.eicu_crd.patient(ops=ops)\n", - "medications_ops = qo.ConditionSubstring(\"drugname\", \"glucose\")\n", - "medications = querier.eicu_crd.medication(\n", - " join=qo.JoinArgs(join_table=patients.query, on=\"patientunitstayid\"),\n", - " ops=medications_ops,\n", + "patients = querier.eicu_crd.patient()\n", + "patients = patients.ops(ops)\n", + "medications = querier.eicu_crd.medication()\n", + "medications = medications.ops(qo.ConditionSubstring(\"drugname\", \"glucose\"))\n", + "patient_medications = patients.join(\n", + " join_table=medications,\n", + " on=\"patientunitstayid\",\n", ").run(limit=100)\n", - "print(f\"{len(medications)} rows extracted!\")" + "print(f\"{len(patient_medications)} rows extracted!\")" ] } ], diff --git a/docs/source/tutorials/gemini/query_api.ipynb b/docs/source/tutorials/gemini/query_api.ipynb index d09e41064..1a3f4c8b9 100644 --- a/docs/source/tutorials/gemini/query_api.ipynb +++ b/docs/source/tutorials/gemini/query_api.ipynb @@ -113,7 +113,8 @@ "source": [ "ops = qo.Sequential(\n", " qo.OrderBy(\n", - " [\"patient_id_hashed\", \"discharge_date_time\"], ascending=[True, False],\n", + " [\"patient_id_hashed\", \"discharge_date_time\"],\n", + " ascending=[True, False],\n", " ),\n", " qo.Distinct(\"patient_id_hashed\"),\n", ")\n", @@ -283,7 +284,8 @@ " qo.GroupByAggregate(\"hospital_id\", {\"hospital_id\": (\"count\", \"count\")}),\n", ")\n", "lab_qi = querier.public.lab(\n", - " ops=lab_ops, join=qo.JoinArgs(join_table=encounters_qi.query, on=\"genc_id\"),\n", + " ops=lab_ops,\n", + " join=qo.JoinArgs(join_table=encounters_qi.query, on=\"genc_id\"),\n", ")\n", "sodium_tests = lab_qi.run()\n", "print(f\"{len(sodium_tests)} rows extracted!\")\n", diff --git a/docs/source/tutorials/kaggle/heart_failure_prediction.ipynb b/docs/source/tutorials/kaggle/heart_failure_prediction.ipynb index 628c76bfb..71840af1d 100644 --- a/docs/source/tutorials/kaggle/heart_failure_prediction.ipynb +++ b/docs/source/tutorials/kaggle/heart_failure_prediction.ipynb @@ -123,7 +123,9 @@ "api = KaggleApi()\n", "api.authenticate()\n", "api.dataset_download_files(\n", - " \"fedesoriano/heart-failure-prediction\", path=DATA_DIR, unzip=True,\n", + " \"fedesoriano/heart-failure-prediction\",\n", + " path=DATA_DIR,\n", + " unzip=True,\n", ")" ] }, @@ -536,7 +538,9 @@ "source": [ "dataset = dataset.cast_column(\"outcome\", ClassLabel(num_classes=2))\n", "dataset = dataset.train_test_split(\n", - " train_size=TRAIN_SIZE, stratify_by_column=\"outcome\", seed=RANDOM_SEED,\n", + " train_size=TRAIN_SIZE,\n", + " stratify_by_column=\"outcome\",\n", + " seed=RANDOM_SEED,\n", ")" ] }, @@ -579,7 +583,9 @@ "outputs": [], "source": [ "mortality_task = MortalityPredictionTask(\n", - " {model_name: model}, task_features=features_list, task_target=\"outcome\",\n", + " {model_name: model},\n", + " task_features=features_list,\n", + " task_target=\"outcome\",\n", ")" ] }, @@ -961,7 +967,8 @@ "source": [ "# Plotting the overall classification metric values.\n", "overall_performance_plot = plotter.metrics_value(\n", - " overall_performance, title=\"Overall Performance\",\n", + " overall_performance,\n", + " title=\"Overall Performance\",\n", ")\n", "report.log_plotly_figure(\n", " fig=overall_performance_plot,\n", @@ -1027,7 +1034,8 @@ "source": [ "# Plotting the fairness metrics\n", "fairness_plot = plotter.metrics_comparison_scatter(\n", - " fairness_metrics, title=\"Fairness Metrics\",\n", + " fairness_metrics,\n", + " title=\"Fairness Metrics\",\n", ")\n", "report.log_plotly_figure(\n", " fig=fairness_plot,\n", diff --git a/docs/source/tutorials/mimiciii/query_api.ipynb b/docs/source/tutorials/mimiciii/query_api.ipynb index eba11d290..a4239dfa2 100644 --- a/docs/source/tutorials/mimiciii/query_api.ipynb +++ b/docs/source/tutorials/mimiciii/query_api.ipynb @@ -77,7 +77,8 @@ " qo.ConditionEquals(\"expire_flag\", 1),\n", " qo.ConditionEquals(\"gender\", \"M\"),\n", ")\n", - "patients = querier.mimiciii.patients(ops=ops).run(limit=100)\n", + "patients = querier.mimiciii.patients()\n", + "patients = patients.ops(ops).run(limit=100)\n", "print(f\"{len(patients)} rows extracted!\")" ] }, @@ -100,20 +101,20 @@ }, "outputs": [], "source": [ - "ops = qo.ConditionEquals(\"gender\", \"F\")\n", - "diagnoses_ops = qo.ConditionSubstring(\"long_title\", \"gastroenteritis\")\n", - "patients = querier.mimiciii.patients(ops=ops)\n", - "admissions = querier.mimiciii.admissions(\n", - " join=qo.JoinArgs(join_table=patients.query, on=\"subject_id\"),\n", + "patients = querier.mimiciii.patients()\n", + "patients = patients.ops(qo.ConditionEquals(\"gender\", \"F\"))\n", + "admissions = querier.mimiciii.admissions()\n", + "patient_admissions = patients.join(\n", + " join_table=admissions,\n", + " on=\"subject_id\",\n", ")\n", - "diagnoses = querier.diagnoses(\n", - " join=qo.JoinArgs(\n", - " join_table=admissions.query,\n", - " on=[\"subject_id\", \"hadm_id\"],\n", - " ),\n", - " ops=diagnoses_ops,\n", + "diagnoses = querier.diagnoses()\n", + "diagnoses = diagnoses.ops(qo.ConditionSubstring(\"long_title\", \"gastroenteritis\"))\n", + "patient_admissions_diagnoses = patient_admissions.join(\n", + " join_table=diagnoses,\n", + " on=[\"subject_id\", \"hadm_id\"],\n", ").run(limit=100)\n", - "print(f\"{len(diagnoses)} rows extracted!\")" + "print(f\"{len(patient_admissions_diagnoses)} rows extracted!\")" ] }, { @@ -121,7 +122,7 @@ "id": "241f7d10-9e04-44ae-b325-87f5a4046df2", "metadata": {}, "source": [ - "## Example 3. Get potassium lab tests for female patient encounters." + "## Example 3. Get potassium lab tests for female patients." ] }, { @@ -133,11 +134,12 @@ }, "outputs": [], "source": [ - "ops = qo.ConditionEquals(\"gender\", \"F\")\n", - "patients = querier.mimiciii.patients(ops=ops)\n", - "lab_ops = qo.ConditionEquals(\"label\", \"potassium\")\n", - "labs = querier.labevents(ops=lab_ops).run(limit=100)\n", - "print(f\"{len(labs)} rows extracted!\")" + "patients = querier.mimiciii.patients()\n", + "patients = patients.ops(qo.ConditionEquals(\"gender\", \"F\"))\n", + "labs = querier.labevents()\n", + "labs = labs.ops(qo.ConditionEquals(\"label\", \"potassium\"))\n", + "patient_labs = patients.join(labs, on=\"subject_id\").run(limit=100)\n", + "print(f\"{len(patient_labs)} rows extracted!\")" ] }, { @@ -157,15 +159,17 @@ }, "outputs": [], "source": [ - "ops = qo.ConditionEquals(\"gender\", \"M\")\n", "chartevents_ops = qo.Sequential(\n", " qo.ConditionEquals(\"dbsource\", \"carevue\"),\n", " qo.ConditionEquals(\"label\", \"AaDO2\"),\n", " qo.ConditionLessThan(\"valuenum\", 20),\n", ")\n", - "patients = querier.mimiciii.patients(ops=ops)\n", - "chart_events = querier.chartevents(ops=chartevents_ops).run(limit=100)\n", - "print(f\"{len(chart_events)} rows extracted!\")" + "patients = querier.mimiciii.patients()\n", + "patients = patients.ops(qo.ConditionEquals(\"gender\", \"M\"))\n", + "chart_events = querier.chartevents()\n", + "chart_events = chart_events.ops(chartevents_ops)\n", + "patient_chart_events = patients.join(chart_events, on=\"subject_id\").run(limit=100)\n", + "print(f\"{len(patient_chart_events)} rows extracted!\")" ] } ], diff --git a/docs/source/tutorials/mimiciv/query_api.ipynb b/docs/source/tutorials/mimiciv/query_api.ipynb index eeccf1c32..98bce4897 100644 --- a/docs/source/tutorials/mimiciv/query_api.ipynb +++ b/docs/source/tutorials/mimiciv/query_api.ipynb @@ -74,15 +74,14 @@ "outputs": [], "source": [ "patients = querier.patients()\n", + "admissions = querier.mimiciv_hosp.admissions()\n", + "patient_admissions = patients.join(admissions, on=\"subject_id\")\n", "ops = qo.Sequential(\n", " qo.AddDeltaColumn([\"admittime\", \"dischtime\"], years=\"anchor_year_difference\"),\n", " qo.ConditionAfterDate(\"admittime\", \"2021-01-01\"),\n", ")\n", - "admissions = querier.mimiciv_hosp.admissions(\n", - " join=qo.JoinArgs(join_table=patients.query, on=\"subject_id\"),\n", - " ops=ops,\n", - ").run(limit=100)\n", - "print(f\"{len(admissions)} rows extracted!\")" + "patient_admissions = patient_admissions.ops(ops).run(limit=100)\n", + "print(f\"{len(patient_admissions)} rows extracted!\")" ] }, { @@ -100,27 +99,25 @@ "metadata": {}, "outputs": [], "source": [ - "diagnoses_ops = qo.Sequential(\n", - " qo.ConditionEquals(\"icd_version\", 10),\n", - " qo.ConditionSubstring(\"long_title\", \"schizophrenia\"),\n", - ")\n", - "admissions_ops = qo.Sequential(\n", + "patients = querier.patients()\n", + "admissions = querier.mimiciv_hosp.admissions()\n", + "patient_admissions = patients.join(admissions, on=\"subject_id\")\n", + "ops = qo.Sequential(\n", " qo.AddDeltaColumn([\"admittime\", \"dischtime\"], years=\"anchor_year_difference\"),\n", " qo.ConditionInYears(\"admittime\", \"2015\"),\n", ")\n", - "patients = querier.patients()\n", - "admissions = querier.mimiciv_hosp.admissions(\n", - " join=qo.JoinArgs(join_table=patients.query, on=\"subject_id\"),\n", - " ops=admissions_ops,\n", + "patient_admissions = patient_admissions.ops(ops)\n", + "diagnoses = querier.diagnoses()\n", + "diagnoses_ops = qo.Sequential(\n", + " qo.ConditionEquals(\"icd_version\", 10),\n", + " qo.ConditionSubstring(\"long_title\", \"schizophrenia\"),\n", ")\n", - "diagnoses = querier.diagnoses(\n", - " join=qo.JoinArgs(\n", - " join_table=admissions.query,\n", - " on=[\"subject_id\", \"hadm_id\"],\n", - " ),\n", - " ops=diagnoses_ops,\n", + "diagnoses = diagnoses.ops(diagnoses_ops)\n", + "patient_admissions_diagnoses = patient_admissions.join(\n", + " join_table=diagnoses,\n", + " on=[\"subject_id\", \"hadm_id\"],\n", ").run(limit=100)\n", - "print(f\"{len(diagnoses)} rows extracted!\")" + "print(f\"{len(patient_admissions_diagnoses)} rows extracted!\")" ] }, { @@ -138,27 +135,25 @@ "metadata": {}, "outputs": [], "source": [ - "admissions_ops = qo.Sequential(\n", + "patients = querier.patients()\n", + "admissions = querier.mimiciv_hosp.admissions()\n", + "patient_admissions = patients.join(admissions, on=\"subject_id\")\n", + "ops = qo.Sequential(\n", " qo.AddDeltaColumn([\"admittime\", \"dischtime\"], years=\"anchor_year_difference\"),\n", " qo.ConditionInYears(\"admittime\", \"2015\"),\n", ")\n", + "patient_admissions = patient_admissions.ops(ops)\n", + "diagnoses = querier.diagnoses()\n", "diagnoses_ops = qo.Sequential(\n", " qo.ConditionEquals(\"icd_version\", 9),\n", " qo.ConditionRegexMatch(\"long_title\", r\"(?=.*schizophrenia)(?=.*chronic)\"),\n", ")\n", - "patients = querier.patients()\n", - "admissions = querier.mimiciv_hosp.admissions(\n", - " join=qo.JoinArgs(join_table=patients.query, on=\"subject_id\"),\n", - " ops=admissions_ops,\n", - ")\n", - "diagnoses = querier.diagnoses(\n", - " join=qo.JoinArgs(\n", - " join_table=admissions.query,\n", - " on=[\"subject_id\", \"hadm_id\"],\n", - " ),\n", - " ops=diagnoses_ops,\n", + "diagnoses = diagnoses.ops(diagnoses_ops)\n", + "patient_admissions_diagnoses = patient_admissions.join(\n", + " join_table=diagnoses,\n", + " on=[\"subject_id\", \"hadm_id\"],\n", ").run(limit=100)\n", - "print(f\"{len(diagnoses)} rows extracted!\")" + "print(f\"{len(patient_admissions_diagnoses)} rows extracted!\")" ] }, { @@ -176,24 +171,21 @@ "metadata": {}, "outputs": [], "source": [ - "admissions_ops = qo.Sequential(\n", + "patients = querier.patients()\n", + "admissions = querier.mimiciv_hosp.admissions()\n", + "patient_admissions = patients.join(admissions, on=\"subject_id\")\n", + "ops = qo.Sequential(\n", " qo.AddDeltaColumn([\"admittime\", \"dischtime\"], years=\"anchor_year_difference\"),\n", " qo.ConditionInYears(\"admittime\", \"2015\"),\n", ")\n", - "chartevents_ops = qo.ConditionEquals(\"category\", \"Routine Vital Signs\")\n", - "patients = querier.patients()\n", - "admissions = querier.mimiciv_hosp.admissions(\n", - " join=qo.JoinArgs(join_table=patients.query, on=\"subject_id\"),\n", - " ops=admissions_ops,\n", - ")\n", - "vitals = querier.chartevents(\n", - " join=qo.JoinArgs(\n", - " join_table=admissions.query,\n", - " on=[\"subject_id\", \"hadm_id\"],\n", - " ),\n", - " ops=chartevents_ops,\n", + "patient_admissions = patient_admissions.ops(ops)\n", + "chart_events = querier.chartevents()\n", + "vitals = chart_events.ops(qo.ConditionEquals(\"category\", \"Routine Vital Signs\"))\n", + "patient_admissions_vitals = patient_admissions.join(\n", + " join_table=vitals,\n", + " on=[\"subject_id\", \"hadm_id\"],\n", ").run(limit=100)\n", - "print(f\"{len(vitals)} rows extracted!\")" + "print(f\"{len(patient_admissions_vitals)} rows extracted!\")" ] }, { @@ -211,24 +203,21 @@ "metadata": {}, "outputs": [], "source": [ - "admissions_ops = qo.Sequential(\n", + "patients = querier.patients()\n", + "admissions = querier.mimiciv_hosp.admissions()\n", + "patient_admissions = patients.join(admissions, on=\"subject_id\")\n", + "ops = qo.Sequential(\n", " qo.AddDeltaColumn([\"admittime\", \"dischtime\"], years=\"anchor_year_difference\"),\n", " qo.ConditionInYears(\"admittime\", \"2009\"),\n", ")\n", - "labevents_ops = qo.ConditionEquals(\"label\", \"hemoglobin\")\n", - "patients = querier.patients()\n", - "admissions = querier.mimiciv_hosp.admissions(\n", - " join=qo.JoinArgs(join_table=patients.query, on=\"subject_id\"),\n", - " ops=admissions_ops,\n", - ")\n", - "labs = querier.chartevents(\n", - " join=qo.JoinArgs(\n", - " join_table=admissions.query,\n", - " on=[\"subject_id\", \"hadm_id\"],\n", - " ),\n", - " ops=labevents_ops,\n", + "patient_admissions = patient_admissions.ops(ops)\n", + "chart_events = querier.chartevents()\n", + "labs = chart_events.ops(qo.ConditionEquals(\"label\", \"hemoglobin\"))\n", + "patient_admissions_labs = patient_admissions.join(\n", + " join_table=labs,\n", + " on=[\"subject_id\", \"hadm_id\"],\n", ").run(limit=100)\n", - "print(f\"{len(labs)} rows extracted!\")" + "print(f\"{len(patient_admissions_labs)} rows extracted!\")" ] }, { @@ -236,7 +225,7 @@ "id": "b0a9bc12-dda3-4445-9156-52d295a1c48f", "metadata": {}, "source": [ - "## Example 6. Get radiology reports and filter on keywords `lymphadenopathy` and `infectious` occurring together." + "## Example 6. Get radiology reports and filter on keywords `lymphadenopathy` and `infectious` occurring together from year 2009." ] }, { @@ -248,31 +237,27 @@ }, "outputs": [], "source": [ - "admissions_ops = qo.Sequential(\n", + "patients = querier.patients()\n", + "admissions = querier.mimiciv_hosp.admissions()\n", + "patient_admissions = patients.join(admissions, on=\"subject_id\")\n", + "ops = qo.Sequential(\n", " qo.AddDeltaColumn([\"admittime\", \"dischtime\"], years=\"anchor_year_difference\"),\n", " qo.ConditionInYears(\"admittime\", \"2009\"),\n", ")\n", - "patients = querier.patients()\n", - "admissions = querier.mimiciv_hosp.admissions(\n", - " join=qo.JoinArgs(join_table=patients.query, on=\"subject_id\"),\n", - " ops=admissions_ops,\n", - ")\n", + "patient_admissions = patient_admissions.ops(ops)\n", + "radiology_notes = querier.mimiciv_note.radiology()\n", "radiology_notes_ops = qo.Sequential(\n", " qo.And(\n", - " [\n", - " qo.ConditionLike(\"text\", \"% lymphadenopathy %\"),\n", - " qo.ConditionLike(\"text\", \"% infectious %\"),\n", - " ],\n", + " qo.ConditionLike(\"text\", \"% lymphadenopathy %\"),\n", + " qo.ConditionLike(\"text\", \"% infectious %\"),\n", " ),\n", ")\n", - "radiology_notes = querier.mimiciv_note.radiology(\n", - " join=qo.JoinArgs(\n", - " join_table=admissions.query,\n", - " on=[\"subject_id\", \"hadm_id\"],\n", - " ),\n", - " ops=radiology_notes_ops,\n", + "radiology_notes = radiology_notes.ops(radiology_notes_ops)\n", + "patient_admissions_radiology_notes = patient_admissions.join(\n", + " join_table=radiology_notes,\n", + " on=[\"subject_id\", \"hadm_id\"],\n", ").run(limit=100)\n", - "print(f\"{len(radiology_notes)} rows extracted!\")" + "print(f\"{len(patient_admissions_radiology_notes)} rows extracted!\")" ] }, { @@ -290,20 +275,24 @@ "metadata": {}, "outputs": [], "source": [ - "admissions_ops = qo.Sequential(\n", + "patients = querier.patients()\n", + "admissions = querier.mimiciv_hosp.admissions()\n", + "patient_admissions = patients.join(admissions, on=\"subject_id\")\n", + "ops = qo.Sequential(\n", " qo.AddDeltaColumn([\"admittime\", \"dischtime\"], years=\"anchor_year_difference\"),\n", " qo.ConditionInYears(\"admittime\", \"2015\"),\n", " qo.Cast(\"gender\", \"str\"),\n", " qo.ConditionEquals(\"gender\", \"F\"),\n", ")\n", - "patients = querier.patients()\n", - "admissions = querier.mimiciv_hosp.admissions(\n", - " join=qo.JoinArgs(join_table=patients.query, on=\"subject_id\"),\n", - " ops=admissions_ops,\n", - ").run(backend=\"dask\", index_col=\"subject_id\", n_partitions=4)\n", - "print(f\"{len(admissions)} rows extracted!\")\n", - "print(f\"Return type: {type(admissions)}\")\n", - "print(f\"Number of partitions: {admissions.npartitions}\")" + "patient_admissions = patient_admissions.ops(ops)\n", + "patient_admissions = patient_admissions.run(\n", + " backend=\"dask\",\n", + " index_col=\"subject_id\",\n", + " n_partitions=4,\n", + ")\n", + "print(f\"{len(patient_admissions)} rows extracted!\")\n", + "print(f\"Return type: {type(patient_admissions)}\")\n", + "print(f\"Number of partitions: {patient_admissions.npartitions}\")" ] }, { diff --git a/docs/source/tutorials/nihcxr/cxr_classification.ipynb b/docs/source/tutorials/nihcxr/cxr_classification.ipynb index d78a66ed2..1d1b1fda6 100644 --- a/docs/source/tutorials/nihcxr/cxr_classification.ipynb +++ b/docs/source/tutorials/nihcxr/cxr_classification.ipynb @@ -112,14 +112,19 @@ "transforms = Compose(\n", " [\n", " Resized(\n", - " keys=(\"image\",), spatial_size=(224, 224), allow_missing_keys=True,\n", + " keys=(\"image\",),\n", + " spatial_size=(224, 224),\n", + " allow_missing_keys=True,\n", " ),\n", " Lambdad(\n", " keys=(\"image\",),\n", " func=lambda x: ((2 * (x / 255.0)) - 1.0) * 1024,\n", " allow_missing_keys=True,\n", " ),\n", - " Lambdad((\"image\",), func=lambda x: np.mean(x, axis=0)[np.newaxis, :] if x.shape[0] != 1 else x),\n", + " Lambdad(\n", + " (\"image\",),\n", + " func=lambda x: np.mean(x, axis=0)[np.newaxis, :] if x.shape[0] != 1 else x,\n", + " ),\n", " ],\n", ")" ] @@ -141,15 +146,17 @@ "source": [ "model = PTModel(DenseNet(weights=\"densenet121-res224-nih\"))\n", "model.initialize()\n", - "nih_ds = model.predict(nih_ds,\n", - " feature_columns=[\"image\"],\n", - " transforms=partial(apply_transforms, transforms=transforms),\n", - " model_name=\"densenet\",\n", - " )\n", + "nih_ds = model.predict(\n", + " nih_ds,\n", + " feature_columns=[\"image\"],\n", + " transforms=partial(apply_transforms, transforms=transforms),\n", + " model_name=\"densenet\",\n", + ")\n", "\n", "# remove any rows with No Finding == 1\n", "nih_ds = nih_ds.filter(\n", - " partial(filter_value, column_name=\"No Finding\", value=1, negate=True), batched=True,\n", + " partial(filter_value, column_name=\"No Finding\", value=1, negate=True),\n", + " batched=True,\n", ")\n", "\n", "# remove the No Finding column and adjust the predictions to account for it\n", @@ -370,7 +377,9 @@ ")\n", "\n", "report.log_plotly_figure(\n", - " fig=fig, caption=\"Pathology Distribution\", section_name=\"datasets\",\n", + " fig=fig,\n", + " caption=\"Pathology Distribution\",\n", + " section_name=\"datasets\",\n", ")\n", "\n", "fig.show()" diff --git a/docs/source/tutorials/nihcxr/monitor_api.ipynb b/docs/source/tutorials/nihcxr/monitor_api.ipynb index 6f1845fd3..8b8ba8c6f 100644 --- a/docs/source/tutorials/nihcxr/monitor_api.ipynb +++ b/docs/source/tutorials/nihcxr/monitor_api.ipynb @@ -55,21 +55,29 @@ "outputs": [], "source": [ "shifter = ClinicalShiftApplicator(\n", - " \"sex\", source=None, target=\"F\", shift_id=\"Patient Gender\",\n", + " \"sex\",\n", + " source=None,\n", + " target=\"F\",\n", + " shift_id=\"Patient Gender\",\n", ")\n", "source_ds, target_ds = shifter.apply_shift(nih_ds, num_proc=6)\n", "\n", "transforms = Compose(\n", " [\n", " Resized(\n", - " keys=(\"image\",), spatial_size=(224, 224), allow_missing_keys=True,\n", + " keys=(\"image\",),\n", + " spatial_size=(224, 224),\n", + " allow_missing_keys=True,\n", " ),\n", " Lambdad(\n", " keys=(\"image\",),\n", " func=lambda x: ((2 * (x / 255.0)) - 1.0) * 1024,\n", " allow_missing_keys=True,\n", " ),\n", - " Lambdad((\"image\",), func=lambda x: np.mean(x, axis=0)[np.newaxis, :] if x.shape[0] != 1 else x),\n", + " Lambdad(\n", + " (\"image\",),\n", + " func=lambda x: np.mean(x, axis=0)[np.newaxis, :] if x.shape[0] != 1 else x,\n", + " ),\n", " ],\n", ")" ] @@ -99,9 +107,18 @@ "\n", "for name, dr_method in dr_methods.items():\n", " if name == \"TXRV-AE\":\n", - " reductor = Reductor(dr_method=dr_method, transforms=transforms, feature_columns=[\"image\"])\n", + " reductor = Reductor(\n", + " dr_method=dr_method,\n", + " transforms=transforms,\n", + " feature_columns=[\"image\"],\n", + " )\n", " else:\n", - " reductor = Reductor(dr_method=dr_method, model=model, transforms=transforms, feature_columns=[\"image\"])\n", + " reductor = Reductor(\n", + " dr_method=dr_method,\n", + " model=model,\n", + " transforms=transforms,\n", + " feature_columns=[\"image\"],\n", + " )\n", " detector = Detector(\n", " \"sensitivity_test\",\n", " reductor=reductor,\n", @@ -141,7 +158,11 @@ " detector = Detector(\n", " \"sensitivity_test\",\n", " reductor=Reductor(\n", - " dr_method=\"bbse-soft\", model=DenseNet(weights=model), transforms=transforms, feature_columns=[\"image\"]),\n", + " dr_method=\"bbse-soft\",\n", + " model=DenseNet(weights=model),\n", + " transforms=transforms,\n", + " feature_columns=[\"image\"],\n", + " ),\n", " tester=TSTester(tester_method=\"ks\"),\n", " source_sample_size=50,\n", " target_sample_size=[10, 25, 50],\n", @@ -183,13 +204,20 @@ "for name, target_slice in target_slices.items():\n", " source_slice = None\n", " shifter = ClinicalShiftApplicator(\n", - " \"custom\", source=source_slice, target=target_slice,\n", + " \"custom\",\n", + " source=source_slice,\n", + " target=target_slice,\n", " )\n", " ds_source, ds_target = shifter.apply_shift(nih_ds, num_proc=6)\n", "\n", " detector = Detector(\n", " \"sensitivity_test\",\n", - " reductor=Reductor(dr_method=\"bbse-soft\", model=model, transforms=transforms, feature_columns=[\"image\"]),\n", + " reductor=Reductor(\n", + " dr_method=\"bbse-soft\",\n", + " model=model,\n", + " transforms=transforms,\n", + " feature_columns=[\"image\"],\n", + " ),\n", " tester=TSTester(tester_method=\"ks\"),\n", " source_sample_size=50,\n", " target_sample_size=[10, 25, 50],\n", @@ -219,7 +247,12 @@ "model = DenseNet(weights=\"densenet121-res224-all\")\n", "detector = Detector(\n", " \"rolling_window_drift\",\n", - " reductor=Reductor(dr_method=\"bbse-soft\", model=model, transforms=transforms, feature_columns=[\"image\"]),\n", + " reductor=Reductor(\n", + " dr_method=\"bbse-soft\",\n", + " model=model,\n", + " transforms=transforms,\n", + " feature_columns=[\"image\"],\n", + " ),\n", " tester=TSTester(tester_method=\"ks\"),\n", " source_sample_size=50,\n", " target_sample_size=10,\n", diff --git a/docs/source/tutorials/omop/query_api.ipynb b/docs/source/tutorials/omop/query_api.ipynb index d9d2acc3e..23fb06cac 100644 --- a/docs/source/tutorials/omop/query_api.ipynb +++ b/docs/source/tutorials/omop/query_api.ipynb @@ -64,7 +64,7 @@ " schema_name=\"cdm_synthea10\",\n", ")\n", "# List all tables.\n", - "querier.list_tables()" + "querier.list_tables(\"cdm_synthea10\")" ] }, { @@ -84,8 +84,9 @@ "metadata": {}, "outputs": [], "source": [ - "ops = qo.ConditionAfterDate(\"visit_start_date\", \"2010-01-01\")\n", - "visits = querier.visit_occurrence(ops=ops).run(limit=100)\n", + "visits = querier.visit_occurrence()\n", + "visits = visits.ops(qo.ConditionAfterDate(\"visit_start_date\", \"2010-01-01\"))\n", + "visits = visits.run(limit=100)\n", "print(f\"{len(visits)} rows extracted!\")\n", "pd.to_datetime(visits[\"visit_start_date\"]).dt.year.value_counts().sort_index()" ] @@ -105,12 +106,14 @@ "metadata": {}, "outputs": [], "source": [ - "ops = qo.Sequential(qo.ConditionAfterDate(\"visit_start_date\", \"2020-01-01\"))\n", - "visits = querier.visit_occurrence(ops=ops)\n", - "measurements = querier.measurement(\n", - " join=qo.JoinArgs(join_table=visits.query, on=\"visit_occurrence_id\"),\n", + "visits = querier.visit_occurrence()\n", + "visits = visits.ops(qo.ConditionAfterDate(\"visit_start_date\", \"2020-01-01\"))\n", + "measurements = querier.measurement()\n", + "visits_measurements = visits.join(\n", + " join_table=measurements,\n", + " on=\"visit_occurrence_id\",\n", ").run(limit=100)\n", - "print(f\"{len(measurements)} rows extracted!\")" + "print(f\"{len(visits_measurements)} rows extracted!\")" ] }, { @@ -182,18 +185,19 @@ }, "outputs": [], "source": [ - "ops = qo.ConditionAfterDate(\"visit_start_date\", \"2010-01-01\")\n", - "visits = querier.visit_occurrence(ops=ops)\n", + "visits = querier.visit_occurrence()\n", + "visits = visits.ops(qo.ConditionAfterDate(\"visit_start_date\", \"2010-01-01\"))\n", "visits_concept_mapped = querier.map_concept_ids_to_name(\n", - " visits.query,\n", + " visits,\n", " [\n", " \"discharge_to_concept_id\",\n", " \"admitting_concept_id\",\n", " ],\n", ")\n", - "visits_ops = qo.ConditionSubstring(\"discharge_to_concept_name\", \"died\")\n", - "visits = querier.get_interface(visits_concept_mapped, ops=visits_ops).run(limit=100)\n", - "print(f\"{len(visits)} rows extracted!\")" + "visits_concept_mapped_died = visits_concept_mapped.ops(\n", + " qo.ConditionSubstring(\"discharge_to_concept_name\", \"died\"),\n", + ").run()\n", + "print(f\"{len(visits_concept_mapped_died)} rows extracted!\")" ] }, { @@ -215,28 +219,35 @@ }, "outputs": [], "source": [ - "persons_ops = qo.ConditionSubstring(\"gender_concept_name\", \"FEMALE\")\n", - "cohort = querier.person(ops=persons_ops)\n", - "cohort = querier.visit_occurrence(join=qo.JoinArgs(cohort.query, on=\"person_id\"))\n", - "cohort = querier.omop.condition_occurrence(\n", - " join=qo.JoinArgs(cohort.query, on=\"visit_occurrence_id\", isouter=True),\n", + "persons = querier.person()\n", + "persons = persons.ops(qo.ConditionSubstring(\"gender_concept_name\", \"FEMALE\"))\n", + "visits = querier.visit_occurrence()\n", + "person_visits = persons.join(visits, on=\"person_id\")\n", + "conditions = querier.omop.condition_occurrence()\n", + "person_visits_conditions = person_visits.join(\n", + " conditions,\n", + " on=\"visit_occurrence_id\",\n", + " isouter=True,\n", ")\n", - "cohort = querier.measurement(\n", - " join=qo.JoinArgs(cohort.query, on=\"visit_occurrence_id\", isouter=True),\n", + "measurement = querier.measurement()\n", + "person_visits_conditions_measurements = person_visits_conditions.join(\n", + " measurement,\n", + " on=\"visit_occurrence_id\",\n", + " isouter=True,\n", ")\n", - "cohort_query = querier.map_concept_ids_to_name(\n", - " cohort.query,\n", + "person_visits_conditions_measurements = querier.map_concept_ids_to_name(\n", + " person_visits_conditions_measurements,\n", " [\n", " \"discharge_to_concept_id\",\n", " \"admitting_concept_id\",\n", " \"condition_concept_id\",\n", " ],\n", ")\n", - "sepsis_died_filter = qo.Sequential(\n", + "ops = qo.Sequential(\n", " qo.ConditionSubstring(\"discharge_to_concept_name\", \"died\"),\n", " qo.ConditionSubstring(\"condition_concept_name\", \"sepsis\"),\n", ")\n", - "cohort = querier.get_interface(cohort_query, ops=sepsis_died_filter).run(limit=100)\n", + "cohort = person_visits_conditions_measurements.ops(ops).run(limit=100)\n", "print(f\"{len(cohort)} rows extracted!\")" ] }, diff --git a/docs/source/tutorials/synthea/los_prediction.ipynb b/docs/source/tutorials/synthea/los_prediction.ipynb index 97ff023f3..ba5c7e8b2 100644 --- a/docs/source/tutorials/synthea/los_prediction.ipynb +++ b/docs/source/tutorials/synthea/los_prediction.ipynb @@ -155,7 +155,9 @@ "def get_encounters():\n", " \"\"\"Get encounters data.\"\"\"\n", " patients = querier.native.patients(\n", - " ops=qo.Sequential([qo.Keep([\"id\", \"birthdate\", \"gender\", \"race\", \"ethnicity\"])]),\n", + " ops=qo.Sequential(\n", + " [qo.Keep([\"id\", \"birthdate\", \"gender\", \"race\", \"ethnicity\"])],\n", + " ),\n", " )\n", " ops = qo.Sequential(\n", " [\n", @@ -163,7 +165,10 @@ " qo.ExtractTimestampComponent(\"start\", \"year\", \"start_year\"),\n", " qo.ExtractTimestampComponent(\"birthdate\", \"year\", \"birthdate_year\"),\n", " qo.AddColumn(\n", - " \"start_year\", \"birthdate_year\", new_col_labels=\"age\", negative=True,\n", + " \"start_year\",\n", + " \"birthdate_year\",\n", + " new_col_labels=\"age\",\n", + " negative=True,\n", " ),\n", " qo.AddColumn(\"stop\", \"start\", new_col_labels=\"los\", negative=True),\n", " qo.ConditionGreaterThan(\"los\", 1),\n", @@ -181,7 +186,6 @@ " return querier.native.encounters(ops=ops)\n", "\n", "\n", - "\n", "def get_observations(cohort):\n", " \"\"\"Get observations data.\"\"\"\n", " ops = qo.Sequential(\n", @@ -209,7 +213,10 @@ " )\n", " observations_count = querier.native.observations(ops=ops).run()\n", " observations_stats = observations.pivot_table(\n", - " index=\"encounter\", columns=\"description\", values=\"value\", aggfunc=\"max\",\n", + " index=\"encounter\",\n", + " columns=\"description\",\n", + " values=\"value\",\n", + " aggfunc=\"max\",\n", " ).add_prefix(\"obs_\")\n", "\n", " return [observations_count, observations_stats]\n", @@ -229,7 +236,6 @@ " return querier.native.medications(ops=ops).run()\n", "\n", "\n", - "\n", "def get_procedures(cohort):\n", " \"\"\"Get procedures data.\"\"\"\n", " ops = qo.Sequential(\n", @@ -244,7 +250,6 @@ " return querier.native.procedures(ops=ops).run()\n", "\n", "\n", - "\n", "def run_query():\n", " \"\"\"Run query pipeline.\"\"\"\n", " cohort_query = get_encounters()\n", @@ -258,13 +263,15 @@ " cohort = cohort_query.run()\n", " for to_merge_df in to_merge:\n", " cohort = cohort.merge(\n", - " to_merge_df, left_on=\"id\", right_on=\"encounter\", how=\"left\",\n", + " to_merge_df,\n", + " left_on=\"id\",\n", + " right_on=\"encounter\",\n", + " how=\"left\",\n", " )\n", " to_drop = list(cohort.columns[cohort.columns.str.startswith(\"encounter\")])\n", " return cohort.drop(columns=to_drop)\n", "\n", "\n", - "\n", "cohort = run_query()" ] }, @@ -743,7 +750,9 @@ "source": [ "dataset = dataset.cast_column(\"outcome\", ClassLabel(num_classes=2))\n", "dataset = dataset.train_test_split(\n", - " train_size=TRAIN_SIZE, stratify_by_column=\"outcome\", seed=RANDOM_SEED,\n", + " train_size=TRAIN_SIZE,\n", + " stratify_by_column=\"outcome\",\n", + " seed=RANDOM_SEED,\n", ")" ] }, @@ -790,7 +799,9 @@ "outputs": [], "source": [ "los_task = MortalityPredictionTask(\n", - " {model_name: model}, task_features=features_list, task_target=\"outcome\",\n", + " {model_name: model},\n", + " task_features=features_list,\n", + " task_target=\"outcome\",\n", ")" ] }, @@ -1216,7 +1227,8 @@ "source": [ "# Plotting the overall classification metric values.\n", "overall_performance_plot = plotter.metrics_value(\n", - " overall_performance, title=\"Overall Performance\",\n", + " overall_performance,\n", + " title=\"Overall Performance\",\n", ")\n", "report.log_plotly_figure(\n", " fig=overall_performance_plot,\n", @@ -1286,7 +1298,8 @@ "source": [ "# Plotting the fairness metrics\n", "fairness_plot = plotter.metrics_comparison_scatter(\n", - " fairness_metrics, title=\"Fairness Metrics\",\n", + " fairness_metrics,\n", + " title=\"Fairness Metrics\",\n", ")\n", "report.log_plotly_figure(\n", " fig=fairness_plot,\n", diff --git a/environment.yml b/environment.yml index b040f9a4c..50826bdd2 100644 --- a/environment.yml +++ b/environment.yml @@ -1,7 +1,7 @@ ############################################################################### # NOTE: This file has been auto-generated by poetry2conda # poetry2conda version = 0.3.0 -# date: Wed Aug 30 10:50:00 2023 +# date: Tue Sep 12 13:31:50 2023 ############################################################################### # If you want to change the contents of this file, you should probably change # the pyproject.toml file and then use poetry2conda again to update this file. @@ -9,31 +9,31 @@ ############################################################################### name: cyclops dependencies: - - python>=3.8,<3.11 + - python>=3.9,<3.12 - pandas>=1.4.1,<2.0.0 - - numpy<=1.23.0 + - numpy>=1.23.0,<2.0.0 - datasets>=2.10.1,<3.0.0 - pyarrow>=11.0.0,<12.0.0 - SQLAlchemy>=1.4.32,<2.0.0 - scikit-learn>=1.2.2,<2.0.0 - xgboost>=1.5.2,<2.0.0 - - llvmlite==0.38.0 + - llvmlite>=0.40.0,<0.41.0 - plotly>=5.7.0,<6.0.0 - pip - pip: - psutil>=5.9.4,<6.0.0 - - monai==1.1.0 + - monai>=1.1.0,<2.0.0 - dask>=2022.9.1,<2023.0.0 - - psycopg2==2.9.6 + - psycopg2>=2.9.6,<3.0.0 - hydra-core>=1.2.0,<2.0.0 - torch>=1.11.0,<2.0.0 - - torchxrayvision>=0.0.37,<0.0.38 - - alibi>=0.8.0,<0.9.0 - - alibi-detect>=0.10.4,<0.11.0 + - torchxrayvision>=1.2.0,<2.0.0 + - alibi>=0.9.4,<0.10.0 + - alibi-detect>=0.11.0,<0.12.0 - pydantic>=1.10.11,<2.0.0 - - spdx-tools==0.8.0a2 + - spdx-tools>=0.8.1,<0.9.0 - pybtex>=0.24.0,<0.25.0 - - kaleido>=0.2.1,<0.3.0 + - kaleido==0.2.1 - scour>=0.38.2,<0.39.0 - category-encoders>=2.6.1,<3.0.0 - pillow>=9.5.0,<10.0.0 diff --git a/nbs/explore_huggingface_datasets.ipynb b/nbs/explore_huggingface_datasets.ipynb index 1d5fdb34f..9129c72d3 100644 --- a/nbs/explore_huggingface_datasets.ipynb +++ b/nbs/explore_huggingface_datasets.ipynb @@ -164,7 +164,10 @@ "outputs": [], "source": [ "mimiciv_ds = load_dataset(\n", - " \"parquet\", data_files=parquet_files, split=Split.ALL, num_proc=NUM_PROC,\n", + " \"parquet\",\n", + " data_files=parquet_files,\n", + " split=Split.ALL,\n", + " num_proc=NUM_PROC,\n", ")\n", "\n", "# clear all other cache files, except for the current cache file\n", @@ -324,7 +327,8 @@ " example[0] in discharge_location_filter\n", " and example[1] in admission_location_filter\n", " for example in zip(\n", - " examples[\"discharge_location\"], examples[\"admission_location\"]\n", + " examples[\"discharge_location\"],\n", + " examples[\"admission_location\"],\n", " )\n", " ],\n", " batched=True,\n", @@ -513,7 +517,8 @@ "source": [ "# join the 3 metadata dataframes on subject_id and study_id\n", "metadata_df = metadata_df.merge(\n", - " split_df, on=[\"subject_id\", \"study_id\", \"dicom_id\"],\n", + " split_df,\n", + " on=[\"subject_id\", \"study_id\", \"dicom_id\"],\n", ").merge(negbio_df, on=[\"subject_id\", \"study_id\"])" ] }, @@ -537,7 +542,9 @@ "source": [ "# create HuggingFace Dataset from pandas DataFrame\n", "mimic_cxr_ds = Dataset.from_pandas(\n", - " metadata_df[metadata_df.split == \"train\"], split=\"train\", preserve_index=False,\n", + " metadata_df[metadata_df.split == \"train\"],\n", + " split=\"train\",\n", + " preserve_index=False,\n", ")\n", "mimic_cxr_ds" ] @@ -676,7 +683,6 @@ "outputs": [], "source": [ "ROOT_DIR = \"/mnt/data/clinical_datasets/coherent-11-07-2022/dicom/\"\n", - "# ROOT_DIR = \"/mnt/data/clinical_datasets/pseudo_phi_dataset/Pseudo-PHI-DICOM-Data/\"\n", "\n", "dcm_files = glob.glob(ROOT_DIR + \"/**/*.dcm\", recursive=True)\n", "len(dcm_files)" @@ -699,8 +705,8 @@ "source": [ "from cyclops.data import MedicalImage # noqa: E402\n", "\n", - "# or\n", - "# from cyclops.data.features import MedicalImage # noqa: E402" + "\n", + "# or" ] }, { @@ -793,7 +799,7 @@ "metadata": {}, "outputs": [], "source": [ - "import cyclops.evaluate.evaluator as evaluator # noqa: E402\n", + "from cyclops.evaluate import evaluator # noqa: E402\n", "from cyclops.evaluate.fairness import (\n", " FairnessConfig, # noqa: E402\n", " evaluate_fairness, # noqa: E402\n", @@ -824,7 +830,10 @@ "outputs": [], "source": [ "encounters_ds = load_dataset(\n", - " \"parquet\", data_files=ENCOUNTERS_FILE, split=Split.ALL, keep_in_memory=True,\n", + " \"parquet\",\n", + " data_files=ENCOUNTERS_FILE,\n", + " split=Split.ALL,\n", + " keep_in_memory=True,\n", ")\n", "encounters_ds.cleanup_cache_files()\n", "encounters_ds" @@ -841,7 +850,9 @@ "# NOTE: train_test_split does not work with IterableDataset objects\n", "encounters_ds = encounters_ds.cast_column(TAB_FEATURES[-1], ClassLabel(num_classes=2))\n", "encounters_ds = encounters_ds.train_test_split(\n", - " test_size=0.4, seed=42, stratify_by_column=TAB_FEATURES[-1],\n", + " test_size=0.4,\n", + " seed=42,\n", + " stratify_by_column=TAB_FEATURES[-1],\n", ")\n", "encounters_ds" ] @@ -1010,8 +1021,7 @@ "for slice_ in slice_list:\n", " slice_spec.add_slice_spec(slice_)\n", "\n", - "# or\n", - "# slice_spec = SliceSpec(spec_list=slice_list)" + "# or" ] }, { @@ -1216,7 +1226,7 @@ " ----\n", " df (pd.DataFrame): NIHCXR dataframe.\n", "\n", - " Returns:\n", + " Returns\n", " -------\n", " pd.DataFrame: pre-processed NIHCXR dataframe.\n", " \"\"\"\n", @@ -1232,11 +1242,12 @@ " return pd.concat([df, pathologies], axis=1)\n", "\n", "\n", - "\n", "nihcxr_dir = \"/mnt/data/clinical_datasets/NIHCXR\"\n", "\n", "test_df = pd.read_csv(\n", - " join(nihcxr_dir, \"test_list.txt\"), header=None, names=[\"Image Index\"],\n", + " join(nihcxr_dir, \"test_list.txt\"),\n", + " header=None,\n", + " names=[\"Image Index\"],\n", ")\n", "\n", "# select only the images in the test list\n", @@ -1316,7 +1327,7 @@ " examples = [transforms(example) for example in examples]\n", "\n", " # convert back to a dict of lists\n", - " return {k: [d[k] for d in examples] for k in examples[0]}\n" + " return {k: [d[k] for d in examples] for k in examples[0]}" ] }, { @@ -1326,22 +1337,10 @@ "metadata": {}, "outputs": [], "source": [ - "# from torch.utils.data import DataLoader\n", - "# from torch.utils.data.sampler import BatchSampler, RandomSampler\n", - "\n", - "# nih_dl = DataLoader(\n", "# nih_ds.with_transform(\n", - "# partial(apply_transforms, transforms=transforms),\n", - "# columns=[\"image\"],\n", - "# output_all_columns=True,\n", "# ),\n", - "# batch_size=TORCH_BATCH_SIZE,\n", - "# drop_last=False\n", - "# )\n", "\n", - "# for batch in nih_dl:\n", - "# print(batch)\n", - "# break" + "# for batch in nih_dl:" ] }, { @@ -1417,7 +1416,8 @@ "\n", "# remove any rows with No Finding == 1\n", "nih_ds = nih_ds.filter(\n", - " partial(filter_value, column_name=\"No Finding\", value=1, negate=True), batched=True,\n", + " partial(filter_value, column_name=\"No Finding\", value=1, negate=True),\n", + " batched=True,\n", ")\n", "\n", "# remove the No Finding column and adjust the predictions to account for it\n", diff --git a/nbs/monitor/gemini_drift_experiments/clinical_drift.ipynb b/nbs/monitor/gemini_drift_experiments/clinical_drift.ipynb index 3ef032e1d..dad9fd2ea 100644 --- a/nbs/monitor/gemini_drift_experiments/clinical_drift.ipynb +++ b/nbs/monitor/gemini_drift_experiments/clinical_drift.ipynb @@ -121,7 +121,12 @@ "\n", "\n", "(X_tr, y_tr), (X_val, y_val), (X_t, y_t), feats, admin_data = import_dataset_hospital(\n", - " admin_data, x, y, SHIFT, OUTCOME, HOSPITALS,\n", + " admin_data,\n", + " x,\n", + " y,\n", + " SHIFT,\n", + " OUTCOME,\n", + " HOSPITALS,\n", ")\n", "\n", "x = x.loc[~x.index.get_level_values(0).isin(X_tr.index.get_level_values(0))]\n", @@ -265,7 +270,9 @@ "outputs": [], "source": [ "X_val, X_t = experimenter.apply_clinical_shift(\n", - " x, source=exp_params[\"source\"], target=exp_params[\"target\"],\n", + " x,\n", + " source=exp_params[\"source\"],\n", + " target=exp_params[\"target\"],\n", ")\n", "# Normalize data\n", "X_val_normalized = normalize(admin_data, X_val, AGGREGATION_TYPE, TIMESTEPS)\n", diff --git a/nbs/monitor/gemini_drift_experiments/explainer.ipynb b/nbs/monitor/gemini_drift_experiments/explainer.ipynb index b057989e3..12cba8abf 100644 --- a/nbs/monitor/gemini_drift_experiments/explainer.ipynb +++ b/nbs/monitor/gemini_drift_experiments/explainer.ipynb @@ -67,7 +67,12 @@ "admin_data, x, y = get_gemini_data(PATH)\n", "\n", "(X_tr, y_tr), (X_val, y_val), (X_t, y_t), feats, admin_data = import_dataset_hospital(\n", - " admin_data, x, y, SHIFT, OUTCOME, HOSPITALS,\n", + " admin_data,\n", + " x,\n", + " y,\n", + " SHIFT,\n", + " OUTCOME,\n", + " HOSPITALS,\n", ")\n", "\n", "# Normalize data\n", @@ -155,7 +160,8 @@ "test_shap_values = explainer.get_shap_values(X_test_df)\n", "\n", "shap_diff = np.mean(np.abs(test_shap_values.values), axis=0) - np.mean(\n", - " np.abs(val_shap_values.values), axis=0,\n", + " np.abs(val_shap_values.values),\n", + " axis=0,\n", ")\n", "shap_min = -0.001\n", "shap_max = 0.001\n", diff --git a/nbs/monitor/gemini_drift_experiments/feature_shift.ipynb b/nbs/monitor/gemini_drift_experiments/feature_shift.ipynb index c031487d3..5eab2427a 100644 --- a/nbs/monitor/gemini_drift_experiments/feature_shift.ipynb +++ b/nbs/monitor/gemini_drift_experiments/feature_shift.ipynb @@ -7,8 +7,6 @@ "metadata": {}, "outputs": [], "source": [ - "# import sys\n", - "# sys.path.append(\"..\")\n", "import pickle\n", "from os import path\n", "from time import localtime, strftime, time\n", @@ -16,9 +14,6 @@ "import numpy as np\n", "import torch\n", "from drift_detection.fsd import FeatureShiftDetector\n", - "\n", - "# from drift_detection.fsd.divergence import FisherDivergence, KnnKS, ModelKS\n", - "# from drift_detection.fsd.fsd_models import GaussianDensity, Knn\n", "from gemini.utils import import_dataset_hospital\n", "from sklearn.metrics import confusion_matrix as sklearn_confusion_matrix" ] @@ -42,7 +37,11 @@ " feats,\n", " orig_dims,\n", ") = import_dataset_hospital(\n", - " SHIFT_EXPERIMENT, OUTCOME, HOSPITAL, NA_CUTOFF, shuffle=True,\n", + " SHIFT_EXPERIMENT,\n", + " OUTCOME,\n", + " HOSPITAL,\n", + " NA_CUTOFF,\n", + " shuffle=True,\n", ")" ] }, @@ -67,7 +66,6 @@ "method_list = [\n", " \"score-method\",\n", "] # we do not take the deep method into account with the simple boot.\n", - "# dataset_list = ['Energy', 'Gas', 'COVID']\n", "dataset_list = [\"COVID\"]\n", "t_split_interval = 50\n", "n_comp_sensors_list = [1]\n", @@ -152,10 +150,11 @@ " split_idx = int(split_idx)\n", " slice1 = split_idx\n", " slice2 = split_idx + 2 * n_samples\n", - " # try:\n", " pq = X_train[slice1:slice2] # Two sets of samples\n", " pq = transform_data(\n", - " pq, do_diff=do_diff, do_power_transform=do_power_transform,\n", + " pq,\n", + " do_diff=do_diff,\n", + " do_power_transform=do_power_transform,\n", " )\n", " p = pq[:n_samples]\n", " q = pq[n_samples : n_samples * 2].copy()\n", @@ -204,12 +203,16 @@ " confusion_tensor = np.zeros(shape=(n_dim, 2, 2))\n", " for feature_idx, feature_results in enumerate(detection_results):\n", " confusion_tensor[feature_idx] = sklearn_confusion_matrix(\n", - " feature_results[:, 1], feature_results[:, 2], labels=[0, 1],\n", + " feature_results[:, 1],\n", + " feature_results[:, 2],\n", + " labels=[0, 1],\n", " )\n", "\n", " # overall detection confusion matrix\n", " global_detection_confusion_matrix = sklearn_confusion_matrix(\n", - " global_truth, detection, labels=[0, 1],\n", + " global_truth,\n", + " detection,\n", + " labels=[0, 1],\n", " )\n", "\n", " full_tn, full_fp, full_fn, full_tp = confusion_tensor.sum(axis=0).flatten()\n", diff --git a/nbs/monitor/gemini_drift_experiments/synthetic_drift.ipynb b/nbs/monitor/gemini_drift_experiments/synthetic_drift.ipynb index 98ea5d408..ac60ab6f5 100644 --- a/nbs/monitor/gemini_drift_experiments/synthetic_drift.ipynb +++ b/nbs/monitor/gemini_drift_experiments/synthetic_drift.ipynb @@ -99,7 +99,12 @@ "source": [ "# Get subset\n", "(X_tr, y_tr), (X_val, y_val), (X_t, y_t), feats, admin_data = import_dataset_hospital(\n", - " admin_data, x, y, \"random\", OUTCOME, HOSPITALS,\n", + " admin_data,\n", + " x,\n", + " y,\n", + " \"random\",\n", + " OUTCOME,\n", + " HOSPITALS,\n", ")\n", "\n", "# Normalize data\n", @@ -246,7 +251,9 @@ "outputs": [], "source": [ "experimenter_custom = Experimenter(\n", - " detector=detector, shiftapplicator=shiftapplicator, admin_data=admin_data,\n", + " detector=detector,\n", + " shiftapplicator=shiftapplicator,\n", + " admin_data=admin_data,\n", ")" ] }, @@ -266,7 +273,11 @@ "outputs": [], "source": [ "X_t_final_shifted = experimenter_custom.apply_synthetic_shift(\n", - " X_t_final, shift_type=\"gn_shift\", delta=0.01, noise_amt=0.01, clip=False,\n", + " X_t_final,\n", + " shift_type=\"gn_shift\",\n", + " delta=0.01,\n", + " noise_amt=0.01,\n", + " clip=False,\n", ")\n", "\n", "results = experimenter_custom.detect_shift_samples(X_t_final_shifted)\n", diff --git a/nbs/monitor/mortality/preprocessing.ipynb b/nbs/monitor/mortality/preprocessing.ipynb index cda6bc0d2..61968d911 100644 --- a/nbs/monitor/mortality/preprocessing.ipynb +++ b/nbs/monitor/mortality/preprocessing.ipynb @@ -388,10 +388,15 @@ "shape = (len(aligned_timestamps), num_timesteps)\n", "\n", "arr1 = timestamp_ffill_agg(\n", - " aligned_timestamps[\"target_timestep\"], num_timesteps, fill_nan=2,\n", + " aligned_timestamps[\"target_timestep\"],\n", + " num_timesteps,\n", + " fill_nan=2,\n", ")\n", "arr2 = timestamp_ffill_agg(\n", - " aligned_timestamps[discharge_timestep], num_timesteps, val=-1, fill_nan=2,\n", + " aligned_timestamps[discharge_timestep],\n", + " num_timesteps,\n", + " val=-1,\n", + " fill_nan=2,\n", ")\n", "targets = np.minimum(arr1, arr2)\n", "targets[targets == 2] = 0\n", @@ -437,10 +442,10 @@ "outputs": [], "source": [ "# Include target\n", - "# temp_vectorized = temp_vectorized.remove_with_index(EVENT_NAME, TEMP_TARGETS)\n", - "# print(temp_vectorized.shape)\n", "temp_vectorized = temp_vectorized.concat_over_axis(\n", - " EVENT_NAME, targets, use_case_params.TEMP_TARGETS,\n", + " EVENT_NAME,\n", + " targets,\n", + " use_case_params.TEMP_TARGETS,\n", ")\n", "temp_vectorized.shape" ] @@ -549,7 +554,9 @@ "source": [ "# Combine\n", "comb_vectorized = temp_vectorized.concat_over_axis(\n", - " EVENT_NAME, tab_aggregated_vec.data, tab_aggregated_vec.get_index(EVENT_NAME),\n", + " EVENT_NAME,\n", + " tab_aggregated_vec.data,\n", + " tab_aggregated_vec.get_index(EVENT_NAME),\n", ")\n", "comb_vectorized.shape" ] @@ -642,7 +649,8 @@ "outputs": [], "source": [ "tab_vectorized, temp_vectorized, comb_vectorized = intersect_vectorized(\n", - " [tab_vectorized, temp_vectorized, comb_vectorized], axes=ENCOUNTER_ID,\n", + " [tab_vectorized, temp_vectorized, comb_vectorized],\n", + " axes=ENCOUNTER_ID,\n", ")\n", "tab_vectorized.shape, temp_vectorized.shape, comb_vectorized.shape" ] @@ -812,7 +820,8 @@ "outputs": [], "source": [ "temp_train_X, temp_train_y = temp_train.split_out(\n", - " EVENT_NAME, use_case_params.TEMP_TARGETS,\n", + " EVENT_NAME,\n", + " use_case_params.TEMP_TARGETS,\n", ")\n", "temp_train_X.shape, temp_train_y.shape" ] @@ -847,7 +856,8 @@ "outputs": [], "source": [ "comb_train_X, comb_train_y = comb_train.split_out(\n", - " EVENT_NAME, use_case_params.TEMP_TARGETS,\n", + " EVENT_NAME,\n", + " use_case_params.TEMP_TARGETS,\n", ")\n", "comb_train_X.shape, comb_train_y.shape" ] diff --git a/nbs/monitor/mortality/static_model.ipynb b/nbs/monitor/mortality/static_model.ipynb index ed14becd4..36c0f3616 100644 --- a/nbs/monitor/mortality/static_model.ipynb +++ b/nbs/monitor/mortality/static_model.ipynb @@ -27,16 +27,9 @@ "import pickle\n", "import random\n", "\n", - "# import matplotlib as mpl\n", "import matplotlib.pyplot as plt\n", "import numpy as np\n", - "\n", - "# import pandas as pd\n", "import scipy.stats as st\n", - "\n", - "# from cyclops.processors.constants import FEATURES, NUMERIC, ORDINAL, STANDARD\n", - "# from cyclops.processors.feature.feature import TabularFeatures\n", - "# from cyclops.utils.file import load_dataframe, save_pickle\n", "from drift_detection.baseline_models.static.utils import run_model\n", "from drift_detection.gemini.utils import (\n", " get_label,\n", @@ -134,7 +127,12 @@ "admin_data, x, y = get_gemini_data(PATH)\n", "\n", "(X_tr, y_tr), (X_val, y_val), (X_t, y_t), feats, admin_data = import_dataset_hospital(\n", - " admin_data, x, y, SHIFT, OUTCOME, HOSPITALS,\n", + " admin_data,\n", + " x,\n", + " y,\n", + " SHIFT,\n", + " OUTCOME,\n", + " HOSPITALS,\n", ")\n", "\n", "# Normalize data\n", @@ -260,7 +258,10 @@ "def get_bootstrapped_metric(bs_metric):\n", " bs_mean = np.round(np.mean(bs_metric), 3)\n", " ci = st.t.interval(\n", - " 0.95, len(bs_metric) - 1, loc=np.mean(bs_metric), scale=st.sem(bs_metric),\n", + " 0.95,\n", + " len(bs_metric) - 1,\n", + " loc=np.mean(bs_metric),\n", + " scale=st.sem(bs_metric),\n", " )\n", " return (\n", " str(bs_mean)\n", @@ -353,20 +354,26 @@ "\n", " y_val_pred_prob = optimised_model.predict_proba(X_val_shuffled[:sample])[:, 1]\n", " val_fpr, val_tpr, val_thresholds = roc_curve(\n", - " y_val_shuffled[:sample], y_val_pred_prob[:sample], pos_label=1,\n", + " y_val_shuffled[:sample],\n", + " y_val_pred_prob[:sample],\n", + " pos_label=1,\n", " )\n", " val_roc_auc = auc(val_fpr, val_tpr)\n", " val_avg_pr = average_precision_score(\n", - " y_val_shuffled[:sample], y_val_pred_prob[:sample],\n", + " y_val_shuffled[:sample],\n", + " y_val_pred_prob[:sample],\n", " )\n", "\n", " y_test_pred_prob = optimised_model.predict_proba(X_test_shuffled[:sample])[:, 1]\n", " test_fpr, test_tpr, test_thresholds = roc_curve(\n", - " y_test_shuffled[:sample], y_test_pred_prob[:sample], pos_label=1,\n", + " y_test_shuffled[:sample],\n", + " y_test_pred_prob[:sample],\n", + " pos_label=1,\n", " )\n", " test_roc_auc = auc(test_fpr, test_tpr)\n", " test_avg_pr = average_precision_score(\n", - " y_test_shuffled[:sample], y_test_pred_prob[:sample],\n", + " y_test_shuffled[:sample],\n", + " y_test_pred_prob[:sample],\n", " )\n", "\n", " samp_metrics[si, i, 0, :] = [val_roc_auc, val_avg_pr]\n", diff --git a/nbs/monitor/mortality/temporal_model.ipynb b/nbs/monitor/mortality/temporal_model.ipynb index 9134f7216..45b75f71f 100644 --- a/nbs/monitor/mortality/temporal_model.ipynb +++ b/nbs/monitor/mortality/temporal_model.ipynb @@ -26,17 +26,12 @@ "import os\n", "import random\n", "\n", - "# import matplotlib as mpl\n", "import matplotlib.pyplot as plt\n", "import numpy as np\n", "import pandas as pd\n", "import plotly.graph_objects as go\n", "import seaborn as sns\n", - "\n", - "# import sys\n", "import torch\n", - "import torch.nn as nn\n", - "import torch.optim as optim\n", "from drift_detection.baseline_models.temporal.pytorch.optimizer import Optimizer\n", "from drift_detection.baseline_models.temporal.pytorch.utils import (\n", " get_data,\n", @@ -46,8 +41,8 @@ ")\n", "from drift_detection.gemini.utils import prep\n", "from sklearn import metrics\n", + "from torch import nn, optim\n", "\n", - "# from cyclops.processors.column_names import EVENT_NAME\n", "from cyclops.utils.file import load_pickle\n", "from use_cases.common.util import get_use_case_params" ] @@ -108,7 +103,8 @@ "unique, test_counts = np.unique(y_test, return_counts=True)\n", "print(\n", " pd.DataFrame(\n", - " {\"Train\": train_counts, \"Val\": val_counts, \"Test\": test_counts}, index=unique,\n", + " {\"Train\": train_counts, \"Val\": val_counts, \"Test\": test_counts},\n", + " index=unique,\n", " ),\n", ")" ] @@ -203,7 +199,9 @@ "source": [ "loss_fn = nn.BCEWithLogitsLoss(reduction=\"none\")\n", "optimizer = optim.Adagrad(\n", - " model.parameters(), lr=learning_rate, weight_decay=weight_decay,\n", + " model.parameters(),\n", + " lr=learning_rate,\n", + " weight_decay=weight_decay,\n", ")\n", "lr_scheduler = optim.lr_scheduler.StepLR(optimizer, step_size=128, gamma=0.5)\n", "activation = nn.Sigmoid()\n", @@ -241,10 +239,15 @@ "outputs": [], "source": [ "val_evaluate_loader = torch.utils.data.DataLoader(\n", - " val_dataset, batch_size=1, shuffle=False,\n", + " val_dataset,\n", + " batch_size=1,\n", + " shuffle=False,\n", ")\n", "y_val_labels, y_val_pred_values, y_val_pred_labels = opt.evaluate(\n", - " val_evaluate_loader, batch_size=1, n_features=input_dim, timesteps=timesteps,\n", + " val_evaluate_loader,\n", + " batch_size=1,\n", + " n_features=input_dim,\n", + " timesteps=timesteps,\n", ")\n", "\n", "y_val_pred_values = y_val_pred_values[y_val_labels != -1]\n", @@ -323,7 +326,10 @@ "test_dataset = get_data(X_test_inputs, y_test)\n", "test_loader = torch.utils.data.DataLoader(test_dataset, batch_size=1, shuffle=False)\n", "y_test_labels, y_pred_values, y_pred_labels = opt.evaluate(\n", - " test_loader, batch_size=1, n_features=input_dim, timesteps=timesteps,\n", + " test_loader,\n", + " batch_size=1,\n", + " n_features=input_dim,\n", + " timesteps=timesteps,\n", ")\n", "\n", "y_pred_values = y_pred_values[y_test_labels != -1]\n", @@ -381,7 +387,8 @@ "\n", "\n", "plot_confusion_matrix(\n", - " confusion_matrix, [\"low risk of mortality\", \"high risk of mortality\"],\n", + " confusion_matrix,\n", + " [\"low risk of mortality\", \"high risk of mortality\"],\n", ")" ] }, @@ -401,7 +408,11 @@ "outputs": [], "source": [ "y_test_labels, y_pred_values, y_pred_labels = opt.evaluate(\n", - " test_loader, batch_size=1, n_features=input_dim, timesteps=timesteps, flatten=False,\n", + " test_loader,\n", + " batch_size=1,\n", + " n_features=input_dim,\n", + " timesteps=timesteps,\n", + " flatten=False,\n", ")\n", "\n", "num_timesteps = y_pred_labels.shape[1]\n", @@ -448,47 +459,22 @@ "metadata": {}, "outputs": [], "source": [ - "# BASE_DATA_PATH = \"/mnt/nfs/project/delirium/drift_exp/risk_of_mortality\"\n", - "\n", - "# combined_events = load_dataframe(os.path.join(BASE_DATA_PATH, \"combined_events\"))\n", "# timestep_end_timestamps = load_dataframe(os.path.join(BASE_DATA_PATH,\n", "# \"aggmeta_end_ts\"))\n", "\n", - "# mortality_events = combined_events.loc[combined_events[\"event_name\"] == \"death\"]\n", "\n", - "# y_test_labels, y_pred_values, y_pred_labels = opt.evaluate(\n", - "# test_loader, batch_size=1, n_features=input_dim, timesteps=timesteps,\n", - "# flatten=False\n", - "# )\n", "# train_val_test_ids = load_dataframe(os.path.join(BASE_DATA_PATH,\n", "# \"train_val_test_ids\"))\n", - "# test_ids = train_val_test_ids[\"test\"].dropna()\n", "\n", - "# num_timesteps = y_pred_labels.shape[1]\n", - "# acc_timesteps = []\n", "# for timestep in range(num_timesteps):\n", - "# labels = y_test_labels[:, timestep]\n", - "# pred_vals = y_pred_values[:, timestep]\n", - "# preds = y_pred_labels[:, timestep]\n", "\n", - "# is_correct_timestep = []\n", "# for enc_id in test_ids:\n", - "# timestep_end_timestamp = timestep_end_timestamps.loc[enc_id, timestep]\n", "# mortality_timestamp = mortality_events.loc[mortality_events[\"encounter_id\"]\n", "# == enc_id][\"discharge_timestamp\"]\n", - "# lead_time = mortality_timestamp - timestep_end_timestamp\n", - "# print(timestep_end_timestamp, mortality_timestamp)\n", "# if (lead_time > pd.to_timedelta(0, unit=\"h\")).all():\n", - "# label_ = labels[test_ids.index(enc_id)]\n", - "# pred_ = preds[test_ids.index(enc_id)]\n", "\n", "# if label_ == 1:\n", - "# if label_ == pred_:\n", - "# is_correct_timestep.append(1)\n", - "# else:\n", - "# is_correct_timestep.append(0)\n", - "\n", - "# acc_timesteps.append(sum(is_correct_timestep) / len(is_correct_timestep))" + "# if label_ == pred_:" ] }, { @@ -519,7 +505,11 @@ " y=[label_h for x in prediction_hours],\n", " line={\"color\": \"Black\"},\n", " name=\"low risk of mortality label\",\n", - " marker={\"color\": \"Green\", \"size\": 20, \"line\": {\"color\": \"Black\", \"width\": 2}},\n", + " marker={\n", + " \"color\": \"Green\",\n", + " \"size\": 20,\n", + " \"line\": {\"color\": \"Black\", \"width\": 2},\n", + " },\n", " ),\n", " go.Scatter(\n", " mode=\"markers\",\n", @@ -527,7 +517,11 @@ " y=[label_h for _, v in enumerate(is_mortality) if v],\n", " line={\"color\": \"Red\"},\n", " name=\"high risk of mortality label\",\n", - " marker={\"color\": \"Red\", \"size\": 20, \"line\": {\"color\": \"Black\", \"width\": 2}},\n", + " marker={\n", + " \"color\": \"Red\",\n", + " \"size\": 20,\n", + " \"line\": {\"color\": \"Black\", \"width\": 2},\n", + " },\n", " ),\n", " go.Scatter(\n", " mode=\"markers\",\n", @@ -535,7 +529,11 @@ " y=[label_h for _, v in enumerate(after_discharge) if v],\n", " line={\"color\": \"Grey\"},\n", " name=\"post discharge label\",\n", - " marker={\"color\": \"Grey\", \"size\": 20, \"line\": {\"color\": \"Black\", \"width\": 2}},\n", + " marker={\n", + " \"color\": \"Grey\",\n", + " \"size\": 20,\n", + " \"line\": {\"color\": \"Black\", \"width\": 2},\n", + " },\n", " ),\n", " go.Bar(\n", " x=prediction_hours,\n", @@ -564,7 +562,8 @@ "mortality_cases = [idx for idx, v in enumerate(y_test_labels)]\n", "sample_idx = random.choice(mortality_cases)\n", "fig = plot_risk_mortality(\n", - " y_pred_values[sample_idx].squeeze(), y_test_labels[sample_idx],\n", + " y_pred_values[sample_idx].squeeze(),\n", + " y_test_labels[sample_idx],\n", ")\n", "fig.show()" ] diff --git a/nbs/monitor/retraining/confidence.ipynb b/nbs/monitor/retraining/confidence.ipynb index 78a0df1ff..faa215adb 100644 --- a/nbs/monitor/retraining/confidence.ipynb +++ b/nbs/monitor/retraining/confidence.ipynb @@ -15,8 +15,6 @@ "metadata": {}, "outputs": [], "source": [ - "# import sys\n", - "# sys.path.append(\"../..\")\n", "import datetime\n", "import os\n", "import pickle\n", @@ -28,15 +26,14 @@ "import pandas as pd\n", "import scipy.stats as st\n", "import torch\n", - "import torch.nn as nn\n", - "import torch.optim as optim\n", "from baseline_models.temporal.pytorch.metrics import print_metrics_binary\n", "from baseline_models.temporal.pytorch.optimizer import Optimizer\n", "from baseline_models.temporal.pytorch.utils import get_data, get_device\n", "from drift_detector.utils import get_temporal_model\n", "from gemini.query import get_gemini_data\n", "from gemini.utils import import_dataset_hospital\n", - "from matplotlib.colors import ListedColormap" + "from matplotlib.colors import ListedColormap\n", + "from torch import nn, optim" ] }, { @@ -85,7 +82,14 @@ " feats,\n", " admin_data,\n", ") = import_dataset_hospital(\n", - " admin_data, x, y, shift, outcome, hospital, run, shuffle=True,\n", + " admin_data,\n", + " x,\n", + " y,\n", + " shift,\n", + " outcome,\n", + " hospital,\n", + " run,\n", + " shuffle=True,\n", ")\n", "\n", "random.seed(1)\n", @@ -112,12 +116,19 @@ "numerical_cols = []\n", "if scale:\n", " X_tr_normalized, X_val_normalized, X_t_normalized = scale_data(\n", - " numerical_cols, X_tr_normalized, X_val_normalized, X_t_normalized,\n", + " numerical_cols,\n", + " X_tr_normalized,\n", + " X_val_normalized,\n", + " X_t_normalized,\n", " )\n", "# Process data\n", "process_data = callable()\n", "X_tr_final, X_val_final, X_t_final = process_data(\n", - " aggregation_type, num_timesteps, X_tr_normalized, X_val_normalized, X_t_normalized,\n", + " aggregation_type,\n", + " num_timesteps,\n", + " X_tr_normalized,\n", + " X_val_normalized,\n", + " X_t_normalized,\n", ")" ] }, @@ -142,7 +153,14 @@ "val_ids = list(X_val_normalized.index.get_level_values(0).unique())\n", "get_streams = callable()\n", "x_test_stream, y_test_stream, measure_dates_test = get_streams(\n", - " x, y, admin_data, start_date, end_date, stride=1, window=1, ids_to_exclude=val_ids,\n", + " x,\n", + " y,\n", + " admin_data,\n", + " start_date,\n", + " end_date,\n", + " stride=1,\n", + " window=1,\n", + " ids_to_exclude=val_ids,\n", ")" ] }, @@ -236,7 +254,9 @@ "\n", " loss_fn = nn.BCEWithLogitsLoss(reduction=\"none\")\n", " optimizer = optim.Adagrad(\n", - " model.parameters(), lr=learning_rate, weight_decay=weight_decay,\n", + " model.parameters(),\n", + " lr=learning_rate,\n", + " weight_decay=weight_decay,\n", " )\n", " lr_scheduler = optim.lr_scheduler.StepLR(optimizer, step_size=128, gamma=0.5)\n", " activation = nn.Sigmoid()\n", @@ -289,8 +309,6 @@ " # create val loader\n", "\n", " while i + stat_window + lookup_window <= len(X_stream):\n", - " # feat_index = 0\n", - "\n", " if p_val < threshold:\n", " if retrain:\n", " # Get data for updated fit\n", @@ -323,7 +341,9 @@ " # create train loader\n", " update_dataset = get_data(X_update, y_update)\n", " update_loader = torch.utils.data.DataLoader(\n", - " update_dataset, batch_size=1, shuffle=False,\n", + " update_dataset,\n", + " batch_size=1,\n", + " shuffle=False,\n", " )\n", "\n", " retrain_model_path = \"adaptive_window_retrain.model\"\n", @@ -346,7 +366,9 @@ " elif model_name == \"gbt\":\n", " X_retrain, y_retrain = None, None\n", " model = model.fit(\n", - " X_retrain, y_retrain, xgb_model=model.get_booster(),\n", + " X_retrain,\n", + " y_retrain,\n", + " xgb_model=model.get_booster(),\n", " )\n", "\n", " else:\n", @@ -386,20 +408,26 @@ " # Check Performance\n", " test_dataset = get_data(X_next, y_next)\n", " test_loader = torch.utils.data.DataLoader(\n", - " test_dataset, batch_size=1, shuffle=False,\n", + " test_dataset,\n", + " batch_size=1,\n", + " shuffle=False,\n", " )\n", " y_test_labels, y_pred_values, y_pred_labels = opt.evaluate(\n", - " test_loader, batch_size=1, n_features=input_dim, timesteps=num_timesteps,\n", + " test_loader,\n", + " batch_size=1,\n", + " n_features=input_dim,\n", + " timesteps=num_timesteps,\n", " )\n", "\n", " y_pred_values = y_pred_values[y_test_labels != -1]\n", " y_pred_labels = y_pred_labels[y_test_labels != -1]\n", " y_test_labels = y_test_labels[y_test_labels != -1]\n", "\n", - " # print(y_pred_values)\n", - "\n", " pred_metrics = print_metrics_binary(\n", - " y_test_labels, y_pred_values, y_pred_labels, verbose=verbose,\n", + " y_test_labels,\n", + " y_pred_values,\n", + " y_pred_labels,\n", + " verbose=verbose,\n", " )\n", " rolling_metrics.append(\n", " pd.DataFrame(pred_metrics.values(), index=pred_metrics.keys()).T,\n", @@ -407,11 +435,12 @@ "\n", " # Run distribution shift check here\n", " (p_val, dist, val_acc, te_acc) = shift_detector.detect_data_shift(\n", - " X_train, X_prev[:1000, :], X_next[:sample, :],\n", + " X_train,\n", + " X_prev[:1000, :],\n", + " X_next[:sample, :],\n", " )\n", "\n", " # print(max(int(i)-run_length,0),\"-\",\n", - " # int(i),\"-->\",max(int(i)+lookup_window,0),\n", " # \"-\",int(i)+stat_window+lookup_window,\"\\tP-Value: \",p_val)\n", "\n", " dist_vals = np.concatenate((dist_vals, np.repeat(dist, 1)))\n", @@ -503,14 +532,21 @@ "results = pd.concat([results, performance_metrics], axis=1)\n", "results.to_pickle(\n", " os.path.join(\n", - " PATH, shift, shift + \"_\" + dr_technique + \"_\" + md_test + \"_results.pkl\",\n", + " PATH,\n", + " shift,\n", + " shift + \"_\" + dr_technique + \"_\" + md_test + \"_results.pkl\",\n", " ),\n", ")\n", "start = 0\n", "end = performance_metrics.shape[0] - 1\n", "cmap = ListedColormap([\"lightgrey\", \"red\"])\n", "ax1.plot(\n", - " results[\"dates\"], results[\"pval\"], \".-\", color=\"red\", linewidth=0.5, markersize=2,\n", + " results[\"dates\"],\n", + " results[\"pval\"],\n", + " \".-\",\n", + " color=\"red\",\n", + " linewidth=0.5,\n", + " markersize=2,\n", ")\n", "ax1.set_xlim(results[\"dates\"][start], results[\"dates\"][end])\n", "ax1.axhline(y=threshold, color=\"dimgrey\", linestyle=\"--\")\n", @@ -525,7 +561,12 @@ ")\n", "\n", "ax2.plot(\n", - " results[\"dates\"], results[\"dist\"], \".-\", color=\"red\", linewidth=0.5, markersize=2,\n", + " results[\"dates\"],\n", + " results[\"dist\"],\n", + " \".-\",\n", + " color=\"red\",\n", + " linewidth=0.5,\n", + " markersize=2,\n", ")\n", "ax2.set_xlim(results[\"dates\"][start], results[\"dates\"][end])\n", "ax2.set_ylabel(\"Distance\", fontsize=16)\n", @@ -540,7 +581,12 @@ ")\n", "\n", "ax3.plot(\n", - " results[\"dates\"], results[\"auroc\"], \".-\", color=\"blue\", linewidth=0.5, markersize=2,\n", + " results[\"dates\"],\n", + " results[\"auroc\"],\n", + " \".-\",\n", + " color=\"blue\",\n", + " linewidth=0.5,\n", + " markersize=2,\n", ")\n", "ax3.set_xlim(results[\"dates\"][start], results[\"dates\"][end])\n", "ax3.set_ylabel(\"AUROC\", fontsize=16)\n", @@ -555,7 +601,12 @@ ")\n", "\n", "ax4.plot(\n", - " results[\"dates\"], results[\"auprc\"], \".-\", color=\"blue\", linewidth=0.5, markersize=2,\n", + " results[\"dates\"],\n", + " results[\"auprc\"],\n", + " \".-\",\n", + " color=\"blue\",\n", + " linewidth=0.5,\n", + " markersize=2,\n", ")\n", "ax4.set_xlim(results[\"dates\"][start], results[\"dates\"][end])\n", "ax4.set_ylabel(\"AUPRC\", fontsize=16)\n", @@ -570,7 +621,12 @@ ")\n", "\n", "ax5.plot(\n", - " results[\"dates\"], results[\"prec1\"], \".-\", color=\"blue\", linewidth=0.5, markersize=2,\n", + " results[\"dates\"],\n", + " results[\"prec1\"],\n", + " \".-\",\n", + " color=\"blue\",\n", + " linewidth=0.5,\n", + " markersize=2,\n", ")\n", "ax5.set_xlim(results[\"dates\"][start], results[\"dates\"][end])\n", "ax5.set_ylabel(\"PPV\", fontsize=16)\n", @@ -585,7 +641,12 @@ ")\n", "\n", "ax6.plot(\n", - " results[\"dates\"], results[\"rec1\"], \".-\", color=\"blue\", linewidth=0.5, markersize=2,\n", + " results[\"dates\"],\n", + " results[\"rec1\"],\n", + " \".-\",\n", + " color=\"blue\",\n", + " linewidth=0.5,\n", + " markersize=2,\n", ")\n", "ax6.set_xlim(results[\"dates\"][start], results[\"dates\"][end])\n", "ax6.set_ylabel(\"Sensitivity\", fontsize=16)\n", diff --git a/nbs/monitor/retraining/cumulative.ipynb b/nbs/monitor/retraining/cumulative.ipynb index 1f25dd718..dea814895 100644 --- a/nbs/monitor/retraining/cumulative.ipynb +++ b/nbs/monitor/retraining/cumulative.ipynb @@ -23,8 +23,6 @@ "import matplotlib.pyplot as plt\n", "import numpy as np\n", "import scipy.stats as st\n", - "import torch.nn as nn\n", - "import torch.optim as optim\n", "from baseline_models.temporal.pytorch.optimizer import Optimizer\n", "from baseline_models.temporal.pytorch.utils import get_device, load_ckp\n", "from drift_detector.detector import Detector\n", @@ -34,7 +32,8 @@ "from gemini.query import get_gemini_data\n", "from gemini.utils import get_label, import_dataset_hospital, normalize, process, scale\n", "from matplotlib.colors import ListedColormap\n", - "from retrainers.cumulative import CumulativeRetrainer" + "from retrainers.cumulative import CumulativeRetrainer\n", + "from torch import nn, optim" ] }, { @@ -139,7 +138,12 @@ "random.seed(1)\n", "\n", "(X_tr, y_tr), (X_val, y_val), (X_t, y_t), feats, admin_data = import_dataset_hospital(\n", - " admin_data, x, y, SHIFT, OUTCOME, HOSPITALS,\n", + " admin_data,\n", + " x,\n", + " y,\n", + " SHIFT,\n", + " OUTCOME,\n", + " HOSPITALS,\n", ")\n", "\n", "# Normalize data\n", @@ -247,7 +251,9 @@ " weight_decay = 1e-6\n", " loss_fn = nn.BCEWithLogitsLoss(reduction=\"none\")\n", " optimizer = optim.Adagrad(\n", - " model.parameters(), lr=learning_rate, weight_decay=weight_decay,\n", + " model.parameters(),\n", + " lr=learning_rate,\n", + " weight_decay=weight_decay,\n", " )\n", " lr_scheduler = optim.lr_scheduler.StepLR(optimizer, step_size=128, gamma=0.5)\n", " activation = nn.Sigmoid()\n", @@ -258,9 +264,7 @@ " activation=activation,\n", " lr_scheduler=lr_scheduler,\n", " )\n", - "# elif model_name == \"gbt\":\n", "# with open(model_path, \"rb\") as f:\n", - "# model = pickle.load(f)\n", "else:\n", " print(\"Unsupported model\")" ] @@ -322,7 +326,10 @@ "outputs": [], "source": [ "retrainer = CumulativeRetrainer(\n", - " shift_detector=detector, optimizer=optimizer, model=model, model_name=model_name,\n", + " shift_detector=detector,\n", + " optimizer=optimizer,\n", + " model=model,\n", + " model_name=model_name,\n", ")" ] }, diff --git a/nbs/monitor/retraining/local_global.ipynb b/nbs/monitor/retraining/local_global.ipynb index 4c8b6c8c4..762a940b1 100644 --- a/nbs/monitor/retraining/local_global.ipynb +++ b/nbs/monitor/retraining/local_global.ipynb @@ -15,17 +15,12 @@ "metadata": {}, "outputs": [], "source": [ - "# sys.path.append(\"../..\")\n", "import datetime\n", "import os\n", "import random\n", - "\n", - "# import sys\n", "from datetime import date\n", "\n", "from baseline_models.temporal.pytorch.utils import get_device, load_ckp\n", - "\n", - "# from drift_detector.rolling_window import RollingWindow\n", "from drift_detector.utils import get_serving_data, get_temporal_model\n", "from gemini.query import get_gemini_data\n", "from gemini.utils import get_label, import_dataset_hospital, normalize, process, scale" @@ -109,7 +104,12 @@ "random.seed(1)\n", "\n", "(X_tr, y_tr), (X_val, y_val), (X_t, y_t), feats, admin_data = import_dataset_hospital(\n", - " admin_data, x, y, SHIFT, OUTCOME, HOSPITALS,\n", + " admin_data,\n", + " x,\n", + " y,\n", + " SHIFT,\n", + " OUTCOME,\n", + " HOSPITALS,\n", ")\n", "\n", "# Normalize data\n", diff --git a/nbs/monitor/retraining/most_recent.ipynb b/nbs/monitor/retraining/most_recent.ipynb index e6a4fa28b..e7ee8f7f1 100644 --- a/nbs/monitor/retraining/most_recent.ipynb +++ b/nbs/monitor/retraining/most_recent.ipynb @@ -23,8 +23,6 @@ "import matplotlib.pyplot as plt\n", "import numpy as np\n", "import scipy.stats as st\n", - "import torch.nn as nn\n", - "import torch.optim as optim\n", "from baseline_models.temporal.pytorch.optimizer import Optimizer\n", "from baseline_models.temporal.pytorch.utils import get_device, load_ckp\n", "from drift_detector.detector import Detector\n", @@ -34,7 +32,8 @@ "from gemini.query import get_gemini_data\n", "from gemini.utils import get_label, import_dataset_hospital, normalize, process, scale\n", "from matplotlib.colors import ListedColormap\n", - "from retrainers.mostrecent import MostRecentRetrainer" + "from retrainers.mostrecent import MostRecentRetrainer\n", + "from torch import nn, optim" ] }, { @@ -139,7 +138,12 @@ "random.seed(1)\n", "\n", "(X_tr, y_tr), (X_val, y_val), (X_t, y_t), feats, admin_data = import_dataset_hospital(\n", - " admin_data, x, y, SHIFT, OUTCOME, HOSPITALS,\n", + " admin_data,\n", + " x,\n", + " y,\n", + " SHIFT,\n", + " OUTCOME,\n", + " HOSPITALS,\n", ")\n", "\n", "# Normalize data\n", @@ -247,7 +251,9 @@ " weight_decay = 1e-6\n", " loss_fn = nn.BCEWithLogitsLoss(reduction=\"none\")\n", " optimizer = optim.Adagrad(\n", - " model.parameters(), lr=learning_rate, weight_decay=weight_decay,\n", + " model.parameters(),\n", + " lr=learning_rate,\n", + " weight_decay=weight_decay,\n", " )\n", " lr_scheduler = optim.lr_scheduler.StepLR(optimizer, step_size=128, gamma=0.5)\n", " activation = nn.Sigmoid()\n", @@ -258,9 +264,7 @@ " activation=activation,\n", " lr_scheduler=lr_scheduler,\n", " )\n", - "# elif model_name == \"gbt\":\n", "# with open(model_path, \"rb\") as f:\n", - "# model = pickle.load(f)\n", "else:\n", " print(\"Unsupported model\")" ] diff --git a/nbs/monitor/rolling_window/hosp_type.ipynb b/nbs/monitor/rolling_window/hosp_type.ipynb index 600fbf971..227582335 100644 --- a/nbs/monitor/rolling_window/hosp_type.ipynb +++ b/nbs/monitor/rolling_window/hosp_type.ipynb @@ -7,8 +7,6 @@ "metadata": {}, "outputs": [], "source": [ - "# sys.path.append(\"../..\")\n", - "# import sys\n", "import datetime\n", "import os\n", "import random\n", @@ -177,7 +175,12 @@ "print(\"Query data %s ...\" % SHIFT)\n", "\n", "(X_tr, y_tr), (X_val, y_val), (X_t, y_t), feats, admin_data = import_dataset_hospital(\n", - " admin_data, x, y, SHIFT, OUTCOME, HOSPITALS,\n", + " admin_data,\n", + " x,\n", + " y,\n", + " SHIFT,\n", + " OUTCOME,\n", + " HOSPITALS,\n", ")\n", "\n", "# Normalize data\n", @@ -245,11 +248,18 @@ "rolling_window = RollingWindow(shift_detector=detector, optimizer=optimizer)\n", "\n", "drift_metrics = rolling_window.drift(\n", - " data_streams, SAMPLE, STAT_WINDOW, LOOKUP_WINDOW, STRIDE,\n", + " data_streams,\n", + " SAMPLE,\n", + " STAT_WINDOW,\n", + " LOOKUP_WINDOW,\n", + " STRIDE,\n", ")\n", "\n", "performance_metrics = rolling_window.performance(\n", - " data_streams, STAT_WINDOW, LOOKUP_WINDOW, STRIDE,\n", + " data_streams,\n", + " STAT_WINDOW,\n", + " LOOKUP_WINDOW,\n", + " STRIDE,\n", ")\n", "\n", "results = {\n", diff --git a/nbs/monitor/rolling_window/static.ipynb b/nbs/monitor/rolling_window/static.ipynb index 9ef638cff..155cc51f8 100644 --- a/nbs/monitor/rolling_window/static.ipynb +++ b/nbs/monitor/rolling_window/static.ipynb @@ -15,8 +15,6 @@ "metadata": {}, "outputs": [], "source": [ - "# import sys\n", - "# sys.path.append(\"../..\")\n", "import datetime\n", "import os\n", "import pickle\n", @@ -126,7 +124,12 @@ "random.seed(1)\n", "\n", "(X_tr, y_tr), (X_val, y_val), (X_t, y_t), feats, admin_data = import_dataset_hospital(\n", - " admin_data, x, y, SHIFT, OUTCOME, HOSPITALS,\n", + " admin_data,\n", + " x,\n", + " y,\n", + " SHIFT,\n", + " OUTCOME,\n", + " HOSPITALS,\n", ")\n", "\n", "# Normalize data\n", @@ -256,7 +259,9 @@ "print(\"Get Rolling Window...\")\n", "\n", "rolling_window = RollingWindow(\n", - " admin_data=admin_data, shift_detector=detector, model=optimised_model,\n", + " admin_data=admin_data,\n", + " shift_detector=detector,\n", + " model=optimised_model,\n", ")\n", "\n", "all_runs = []\n", @@ -296,8 +301,7 @@ " results.update(drift_metrics)\n", " results.update(performance_metrics)\n", "\n", - " all_runs.append(results)\n", - "# np.save(os.path.join(PATH, shift, shift+\"_rolling_window.npy\"), all_runs)" + " all_runs.append(results)" ] }, { @@ -585,7 +589,9 @@ "for retraining_type in types:\n", " for i in range(0, 5):\n", " res_path = os.path.join(\n", - " PATH, SHIFT, SHIFT + \"_\" + retraining_type + \"_retraining_update.npy\",\n", + " PATH,\n", + " SHIFT,\n", + " SHIFT + \"_\" + retraining_type + \"_retraining_update.npy\",\n", " )\n", " cum = np.load(res_path, allow_pickle=True)[i]\n", " drift_sensitivity.append(np.mean(cum[\"performance\"][\"rec1\"]))\n", @@ -607,7 +613,11 @@ "for j, variable in enumerate([\"PPV\", \"Sensitivity\"]):\n", " for i, grp in enumerate(retraining_drift.groupby(\"Retraining Strategy\")):\n", " axs[j].boxplot(\n", - " x=variable, data=grp[1], positions=[i], widths=0.4, patch_artist=True,\n", + " x=variable,\n", + " data=grp[1],\n", + " positions=[i],\n", + " widths=0.4,\n", + " patch_artist=True,\n", " )\n", " axs[j].set_xticks(range(0, len(types)), labels, rotation=45, fontsize=12)\n", " axs[j].set_ylabel(variable, fontsize=12)\n", @@ -637,7 +647,9 @@ "for retraining_type in types:\n", " for i in range(0, 5):\n", " res_path = os.path.join(\n", - " PATH, SHIFT, SHIFT + \"_\" + retraining_type + \"_retraining_update.npy\",\n", + " PATH,\n", + " SHIFT,\n", + " SHIFT + \"_\" + retraining_type + \"_retraining_update.npy\",\n", " )\n", " cum = np.load(res_path, allow_pickle=True)[i]\n", " drift_sensitivity.append(np.mean(cum[\"performance\"][\"rec1\"]))\n", @@ -659,7 +671,11 @@ "for j, variable in enumerate([\"PPV\", \"Sensitivity\"]):\n", " for i, grp in enumerate(retraining_drift.groupby(\"Retraining Strategy\")):\n", " axs[j].boxplot(\n", - " x=variable, data=grp[1], positions=[i], widths=0.4, patch_artist=True,\n", + " x=variable,\n", + " data=grp[1],\n", + " positions=[i],\n", + " widths=0.4,\n", + " patch_artist=True,\n", " )\n", " axs[j].set_xticks(range(0, len(types)), labels, rotation=45, fontsize=12)\n", " axs[j].set_ylabel(variable, fontsize=12)\n", @@ -693,7 +709,9 @@ "for retraining_type in types:\n", " for i in range(0, 5):\n", " res_path = os.path.join(\n", - " PATH, SHIFT, SHIFT + \"_\" + retraining_type + \"_retraining_update.npy\",\n", + " PATH,\n", + " SHIFT,\n", + " SHIFT + \"_\" + retraining_type + \"_retraining_update.npy\",\n", " )\n", " cum = np.load(res_path, allow_pickle=True)[i]\n", " drift_sensitivity.append(np.mean(cum[\"performance\"][\"rec1\"]))\n", @@ -715,7 +733,11 @@ "for j, variable in enumerate([\"PPV\", \"Sensitivity\"]):\n", " for i, grp in enumerate(retraining_drift.groupby(\"Retraining Strategy\")):\n", " axs[j].boxplot(\n", - " x=variable, data=grp[1], positions=[i], widths=0.4, patch_artist=True,\n", + " x=variable,\n", + " data=grp[1],\n", + " positions=[i],\n", + " widths=0.4,\n", + " patch_artist=True,\n", " )\n", " axs[j].set_xticks(range(0, len(types)), labels, rotation=45, fontsize=12)\n", " axs[j].set_ylabel(variable, fontsize=12)\n", diff --git a/nbs/monitor/rolling_window/temporal.ipynb b/nbs/monitor/rolling_window/temporal.ipynb index 42441e25d..2e363468c 100644 --- a/nbs/monitor/rolling_window/temporal.ipynb +++ b/nbs/monitor/rolling_window/temporal.ipynb @@ -15,9 +15,6 @@ "metadata": {}, "outputs": [], "source": [ - "# sys.path.append(\"../..\")\n", - "# import sys\n", - "\n", "import datetime\n", "import os\n", "import random\n", @@ -117,7 +114,12 @@ "random.seed(1)\n", "\n", "(X_tr, y_tr), (X_val, y_val), (X_t, y_t), feats, admin_data = import_dataset_hospital(\n", - " admin_data, x, y, SHIFT, OUTCOME, HOSPITALS,\n", + " admin_data,\n", + " x,\n", + " y,\n", + " SHIFT,\n", + " OUTCOME,\n", + " HOSPITALS,\n", ")\n", "\n", "# Normalize data\n", @@ -269,7 +271,9 @@ "print(\"Get Rolling Window...\")\n", "\n", "rolling_window = RollingWindow(\n", - " admin_data=admin_data, shift_detector=detector, optimizer=optimizer,\n", + " admin_data=admin_data,\n", + " shift_detector=detector,\n", + " optimizer=optimizer,\n", ")\n", "\n", "all_runs = []\n", @@ -596,7 +600,9 @@ "for retraining_type in types:\n", " for i in range(0, 5):\n", " res_path = os.path.join(\n", - " PATH, SHIFT, SHIFT + \"_\" + retraining_type + \"_retraining_update.npy\",\n", + " PATH,\n", + " SHIFT,\n", + " SHIFT + \"_\" + retraining_type + \"_retraining_update.npy\",\n", " )\n", " cum = np.load(res_path, allow_pickle=True)[i]\n", " drift_sensitivity.append(np.mean(cum[\"performance\"][\"rec1\"]))\n", @@ -618,7 +624,11 @@ "for j, variable in enumerate([\"PPV\", \"Sensitivity\"]):\n", " for i, grp in enumerate(retraining_drift.groupby(\"Retraining Strategy\")):\n", " axs[j].boxplot(\n", - " x=variable, data=grp[1], positions=[i], widths=0.4, patch_artist=True,\n", + " x=variable,\n", + " data=grp[1],\n", + " positions=[i],\n", + " widths=0.4,\n", + " patch_artist=True,\n", " )\n", " axs[j].set_xticks(range(0, len(types)), labels, rotation=45, fontsize=12)\n", " axs[j].set_ylabel(variable, fontsize=12)\n", @@ -648,7 +658,9 @@ "for retraining_type in types:\n", " for i in range(0, 5):\n", " res_path = os.path.join(\n", - " PATH, SHIFT, SHIFT + \"_\" + retraining_type + \"_retraining_update.npy\",\n", + " PATH,\n", + " SHIFT,\n", + " SHIFT + \"_\" + retraining_type + \"_retraining_update.npy\",\n", " )\n", " cum = np.load(res_path, allow_pickle=True)[i]\n", " drift_sensitivity.append(np.mean(cum[\"performance\"][\"rec1\"]))\n", @@ -670,7 +682,11 @@ "for j, variable in enumerate([\"PPV\", \"Sensitivity\"]):\n", " for i, grp in enumerate(retraining_drift.groupby(\"Retraining Strategy\")):\n", " axs[j].boxplot(\n", - " x=variable, data=grp[1], positions=[i], widths=0.4, patch_artist=True,\n", + " x=variable,\n", + " data=grp[1],\n", + " positions=[i],\n", + " widths=0.4,\n", + " patch_artist=True,\n", " )\n", " axs[j].set_xticks(range(0, len(types)), labels, rotation=45, fontsize=12)\n", " axs[j].set_ylabel(variable, fontsize=12)\n", @@ -704,7 +720,9 @@ "for retraining_type in types:\n", " for i in range(0, 5):\n", " res_path = os.path.join(\n", - " PATH, SHIFT, SHIFT + \"_\" + retraining_type + \"_retraining_update.npy\",\n", + " PATH,\n", + " SHIFT,\n", + " SHIFT + \"_\" + retraining_type + \"_retraining_update.npy\",\n", " )\n", " cum = np.load(res_path, allow_pickle=True)[i]\n", " drift_sensitivity.append(np.mean(cum[\"performance\"][\"rec1\"]))\n", @@ -726,7 +744,11 @@ "for j, variable in enumerate([\"PPV\", \"Sensitivity\"]):\n", " for i, grp in enumerate(retraining_drift.groupby(\"Retraining Strategy\")):\n", " axs[j].boxplot(\n", - " x=variable, data=grp[1], positions=[i], widths=0.4, patch_artist=True,\n", + " x=variable,\n", + " data=grp[1],\n", + " positions=[i],\n", + " widths=0.4,\n", + " patch_artist=True,\n", " )\n", " axs[j].set_xticks(range(0, len(types)), labels, rotation=45, fontsize=12)\n", " axs[j].set_ylabel(variable, fontsize=12)\n", diff --git a/poetry.lock b/poetry.lock index 7d91ee261..dc8eb85a9 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. [[package]] name = "aiofiles" @@ -291,24 +291,24 @@ files = [ [[package]] name = "anyio" -version = "4.0.0" +version = "3.7.1" description = "High level compatibility layer for multiple asynchronous event loop implementations" optional = false -python-versions = ">=3.8" +python-versions = ">=3.7" files = [ - {file = "anyio-4.0.0-py3-none-any.whl", hash = "sha256:cfdb2b588b9fc25ede96d8db56ed50848b0b649dca3dd1df0b11f683bb9e0b5f"}, - {file = "anyio-4.0.0.tar.gz", hash = "sha256:f7ed51751b2c2add651e5747c891b47e26d2a21be5d32d9311dfe9692f3e5d7a"}, + {file = "anyio-3.7.1-py3-none-any.whl", hash = "sha256:91dee416e570e92c64041bd18b900d1d6fa78dff7048769ce5ac5ddad004fbb5"}, + {file = "anyio-3.7.1.tar.gz", hash = "sha256:44a3c9aba0f5defa43261a8b3efb97891f2bd7d804e0e1f56419befa1adfc780"}, ] [package.dependencies] -exceptiongroup = {version = ">=1.0.2", markers = "python_version < \"3.11\""} +exceptiongroup = {version = "*", markers = "python_version < \"3.11\""} idna = ">=2.8" sniffio = ">=1.1" [package.extras] -doc = ["Sphinx (>=7)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)"] -test = ["anyio[trio]", "coverage[toml] (>=7)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"] -trio = ["trio (>=0.22)"] +doc = ["Sphinx", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme (>=1.2.2)", "sphinxcontrib-jquery"] +test = ["anyio[trio]", "coverage[toml] (>=4.5)", "hypothesis (>=4.0)", "mock (>=4)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"] +trio = ["trio (<0.22)"] [[package]] name = "appnope" @@ -543,6 +543,21 @@ docs = ["furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib- tests = ["attrs[tests-no-zope]", "zope-interface"] tests-no-zope = ["cloudpickle", "hypothesis", "mypy (>=1.1.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] +[[package]] +name = "autopep8" +version = "2.0.4" +description = "A tool that automatically formats Python code to conform to the PEP 8 style guide" +optional = false +python-versions = ">=3.6" +files = [ + {file = "autopep8-2.0.4-py2.py3-none-any.whl", hash = "sha256:067959ca4a07b24dbd5345efa8325f5f58da4298dab0dde0443d5ed765de80cb"}, + {file = "autopep8-2.0.4.tar.gz", hash = "sha256:2913064abd97b3419d1cc83ea71f042cb821f87e45b9c88cad5ad3c4ea87fe0c"}, +] + +[package.dependencies] +pycodestyle = ">=2.10.0" +tomli = {version = "*", markers = "python_version < \"3.11\""} + [[package]] name = "babel" version = "2.12.1" @@ -636,6 +651,20 @@ d = ["aiohttp (>=3.7.4)"] jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] uvloop = ["uvloop (>=0.15.2)"] +[[package]] +name = "blacken-docs" +version = "1.16.0" +description = "Run Black on Python code blocks in documentation files." +optional = false +python-versions = ">=3.8" +files = [ + {file = "blacken_docs-1.16.0-py3-none-any.whl", hash = "sha256:b0dcb84b28ebfb352a2539202d396f50e15a54211e204a8005798f1d1edb7df8"}, + {file = "blacken_docs-1.16.0.tar.gz", hash = "sha256:b4bdc3f3d73898dfbf0166f292c6ccfe343e65fc22ddef5319c95d1a8dcc6c1c"}, +] + +[package.dependencies] +black = ">=22.1.0" + [[package]] name = "bleach" version = "6.0.0" @@ -1011,13 +1040,13 @@ typing = ["mypy (>=0.990)"] [[package]] name = "confection" -version = "0.1.2" +version = "0.1.3" description = "The sweetest config system for Python" optional = false python-versions = ">=3.6" files = [ - {file = "confection-0.1.2-py3-none-any.whl", hash = "sha256:8bde19143fe36c38ea6e7241dec7be14b8a16e51c9d7ade93d19f72d9f8f1115"}, - {file = "confection-0.1.2.tar.gz", hash = "sha256:7163eb9bdde62cc61a71c6284fb0f0b50b2723b7ef8ab79c7061a7bd659a058e"}, + {file = "confection-0.1.3-py3-none-any.whl", hash = "sha256:58b125c9bc6786f32e37fe4d98bc3a03e5f509a4b9de02541b99c559f2026092"}, + {file = "confection-0.1.3.tar.gz", hash = "sha256:5a876d368a7698eec58791126757a75a3df16e26cc49653b52426e9ffd39f12f"}, ] [package.dependencies] @@ -1302,13 +1331,13 @@ testing = ["beautifulsoup4 (>=4.8.2)", "cryptography (<3.4)", "dash-testing-stub [[package]] name = "dash-bootstrap-components" -version = "1.4.2" +version = "1.5.0" description = "Bootstrap themed components for use in Plotly Dash" optional = false python-versions = ">=3.7, <4" files = [ - {file = "dash-bootstrap-components-1.4.2.tar.gz", hash = "sha256:b7514be30e229a1701db5010a47d275882a94d1efff4c803ac42a9d222ed86e0"}, - {file = "dash_bootstrap_components-1.4.2-py3-none-any.whl", hash = "sha256:4f59352a2f81cb0c41ae75dd3e0814f64049a4520f935397298e9a093ace727c"}, + {file = "dash-bootstrap-components-1.5.0.tar.gz", hash = "sha256:083158c07434b9965e2d6c3e8ca72dbbe47dab23e676258cef9bf0ad47d2e250"}, + {file = "dash_bootstrap_components-1.5.0-py3-none-any.whl", hash = "sha256:b487fec1a85e3d6a8564fe04c0a9cd9e846f75ea9e563456ed3879592889c591"}, ] [package.dependencies] @@ -1501,29 +1530,29 @@ langdetect = ["langdetect"] [[package]] name = "debugpy" -version = "1.6.7.post1" +version = "1.8.0" description = "An implementation of the Debug Adapter Protocol for Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "debugpy-1.6.7.post1-cp310-cp310-macosx_11_0_x86_64.whl", hash = "sha256:903bd61d5eb433b6c25b48eae5e23821d4c1a19e25c9610205f5aeaccae64e32"}, - {file = "debugpy-1.6.7.post1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d16882030860081e7dd5aa619f30dec3c2f9a421e69861125f83cc372c94e57d"}, - {file = "debugpy-1.6.7.post1-cp310-cp310-win32.whl", hash = "sha256:eea8d8cfb9965ac41b99a61f8e755a8f50e9a20330938ad8271530210f54e09c"}, - {file = "debugpy-1.6.7.post1-cp310-cp310-win_amd64.whl", hash = "sha256:85969d864c45f70c3996067cfa76a319bae749b04171f2cdeceebe4add316155"}, - {file = "debugpy-1.6.7.post1-cp37-cp37m-macosx_11_0_x86_64.whl", hash = "sha256:890f7ab9a683886a0f185786ffbda3b46495c4b929dab083b8c79d6825832a52"}, - {file = "debugpy-1.6.7.post1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d4ac7a4dba28801d184b7fc0e024da2635ca87d8b0a825c6087bb5168e3c0d28"}, - {file = "debugpy-1.6.7.post1-cp37-cp37m-win32.whl", hash = "sha256:3370ef1b9951d15799ef7af41f8174194f3482ee689988379763ef61a5456426"}, - {file = "debugpy-1.6.7.post1-cp37-cp37m-win_amd64.whl", hash = "sha256:65b28435a17cba4c09e739621173ff90c515f7b9e8ea469b92e3c28ef8e5cdfb"}, - {file = "debugpy-1.6.7.post1-cp38-cp38-macosx_11_0_x86_64.whl", hash = "sha256:92b6dae8bfbd497c90596bbb69089acf7954164aea3228a99d7e43e5267f5b36"}, - {file = "debugpy-1.6.7.post1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:72f5d2ecead8125cf669e62784ef1e6300f4067b0f14d9f95ee00ae06fc7c4f7"}, - {file = "debugpy-1.6.7.post1-cp38-cp38-win32.whl", hash = "sha256:f0851403030f3975d6e2eaa4abf73232ab90b98f041e3c09ba33be2beda43fcf"}, - {file = "debugpy-1.6.7.post1-cp38-cp38-win_amd64.whl", hash = "sha256:3de5d0f97c425dc49bce4293df6a04494309eedadd2b52c22e58d95107e178d9"}, - {file = "debugpy-1.6.7.post1-cp39-cp39-macosx_11_0_x86_64.whl", hash = "sha256:38651c3639a4e8bbf0ca7e52d799f6abd07d622a193c406be375da4d510d968d"}, - {file = "debugpy-1.6.7.post1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:038c51268367c9c935905a90b1c2d2dbfe304037c27ba9d19fe7409f8cdc710c"}, - {file = "debugpy-1.6.7.post1-cp39-cp39-win32.whl", hash = "sha256:4b9eba71c290852f959d2cf8a03af28afd3ca639ad374d393d53d367f7f685b2"}, - {file = "debugpy-1.6.7.post1-cp39-cp39-win_amd64.whl", hash = "sha256:973a97ed3b434eab0f792719a484566c35328196540676685c975651266fccf9"}, - {file = "debugpy-1.6.7.post1-py2.py3-none-any.whl", hash = "sha256:1093a5c541af079c13ac8c70ab8b24d1d35c8cacb676306cf11e57f699c02926"}, - {file = "debugpy-1.6.7.post1.zip", hash = "sha256:fe87ec0182ef624855d05e6ed7e0b7cb1359d2ffa2a925f8ec2d22e98b75d0ca"}, + {file = "debugpy-1.8.0-cp310-cp310-macosx_11_0_x86_64.whl", hash = "sha256:7fb95ca78f7ac43393cd0e0f2b6deda438ec7c5e47fa5d38553340897d2fbdfb"}, + {file = "debugpy-1.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ef9ab7df0b9a42ed9c878afd3eaaff471fce3fa73df96022e1f5c9f8f8c87ada"}, + {file = "debugpy-1.8.0-cp310-cp310-win32.whl", hash = "sha256:a8b7a2fd27cd9f3553ac112f356ad4ca93338feadd8910277aff71ab24d8775f"}, + {file = "debugpy-1.8.0-cp310-cp310-win_amd64.whl", hash = "sha256:5d9de202f5d42e62f932507ee8b21e30d49aae7e46d5b1dd5c908db1d7068637"}, + {file = "debugpy-1.8.0-cp311-cp311-macosx_11_0_universal2.whl", hash = "sha256:ef54404365fae8d45cf450d0544ee40cefbcb9cb85ea7afe89a963c27028261e"}, + {file = "debugpy-1.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:60009b132c91951354f54363f8ebdf7457aeb150e84abba5ae251b8e9f29a8a6"}, + {file = "debugpy-1.8.0-cp311-cp311-win32.whl", hash = "sha256:8cd0197141eb9e8a4566794550cfdcdb8b3db0818bdf8c49a8e8f8053e56e38b"}, + {file = "debugpy-1.8.0-cp311-cp311-win_amd64.whl", hash = "sha256:a64093656c4c64dc6a438e11d59369875d200bd5abb8f9b26c1f5f723622e153"}, + {file = "debugpy-1.8.0-cp38-cp38-macosx_11_0_x86_64.whl", hash = "sha256:b05a6b503ed520ad58c8dc682749113d2fd9f41ffd45daec16e558ca884008cd"}, + {file = "debugpy-1.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3c6fb41c98ec51dd010d7ed650accfd07a87fe5e93eca9d5f584d0578f28f35f"}, + {file = "debugpy-1.8.0-cp38-cp38-win32.whl", hash = "sha256:46ab6780159eeabb43c1495d9c84cf85d62975e48b6ec21ee10c95767c0590aa"}, + {file = "debugpy-1.8.0-cp38-cp38-win_amd64.whl", hash = "sha256:bdc5ef99d14b9c0fcb35351b4fbfc06ac0ee576aeab6b2511702e5a648a2e595"}, + {file = "debugpy-1.8.0-cp39-cp39-macosx_11_0_x86_64.whl", hash = "sha256:61eab4a4c8b6125d41a34bad4e5fe3d2cc145caecd63c3fe953be4cc53e65bf8"}, + {file = "debugpy-1.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:125b9a637e013f9faac0a3d6a82bd17c8b5d2c875fb6b7e2772c5aba6d082332"}, + {file = "debugpy-1.8.0-cp39-cp39-win32.whl", hash = "sha256:57161629133113c97b387382045649a2b985a348f0c9366e22217c87b68b73c6"}, + {file = "debugpy-1.8.0-cp39-cp39-win_amd64.whl", hash = "sha256:e3412f9faa9ade82aa64a50b602544efcba848c91384e9f93497a458767e6926"}, + {file = "debugpy-1.8.0-py2.py3-none-any.whl", hash = "sha256:9c9b0ac1ce2a42888199df1a1906e45e6f3c9555497643a85e0bf2406e3ffbc4"}, + {file = "debugpy-1.8.0.zip", hash = "sha256:12af2c55b419521e33d5fb21bd022df0b5eb267c3e178f1d374a63a2a6bdccd0"}, ] [[package]] @@ -1672,16 +1701,17 @@ tests = ["asttokens", "littleutils", "pytest", "rich"] [[package]] name = "fastapi" -version = "0.103.0" +version = "0.103.1" description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" optional = false python-versions = ">=3.7" files = [ - {file = "fastapi-0.103.0-py3-none-any.whl", hash = "sha256:61ab72c6c281205dd0cbaccf503e829a37e0be108d965ac223779a8479243665"}, - {file = "fastapi-0.103.0.tar.gz", hash = "sha256:4166732f5ddf61c33e9fa4664f73780872511e0598d4d5434b1816dc1e6d9421"}, + {file = "fastapi-0.103.1-py3-none-any.whl", hash = "sha256:5e5f17e826dbd9e9b5a5145976c5cd90bcaa61f2bf9a69aca423f2bcebe44d83"}, + {file = "fastapi-0.103.1.tar.gz", hash = "sha256:345844e6a82062f06a096684196aaf96c1198b25c06b72c1311b882aa2d8a35d"}, ] [package.dependencies] +anyio = ">=3.7.1,<4.0.0" pydantic = ">=1.7.4,<1.8 || >1.8,<1.8.1 || >1.8.1,<2.0.0 || >2.0.0,<2.0.1 || >2.0.1,<2.1.0 || >2.1.0,<3.0.0" starlette = ">=0.27.0,<0.28.0" typing-extensions = ">=4.5.0" @@ -1705,37 +1735,35 @@ devel = ["colorama", "json-spec", "jsonschema", "pylint", "pytest", "pytest-benc [[package]] name = "filelock" -version = "3.12.3" +version = "3.12.4" description = "A platform independent file lock." optional = false python-versions = ">=3.8" files = [ - {file = "filelock-3.12.3-py3-none-any.whl", hash = "sha256:f067e40ccc40f2b48395a80fcbd4728262fab54e232e090a4063ab804179efeb"}, - {file = "filelock-3.12.3.tar.gz", hash = "sha256:0ecc1dd2ec4672a10c8550a8182f1bd0c0a5088470ecd5a125e45f49472fac3d"}, + {file = "filelock-3.12.4-py3-none-any.whl", hash = "sha256:08c21d87ded6e2b9da6728c3dff51baf1dcecf973b768ef35bcbc3447edb9ad4"}, + {file = "filelock-3.12.4.tar.gz", hash = "sha256:2e6f249f1f3654291606e046b09f1fd5eac39b360664c27f5aad072012f8bcbd"}, ] -[package.dependencies] -typing-extensions = {version = ">=4.7.1", markers = "python_version < \"3.11\""} - [package.extras] docs = ["furo (>=2023.7.26)", "sphinx (>=7.1.2)", "sphinx-autodoc-typehints (>=1.24)"] testing = ["covdefaults (>=2.3)", "coverage (>=7.3)", "diff-cover (>=7.7)", "pytest (>=7.4)", "pytest-cov (>=4.1)", "pytest-mock (>=3.11.1)", "pytest-timeout (>=2.1)"] +typing = ["typing-extensions (>=4.7.1)"] [[package]] name = "flake8" -version = "5.0.4" +version = "6.1.0" description = "the modular source code checker: pep8 pyflakes and co" optional = false -python-versions = ">=3.6.1" +python-versions = ">=3.8.1" files = [ - {file = "flake8-5.0.4-py2.py3-none-any.whl", hash = "sha256:7a1cf6b73744f5806ab95e526f6f0d8c01c66d7bbe349562d22dfca20610b248"}, - {file = "flake8-5.0.4.tar.gz", hash = "sha256:6fbe320aad8d6b95cec8b8e47bc933004678dc63095be98528b7bdd2a9f510db"}, + {file = "flake8-6.1.0-py2.py3-none-any.whl", hash = "sha256:ffdfce58ea94c6580c77888a86506937f9a1a227dfcd15f245d694ae20a6b6e5"}, + {file = "flake8-6.1.0.tar.gz", hash = "sha256:d5b3857f07c030bdb5bf41c7f53799571d75c4491748a3adcd47de929e34cd23"}, ] [package.dependencies] mccabe = ">=0.7.0,<0.8.0" -pycodestyle = ">=2.9.0,<2.10.0" -pyflakes = ">=2.5.0,<2.6.0" +pycodestyle = ">=2.11.0,<2.12.0" +pyflakes = ">=3.1.0,<3.2.0" [[package]] name = "flask" @@ -1967,18 +1995,21 @@ smmap = ">=3.0.1,<6" [[package]] name = "gitpython" -version = "3.1.34" +version = "3.1.36" description = "GitPython is a Python library used to interact with Git repositories" optional = false python-versions = ">=3.7" files = [ - {file = "GitPython-3.1.34-py3-none-any.whl", hash = "sha256:5d3802b98a3bae1c2b8ae0e1ff2e4aa16bcdf02c145da34d092324f599f01395"}, - {file = "GitPython-3.1.34.tar.gz", hash = "sha256:85f7d365d1f6bf677ae51039c1ef67ca59091c7ebd5a3509aa399d4eda02d6dd"}, + {file = "GitPython-3.1.36-py3-none-any.whl", hash = "sha256:8d22b5cfefd17c79914226982bb7851d6ade47545b1735a9d010a2a4c26d8388"}, + {file = "GitPython-3.1.36.tar.gz", hash = "sha256:4bb0c2a6995e85064140d31a33289aa5dce80133a23d36fcd372d716c54d3ebf"}, ] [package.dependencies] gitdb = ">=4.0.1,<5" +[package.extras] +test = ["black", "coverage[toml]", "ddt (>=1.1.1,!=1.4.3)", "mypy", "pre-commit", "pytest", "pytest-cov", "pytest-sugar", "virtualenv"] + [[package]] name = "google-auth" version = "2.17.3" @@ -2094,13 +2125,13 @@ test = ["objgraph", "psutil"] [[package]] name = "griffe" -version = "0.36.1" +version = "0.36.2" description = "Signatures for entire Python programs. Extract the structure, the frame, the skeleton of your project, to generate API documentation or find breaking changes in your API." optional = false python-versions = ">=3.8" files = [ - {file = "griffe-0.36.1-py3-none-any.whl", hash = "sha256:859b653fcde0a0af0e841a0109bac2b63a2f683132ae1ec8dae5fa81e94617a0"}, - {file = "griffe-0.36.1.tar.gz", hash = "sha256:11df63f1c85f605c73e4485de70ec13784049695d228241b0b582364a20c0536"}, + {file = "griffe-0.36.2-py3-none-any.whl", hash = "sha256:ba71895a3f5f606b18dcd950e8a1f8e7332a37f90f24caeb002546593f2e0eee"}, + {file = "griffe-0.36.2.tar.gz", hash = "sha256:333ade7932bb9096781d83092602625dfbfe220e87a039d2801259a1bd41d1c2"}, ] [package.dependencies] @@ -2165,13 +2196,13 @@ files = [ [[package]] name = "httpcore" -version = "0.17.3" +version = "0.18.0" description = "A minimal low-level HTTP client." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "httpcore-0.17.3-py3-none-any.whl", hash = "sha256:c2789b767ddddfa2a5782e3199b2b7f6894540b17b16ec26b2c4d8e103510b87"}, - {file = "httpcore-0.17.3.tar.gz", hash = "sha256:a6f30213335e34c1ade7be6ec7c47f19f50c56db36abef1a9dfa3815b1cb3888"}, + {file = "httpcore-0.18.0-py3-none-any.whl", hash = "sha256:adc5398ee0a476567bf87467063ee63584a8bce86078bf748e48754f60202ced"}, + {file = "httpcore-0.18.0.tar.gz", hash = "sha256:13b5e5cd1dca1a6636a6aaea212b19f4f85cd88c366a2b82304181b769aab3c9"}, ] [package.dependencies] @@ -2186,19 +2217,19 @@ socks = ["socksio (==1.*)"] [[package]] name = "httpx" -version = "0.24.1" +version = "0.25.0" description = "The next generation HTTP client." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "httpx-0.24.1-py3-none-any.whl", hash = "sha256:06781eb9ac53cde990577af654bd990a4949de37a28bdb4a230d434f3a30b9bd"}, - {file = "httpx-0.24.1.tar.gz", hash = "sha256:5853a43053df830c20f8110c5e69fe44d035d850b2dfe795e196f00fdb774bdd"}, + {file = "httpx-0.25.0-py3-none-any.whl", hash = "sha256:181ea7f8ba3a82578be86ef4171554dd45fec26a02556a744db029a0a27b7100"}, + {file = "httpx-0.25.0.tar.gz", hash = "sha256:47ecda285389cb32bb2691cc6e069e3ab0205956f681c5b2ad2325719751d875"}, ] [package.dependencies] certifi = "*" h2 = {version = ">=3,<5", optional = true, markers = "extra == \"http2\""} -httpcore = ">=0.15.0,<0.18.0" +httpcore = ">=0.18.0,<0.19.0" idna = "*" sniffio = "*" @@ -2210,13 +2241,13 @@ socks = ["socksio (==1.*)"] [[package]] name = "huggingface-hub" -version = "0.16.4" +version = "0.17.1" description = "Client library to download and publish models, datasets and other repos on the huggingface.co hub" optional = false -python-versions = ">=3.7.0" +python-versions = ">=3.8.0" files = [ - {file = "huggingface_hub-0.16.4-py3-none-any.whl", hash = "sha256:0d3df29932f334fead024afc7cb4cc5149d955238b8b5e42dcf9740d6995a349"}, - {file = "huggingface_hub-0.16.4.tar.gz", hash = "sha256:608c7d4f3d368b326d1747f91523dbd1f692871e8e2e7a4750314a2dd8b63e14"}, + {file = "huggingface_hub-0.17.1-py3-none-any.whl", hash = "sha256:7a9dc262a2e0ecf8c1749c8b9a7510a7a22981849f561af4345942d421822451"}, + {file = "huggingface_hub-0.17.1.tar.gz", hash = "sha256:dd828d2a24ee6af86392042cc1052c482c053eb574864669f0cae4d29620e62c"}, ] [package.dependencies] @@ -2229,16 +2260,17 @@ tqdm = ">=4.42.1" typing-extensions = ">=3.7.4.3" [package.extras] -all = ["InquirerPy (==0.3.4)", "Jinja2", "Pillow", "aiohttp", "black (>=23.1,<24.0)", "gradio", "jedi", "mypy (==0.982)", "numpy", "pydantic", "pytest", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-vcr", "pytest-xdist", "ruff (>=0.0.241)", "soundfile", "types-PyYAML", "types-requests", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3", "urllib3 (<2.0)"] +all = ["InquirerPy (==0.3.4)", "Jinja2", "Pillow", "aiohttp", "black (==23.7)", "gradio", "jedi", "mypy (==1.5.1)", "numpy", "pydantic (<2.0)", "pytest", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-vcr", "pytest-xdist", "ruff (>=0.0.241)", "soundfile", "types-PyYAML", "types-requests", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3", "urllib3 (<2.0)"] cli = ["InquirerPy (==0.3.4)"] -dev = ["InquirerPy (==0.3.4)", "Jinja2", "Pillow", "aiohttp", "black (>=23.1,<24.0)", "gradio", "jedi", "mypy (==0.982)", "numpy", "pydantic", "pytest", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-vcr", "pytest-xdist", "ruff (>=0.0.241)", "soundfile", "types-PyYAML", "types-requests", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3", "urllib3 (<2.0)"] +dev = ["InquirerPy (==0.3.4)", "Jinja2", "Pillow", "aiohttp", "black (==23.7)", "gradio", "jedi", "mypy (==1.5.1)", "numpy", "pydantic (<2.0)", "pytest", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-vcr", "pytest-xdist", "ruff (>=0.0.241)", "soundfile", "types-PyYAML", "types-requests", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3", "urllib3 (<2.0)"] +docs = ["InquirerPy (==0.3.4)", "Jinja2", "Pillow", "aiohttp", "black (==23.7)", "gradio", "hf-doc-builder", "jedi", "mypy (==1.5.1)", "numpy", "pydantic (<2.0)", "pytest", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-vcr", "pytest-xdist", "ruff (>=0.0.241)", "soundfile", "types-PyYAML", "types-requests", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3", "urllib3 (<2.0)", "watchdog"] fastai = ["fastai (>=2.4)", "fastcore (>=1.3.27)", "toml"] -inference = ["aiohttp", "pydantic"] -quality = ["black (>=23.1,<24.0)", "mypy (==0.982)", "ruff (>=0.0.241)"] +inference = ["aiohttp", "pydantic (<2.0)"] +quality = ["black (==23.7)", "mypy (==1.5.1)", "ruff (>=0.0.241)"] tensorflow = ["graphviz", "pydot", "tensorflow"] -testing = ["InquirerPy (==0.3.4)", "Jinja2", "Pillow", "aiohttp", "gradio", "jedi", "numpy", "pydantic", "pytest", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-vcr", "pytest-xdist", "soundfile", "urllib3 (<2.0)"] +testing = ["InquirerPy (==0.3.4)", "Jinja2", "Pillow", "aiohttp", "gradio", "jedi", "numpy", "pydantic (<2.0)", "pytest", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-vcr", "pytest-xdist", "soundfile", "urllib3 (<2.0)"] torch = ["torch"] -typing = ["pydantic", "types-PyYAML", "types-requests", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3"] +typing = ["pydantic (<2.0)", "types-PyYAML", "types-requests", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3"] [[package]] name = "hydra-core" @@ -2269,13 +2301,13 @@ files = [ [[package]] name = "identify" -version = "2.5.27" +version = "2.5.28" description = "File identification library for Python" optional = false python-versions = ">=3.8" files = [ - {file = "identify-2.5.27-py2.py3-none-any.whl", hash = "sha256:fdb527b2dfe24602809b2201e033c2a113d7bdf716db3ca8e3243f735dcecaba"}, - {file = "identify-2.5.27.tar.gz", hash = "sha256:287b75b04a0e22d727bc9a41f0d4f3c1bcada97490fa6eabb5b28f0e9097e733"}, + {file = "identify-2.5.28-py2.py3-none-any.whl", hash = "sha256:87816de144bf46d161bd5b3e8f5596b16cade3b80be537087334b26bc5c177f3"}, + {file = "identify-2.5.28.tar.gz", hash = "sha256:94bb59643083ebd60dc996d043497479ee554381fbc5307763915cda49b0e78f"}, ] [package.extras] @@ -2491,21 +2523,21 @@ files = [ [[package]] name = "ipywidgets" -version = "8.1.0" +version = "8.1.1" description = "Jupyter interactive widgets" optional = false python-versions = ">=3.7" files = [ - {file = "ipywidgets-8.1.0-py3-none-any.whl", hash = "sha256:6c8396cc7b8c95dfb4e9ab0054f48c002f045e7e5d7ae523f559d64e525a98ab"}, - {file = "ipywidgets-8.1.0.tar.gz", hash = "sha256:ce97dd90525b3066fd00094690964e7eac14cf9b7745d35565b5eeac20cce687"}, + {file = "ipywidgets-8.1.1-py3-none-any.whl", hash = "sha256:2b88d728656aea3bbfd05d32c747cfd0078f9d7e159cf982433b58ad717eed7f"}, + {file = "ipywidgets-8.1.1.tar.gz", hash = "sha256:40211efb556adec6fa450ccc2a77d59ca44a060f4f9f136833df59c9f538e6e8"}, ] [package.dependencies] comm = ">=0.1.3" ipython = ">=6.1.0" -jupyterlab-widgets = ">=3.0.7,<3.1.0" +jupyterlab-widgets = ">=3.0.9,<3.1.0" traitlets = ">=4.3.1" -widgetsnbextension = ">=4.0.7,<4.1.0" +widgetsnbextension = ">=4.0.9,<4.1.0" [package.extras] test = ["ipykernel", "jsonschema", "pytest (>=3.6.0)", "pytest-cov", "pytz"] @@ -2538,6 +2570,23 @@ files = [ [package.dependencies] arrow = ">=0.15.0" +[[package]] +name = "isort" +version = "5.12.0" +description = "A Python utility / library to sort Python imports." +optional = false +python-versions = ">=3.8.0" +files = [ + {file = "isort-5.12.0-py3-none-any.whl", hash = "sha256:f84c2818376e66cf843d497486ea8fed8700b340f308f076c6fb1229dff318b6"}, + {file = "isort-5.12.0.tar.gz", hash = "sha256:8bef7dde241278824a6d83f44a544709b065191b95b6e50894bdc722fcba0504"}, +] + +[package.extras] +colors = ["colorama (>=0.4.3)"] +pipfile-deprecated-finder = ["pip-shims (>=0.5.2)", "pipreqs", "requirementslib"] +plugins = ["setuptools"] +requirements-deprecated-finder = ["pip-api", "pipreqs"] + [[package]] name = "itk" version = "5.3.0" @@ -2986,26 +3035,27 @@ qtconsole = "*" [[package]] name = "jupyter-client" -version = "8.3.1" +version = "7.4.9" description = "Jupyter protocol implementation and client libraries" optional = false -python-versions = ">=3.8" +python-versions = ">=3.7" files = [ - {file = "jupyter_client-8.3.1-py3-none-any.whl", hash = "sha256:5eb9f55eb0650e81de6b7e34308d8b92d04fe4ec41cd8193a913979e33d8e1a5"}, - {file = "jupyter_client-8.3.1.tar.gz", hash = "sha256:60294b2d5b869356c893f57b1a877ea6510d60d45cf4b38057f1672d85699ac9"}, + {file = "jupyter_client-7.4.9-py3-none-any.whl", hash = "sha256:214668aaea208195f4c13d28eb272ba79f945fc0cf3f11c7092c20b2ca1980e7"}, + {file = "jupyter_client-7.4.9.tar.gz", hash = "sha256:52be28e04171f07aed8f20e1616a5a552ab9fee9cbbe6c1896ae170c3880d392"}, ] [package.dependencies] -importlib-metadata = {version = ">=4.8.3", markers = "python_version < \"3.10\""} -jupyter-core = ">=4.12,<5.0.dev0 || >=5.1.dev0" +entrypoints = "*" +jupyter-core = ">=4.9.2" +nest-asyncio = ">=1.5.4" python-dateutil = ">=2.8.2" pyzmq = ">=23.0" tornado = ">=6.2" -traitlets = ">=5.3" +traitlets = "*" [package.extras] -docs = ["ipykernel", "myst-parser", "pydata-sphinx-theme", "sphinx (>=4)", "sphinx-autodoc-typehints", "sphinxcontrib-github-alt", "sphinxcontrib-spelling"] -test = ["coverage", "ipykernel (>=6.14)", "mypy", "paramiko", "pre-commit", "pytest", "pytest-cov", "pytest-jupyter[client] (>=0.4.1)", "pytest-timeout"] +doc = ["ipykernel", "myst-parser", "sphinx (>=1.3.6)", "sphinx-rtd-theme", "sphinxcontrib-github-alt"] +test = ["codecov", "coverage", "ipykernel (>=6.12)", "ipython", "mypy", "pre-commit", "pytest", "pytest-asyncio (>=0.18)", "pytest-cov", "pytest-timeout"] [[package]] name = "jupyter-console" @@ -3229,13 +3279,13 @@ files = [ [[package]] name = "jupyterlab-server" -version = "2.24.0" +version = "2.25.0" description = "A set of server components for JupyterLab and JupyterLab like applications." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "jupyterlab_server-2.24.0-py3-none-any.whl", hash = "sha256:5f077e142bb8dc9b843d960f940c513581bceca3793a0d80f9c67d9522c4e876"}, - {file = "jupyterlab_server-2.24.0.tar.gz", hash = "sha256:4e6f99e0a5579bbbc32e449c4dbb039561d4f1a7827d5733273ed56738f21f07"}, + {file = "jupyterlab_server-2.25.0-py3-none-any.whl", hash = "sha256:c9f67a98b295c5dee87f41551b0558374e45d449f3edca153dd722140630dcb2"}, + {file = "jupyterlab_server-2.25.0.tar.gz", hash = "sha256:77c2f1f282d610f95e496e20d5bf1d2a7706826dfb7b18f3378ae2870d272fb7"}, ] [package.dependencies] @@ -3243,27 +3293,49 @@ babel = ">=2.10" importlib-metadata = {version = ">=4.8.3", markers = "python_version < \"3.10\""} jinja2 = ">=3.0.3" json5 = ">=0.9.0" -jsonschema = ">=4.17.3" +jsonschema = ">=4.18.0" jupyter-server = ">=1.21,<3" packaging = ">=21.3" -requests = ">=2.28" +requests = ">=2.31" [package.extras] docs = ["autodoc-traits", "jinja2 (<3.2.0)", "mistune (<4)", "myst-parser", "pydata-sphinx-theme", "sphinx", "sphinx-copybutton", "sphinxcontrib-openapi (>0.8)"] -openapi = ["openapi-core (>=0.16.1,<0.17.0)", "ruamel-yaml"] -test = ["hatch", "ipykernel", "jupyterlab-server[openapi]", "openapi-spec-validator (>=0.5.1,<0.7.0)", "pytest (>=7.0)", "pytest-console-scripts", "pytest-cov", "pytest-jupyter[server] (>=0.6.2)", "pytest-timeout", "requests-mock", "sphinxcontrib-spelling", "strict-rfc3339", "werkzeug"] +openapi = ["openapi-core (>=0.18.0,<0.19.0)", "ruamel-yaml"] +test = ["hatch", "ipykernel", "openapi-core (>=0.18.0,<0.19.0)", "openapi-spec-validator (>=0.6.0,<0.7.0)", "pytest (>=7.0)", "pytest-console-scripts", "pytest-cov", "pytest-jupyter[server] (>=0.6.2)", "pytest-timeout", "requests-mock", "ruamel-yaml", "sphinxcontrib-spelling", "strict-rfc3339", "werkzeug"] [[package]] name = "jupyterlab-widgets" -version = "3.0.8" +version = "3.0.9" description = "Jupyter interactive widgets for JupyterLab" optional = false python-versions = ">=3.7" files = [ - {file = "jupyterlab_widgets-3.0.8-py3-none-any.whl", hash = "sha256:4715912d6ceab839c9db35953c764b3214ebbc9161c809f6e0510168845dfdf5"}, - {file = "jupyterlab_widgets-3.0.8.tar.gz", hash = "sha256:d428ab97b8d87cc7c54cbf37644d6e0f0e662f23876e05fa460a73ec3257252a"}, + {file = "jupyterlab_widgets-3.0.9-py3-none-any.whl", hash = "sha256:3cf5bdf5b897bf3bccf1c11873aa4afd776d7430200f765e0686bd352487b58d"}, + {file = "jupyterlab_widgets-3.0.9.tar.gz", hash = "sha256:6005a4e974c7beee84060fdfba341a3218495046de8ae3ec64888e5fe19fdb4c"}, ] +[[package]] +name = "jupytext" +version = "1.15.1" +description = "Jupyter notebooks as Markdown documents, Julia, Python or R scripts" +optional = false +python-versions = "~=3.6" +files = [ + {file = "jupytext-1.15.1-py3-none-any.whl", hash = "sha256:1df0724f97e5c0db9bb5b71ff9ecf4225e2bccbfb49131834424b043edbe8af8"}, + {file = "jupytext-1.15.1.tar.gz", hash = "sha256:39c2112a1a007f2e9e2783695054205562466fd44f68acb371ebd52feac7ff58"}, +] + +[package.dependencies] +markdown-it-py = ">=1.0.0" +mdit-py-plugins = "*" +nbformat = "*" +pyyaml = "*" +toml = "*" + +[package.extras] +rst2md = ["sphinx-gallery (>=0.7.0,<0.8.0)"] +toml = ["toml"] + [[package]] name = "kaggle" version = "1.5.16" @@ -3710,52 +3782,58 @@ files = [ [[package]] name = "matplotlib" -version = "3.7.2" +version = "3.7.3" description = "Python plotting package" optional = false python-versions = ">=3.8" files = [ - {file = "matplotlib-3.7.2-cp310-cp310-macosx_10_12_universal2.whl", hash = "sha256:2699f7e73a76d4c110f4f25be9d2496d6ab4f17345307738557d345f099e07de"}, - {file = "matplotlib-3.7.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:a8035ba590658bae7562786c9cc6ea1a84aa49d3afab157e414c9e2ea74f496d"}, - {file = "matplotlib-3.7.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2f8e4a49493add46ad4a8c92f63e19d548b2b6ebbed75c6b4c7f46f57d36cdd1"}, - {file = "matplotlib-3.7.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:71667eb2ccca4c3537d9414b1bc00554cb7f91527c17ee4ec38027201f8f1603"}, - {file = "matplotlib-3.7.2-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:152ee0b569a37630d8628534c628456b28686e085d51394da6b71ef84c4da201"}, - {file = "matplotlib-3.7.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:070f8dddd1f5939e60aacb8fa08f19551f4b0140fab16a3669d5cd6e9cb28fc8"}, - {file = "matplotlib-3.7.2-cp310-cp310-win32.whl", hash = "sha256:fdbb46fad4fb47443b5b8ac76904b2e7a66556844f33370861b4788db0f8816a"}, - {file = "matplotlib-3.7.2-cp310-cp310-win_amd64.whl", hash = "sha256:23fb1750934e5f0128f9423db27c474aa32534cec21f7b2153262b066a581fd1"}, - {file = "matplotlib-3.7.2-cp311-cp311-macosx_10_12_universal2.whl", hash = "sha256:30e1409b857aa8a747c5d4f85f63a79e479835f8dffc52992ac1f3f25837b544"}, - {file = "matplotlib-3.7.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:50e0a55ec74bf2d7a0ebf50ac580a209582c2dd0f7ab51bc270f1b4a0027454e"}, - {file = "matplotlib-3.7.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ac60daa1dc83e8821eed155796b0f7888b6b916cf61d620a4ddd8200ac70cd64"}, - {file = "matplotlib-3.7.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:305e3da477dc8607336ba10bac96986d6308d614706cae2efe7d3ffa60465b24"}, - {file = "matplotlib-3.7.2-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1c308b255efb9b06b23874236ec0f10f026673ad6515f602027cc8ac7805352d"}, - {file = "matplotlib-3.7.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:60c521e21031632aa0d87ca5ba0c1c05f3daacadb34c093585a0be6780f698e4"}, - {file = "matplotlib-3.7.2-cp311-cp311-win32.whl", hash = "sha256:26bede320d77e469fdf1bde212de0ec889169b04f7f1179b8930d66f82b30cbc"}, - {file = "matplotlib-3.7.2-cp311-cp311-win_amd64.whl", hash = "sha256:af4860132c8c05261a5f5f8467f1b269bf1c7c23902d75f2be57c4a7f2394b3e"}, - {file = "matplotlib-3.7.2-cp38-cp38-macosx_10_12_universal2.whl", hash = "sha256:a1733b8e84e7e40a9853e505fe68cc54339f97273bdfe6f3ed980095f769ddc7"}, - {file = "matplotlib-3.7.2-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:d9881356dc48e58910c53af82b57183879129fa30492be69058c5b0d9fddf391"}, - {file = "matplotlib-3.7.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:f081c03f413f59390a80b3e351cc2b2ea0205839714dbc364519bcf51f4b56ca"}, - {file = "matplotlib-3.7.2-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:1cd120fca3407a225168238b790bd5c528f0fafde6172b140a2f3ab7a4ea63e9"}, - {file = "matplotlib-3.7.2-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:a2c1590b90aa7bd741b54c62b78de05d4186271e34e2377e0289d943b3522273"}, - {file = "matplotlib-3.7.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6d2ff3c984b8a569bc1383cd468fc06b70d7b59d5c2854ca39f1436ae8394117"}, - {file = "matplotlib-3.7.2-cp38-cp38-win32.whl", hash = "sha256:5dea00b62d28654b71ca92463656d80646675628d0828e08a5f3b57e12869e13"}, - {file = "matplotlib-3.7.2-cp38-cp38-win_amd64.whl", hash = "sha256:0f506a1776ee94f9e131af1ac6efa6e5bc7cb606a3e389b0ccb6e657f60bb676"}, - {file = "matplotlib-3.7.2-cp39-cp39-macosx_10_12_universal2.whl", hash = "sha256:6515e878f91894c2e4340d81f0911857998ccaf04dbc1bba781e3d89cbf70608"}, - {file = "matplotlib-3.7.2-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:71f7a8c6b124e904db550f5b9fe483d28b896d4135e45c4ea381ad3b8a0e3256"}, - {file = "matplotlib-3.7.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:12f01b92ecd518e0697da4d97d163b2b3aa55eb3eb4e2c98235b3396d7dad55f"}, - {file = "matplotlib-3.7.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a7e28d6396563955f7af437894a36bf2b279462239a41028323e04b85179058b"}, - {file = "matplotlib-3.7.2-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dbcf59334ff645e6a67cd5f78b4b2cdb76384cdf587fa0d2dc85f634a72e1a3e"}, - {file = "matplotlib-3.7.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:318c89edde72ff95d8df67d82aca03861240512994a597a435a1011ba18dbc7f"}, - {file = "matplotlib-3.7.2-cp39-cp39-win32.whl", hash = "sha256:ce55289d5659b5b12b3db4dc9b7075b70cef5631e56530f14b2945e8836f2d20"}, - {file = "matplotlib-3.7.2-cp39-cp39-win_amd64.whl", hash = "sha256:2ecb5be2b2815431c81dc115667e33da0f5a1bcf6143980d180d09a717c4a12e"}, - {file = "matplotlib-3.7.2-pp38-pypy38_pp73-macosx_10_12_x86_64.whl", hash = "sha256:fdcd28360dbb6203fb5219b1a5658df226ac9bebc2542a9e8f457de959d713d0"}, - {file = "matplotlib-3.7.2-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0c3cca3e842b11b55b52c6fb8bd6a4088693829acbfcdb3e815fa9b7d5c92c1b"}, - {file = "matplotlib-3.7.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ebf577c7a6744e9e1bd3fee45fc74a02710b214f94e2bde344912d85e0c9af7c"}, - {file = "matplotlib-3.7.2-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:936bba394682049919dda062d33435b3be211dc3dcaa011e09634f060ec878b2"}, - {file = "matplotlib-3.7.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:bc221ffbc2150458b1cd71cdd9ddd5bb37962b036e41b8be258280b5b01da1dd"}, - {file = "matplotlib-3.7.2-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:35d74ebdb3f71f112b36c2629cf32323adfbf42679e2751252acd468f5001c07"}, - {file = "matplotlib-3.7.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:717157e61b3a71d3d26ad4e1770dc85156c9af435659a25ee6407dc866cb258d"}, - {file = "matplotlib-3.7.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:20f844d6be031948148ba49605c8b96dfe7d3711d1b63592830d650622458c11"}, - {file = "matplotlib-3.7.2.tar.gz", hash = "sha256:a8cdb91dddb04436bd2f098b8fdf4b81352e68cf4d2c6756fcc414791076569b"}, + {file = "matplotlib-3.7.3-cp310-cp310-macosx_10_12_universal2.whl", hash = "sha256:085c33b27561d9c04386789d5aa5eb4a932ddef43cfcdd0e01735f9a6e85ce0c"}, + {file = "matplotlib-3.7.3-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:c568e80e1c17f68a727f30f591926751b97b98314d8e59804f54f86ae6fa6a22"}, + {file = "matplotlib-3.7.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:7baf98c5ad59c5c4743ea884bb025cbffa52dacdfdac0da3e6021a285a90377e"}, + {file = "matplotlib-3.7.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:236024f582e40dac39bca592258888b38ae47a9fed7b8de652d68d3d02d47d2b"}, + {file = "matplotlib-3.7.3-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:12b4f6795efea037ce2d41e7c417ad8bd02d5719c6ad4a8450a0708f4a1cfb89"}, + {file = "matplotlib-3.7.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:78b2136cc6c5415b78977e0e8c608647d597204b05b1d9089ccf513c7d913733"}, + {file = "matplotlib-3.7.3-cp310-cp310-win32.whl", hash = "sha256:122dcbf9be0086e2a95d9e5e0632dbf3bd5b65eaa68c369363310a6c87753059"}, + {file = "matplotlib-3.7.3-cp310-cp310-win_amd64.whl", hash = "sha256:4aab27d9e33293389e3c1d7c881d414a72bdfda0fedc3a6bf46c6fa88d9b8015"}, + {file = "matplotlib-3.7.3-cp311-cp311-macosx_10_12_universal2.whl", hash = "sha256:d5adc743de91e8e0b13df60deb1b1c285b8effea3d66223afceb14b63c9b05de"}, + {file = "matplotlib-3.7.3-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:55de4cf7cd0071b8ebf203981b53ab64f988a0a1f897a2dff300a1124e8bcd8b"}, + {file = "matplotlib-3.7.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ac03377fd908aaee2312d0b11735753e907adb6f4d1d102de5e2425249693f6c"}, + {file = "matplotlib-3.7.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:755bafc10a46918ce9a39980009b54b02dd249594e5adf52f9c56acfddb5d0b7"}, + {file = "matplotlib-3.7.3-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1a6094c6f8e8d18db631754df4fe9a34dec3caf074f6869a7db09f18f9b1d6b2"}, + {file = "matplotlib-3.7.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:272dba2f1b107790ed78ebf5385b8d14b27ad9e90419de340364b49fe549a993"}, + {file = "matplotlib-3.7.3-cp311-cp311-win32.whl", hash = "sha256:591c123bed1cb4b9996fb60b41a6d89c2ec4943244540776c5f1283fb6960a53"}, + {file = "matplotlib-3.7.3-cp311-cp311-win_amd64.whl", hash = "sha256:3bf3a178c6504694cee8b88b353df0051583f2f6f8faa146f67115c27c856881"}, + {file = "matplotlib-3.7.3-cp312-cp312-macosx_10_12_universal2.whl", hash = "sha256:edf54cac8ee3603f3093616b40a931e8c063969756a4d78a86e82c2fea9659f7"}, + {file = "matplotlib-3.7.3-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:91e36a85ea639a1ba9f91427041eac064b04829945fe331a92617b6cb21d27e5"}, + {file = "matplotlib-3.7.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:caf5eaaf7c68f8d7df269dfbcaf46f48a70ff482bfcebdcc97519671023f2a7d"}, + {file = "matplotlib-3.7.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:74bf57f505efea376097e948b7cdd87191a7ce8180616390aef496639edf601f"}, + {file = "matplotlib-3.7.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ee152a88a0da527840a426535514b6ed8ac4240eb856b1da92cf48124320e346"}, + {file = "matplotlib-3.7.3-cp312-cp312-win_amd64.whl", hash = "sha256:67a410a9c9e07cbc83581eeea144bbe298870bf0ac0ee2f2e10a015ab7efee19"}, + {file = "matplotlib-3.7.3-cp38-cp38-macosx_10_12_universal2.whl", hash = "sha256:259999c05285cb993d7f2a419cea547863fa215379eda81f7254c9e932963729"}, + {file = "matplotlib-3.7.3-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:3f4e7fd5a6157e1d018ce2166ec8e531a481dd4a36f035b5c23edfe05a25419a"}, + {file = "matplotlib-3.7.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:faa3d12d8811d08d14080a8b7b9caea9a457dc495350166b56df0db4b9909ef5"}, + {file = "matplotlib-3.7.3-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:336e88900c11441e458da01c8414fc57e04e17f9d3bb94958a76faa2652bcf6b"}, + {file = "matplotlib-3.7.3-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:12f4c0dd8aa280d796c8772ea8265a14f11a04319baa3a16daa5556065e8baea"}, + {file = "matplotlib-3.7.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1990955b11e7918d256cf3b956b10997f405b7917a3f1c7d8e69c1d15c7b1930"}, + {file = "matplotlib-3.7.3-cp38-cp38-win32.whl", hash = "sha256:e78707b751260b42b721507ad7aa60fe4026d7f51c74cca6b9cd8b123ebb633a"}, + {file = "matplotlib-3.7.3-cp38-cp38-win_amd64.whl", hash = "sha256:e594ee43c59ea39ca5c6244667cac9d017a3527febc31f5532ad9135cf7469ec"}, + {file = "matplotlib-3.7.3-cp39-cp39-macosx_10_12_universal2.whl", hash = "sha256:6eaa1cf0e94c936a26b78f6d756c5fbc12e0a58c8a68b7248a2a31456ce4e234"}, + {file = "matplotlib-3.7.3-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:0a97af9d22e8ebedc9f00b043d9bbd29a375e9e10b656982012dded44c10fd77"}, + {file = "matplotlib-3.7.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:1f9c6c16597af660433ab330b59ee2934b832ee1fabcaf5cbde7b2add840f31e"}, + {file = "matplotlib-3.7.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a7240259b4b9cbc62381f6378cff4d57af539162a18e832c1e48042fabc40b6b"}, + {file = "matplotlib-3.7.3-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:747c6191d2e88ae854809e69aa358dbf852ff1a5738401b85c1cc9012309897a"}, + {file = "matplotlib-3.7.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ec726b08a5275d827aa91bb951e68234a4423adb91cf65bc0fcdc0f2777663f7"}, + {file = "matplotlib-3.7.3-cp39-cp39-win32.whl", hash = "sha256:40e3b9b450c6534f07278310c4e34caff41c2a42377e4b9d47b0f8d3ac1083a2"}, + {file = "matplotlib-3.7.3-cp39-cp39-win_amd64.whl", hash = "sha256:dfc118642903a23e309b1da32886bb39a4314147d013e820c86b5fb4cb2e36d0"}, + {file = "matplotlib-3.7.3-pp38-pypy38_pp73-macosx_10_12_x86_64.whl", hash = "sha256:165c8082bf8fc0360c24aa4724a22eaadbfd8c28bf1ccf7e94d685cad48261e4"}, + {file = "matplotlib-3.7.3-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ebd8470cc2a3594746ff0513aecbfa2c55ff6f58e6cef2efb1a54eb87c88ffa2"}, + {file = "matplotlib-3.7.3-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7153453669c9672b52095119fd21dd032d19225d48413a2871519b17db4b0fde"}, + {file = "matplotlib-3.7.3-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:498a08267dc69dd8f24c4b5d7423fa584d7ce0027ba71f7881df05fc09b89bb7"}, + {file = "matplotlib-3.7.3-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:d48999c4b19b5a0c058c9cd828ff6fc7748390679f6cf9a2ad653a3e802c87d3"}, + {file = "matplotlib-3.7.3-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:22d65d18b4ee8070a5fea5761d59293f1f9e2fac37ec9ce090463b0e629432fd"}, + {file = "matplotlib-3.7.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c40cde976c36693cc0767e27cf5f443f91c23520060bd9496678364adfafe9c"}, + {file = "matplotlib-3.7.3-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:39018a2b17592448fbfdf4b8352955e6c3905359939791d4ff429296494d1a0c"}, + {file = "matplotlib-3.7.3.tar.gz", hash = "sha256:f09b3dd6bdeb588de91f853bbb2d6f0ff8ab693485b0c49035eaa510cb4f142e"}, ] [package.dependencies] @@ -3764,11 +3842,12 @@ cycler = ">=0.10" fonttools = ">=4.22.0" importlib-resources = {version = ">=3.2.0", markers = "python_version < \"3.10\""} kiwisolver = ">=1.0.1" -numpy = ">=1.20" +numpy = ">=1.20,<2" packaging = ">=20.0" pillow = ">=6.2.0" -pyparsing = ">=2.3.1,<3.1" +pyparsing = ">=2.3.1" python-dateutil = ">=2.7" +setuptools_scm = ">=7" [[package]] name = "matplotlib-inline" @@ -4274,6 +4353,35 @@ traitlets = ">=5.1" docs = ["myst-parser", "pydata-sphinx-theme", "sphinx", "sphinxcontrib-github-alt", "sphinxcontrib-spelling"] test = ["pep440", "pre-commit", "pytest", "testpath"] +[[package]] +name = "nbqa" +version = "1.7.0" +description = "Run any standard Python code quality tool on a Jupyter Notebook" +optional = false +python-versions = ">=3.8.0" +files = [ + {file = "nbqa-1.7.0-py3-none-any.whl", hash = "sha256:42a79b0f57c3ef47b8b223dc8c265f499812f529dc5154688449e7bd05d76b7e"}, + {file = "nbqa-1.7.0.tar.gz", hash = "sha256:117112ad6d618ff13afc5ba41ca0ff21c23f084a6df7875fb04b7f2c01a136c4"}, +] + +[package.dependencies] +autopep8 = ">=1.5" +black = {version = "*", optional = true, markers = "extra == \"toolchain\""} +blacken-docs = {version = "*", optional = true, markers = "extra == \"toolchain\""} +flake8 = {version = "*", optional = true, markers = "extra == \"toolchain\""} +ipython = ">=7.8.0" +isort = {version = "*", optional = true, markers = "extra == \"toolchain\""} +jupytext = {version = "*", optional = true, markers = "extra == \"toolchain\""} +mypy = {version = "*", optional = true, markers = "extra == \"toolchain\""} +pylint = {version = "*", optional = true, markers = "extra == \"toolchain\""} +pyupgrade = {version = "*", optional = true, markers = "extra == \"toolchain\""} +ruff = {version = "*", optional = true, markers = "extra == \"toolchain\""} +tokenize-rt = ">=3.2.0" +tomli = "*" + +[package.extras] +toolchain = ["black", "blacken-docs", "flake8", "isort", "jupytext", "mypy", "pylint", "pyupgrade", "ruff"] + [[package]] name = "nbsphinx" version = "0.8.12" @@ -4377,13 +4485,13 @@ setuptools = "*" [[package]] name = "notebook" -version = "6.5.4" +version = "6.5.5" description = "A web-based notebook environment for interactive computing" optional = false python-versions = ">=3.7" files = [ - {file = "notebook-6.5.4-py3-none-any.whl", hash = "sha256:dd17e78aefe64c768737b32bf171c1c766666a21cc79a44d37a1700771cab56f"}, - {file = "notebook-6.5.4.tar.gz", hash = "sha256:517209568bd47261e2def27a140e97d49070602eea0d226a696f42a7f16c9a4e"}, + {file = "notebook-6.5.5-py3-none-any.whl", hash = "sha256:171039245a5b1a8f8233165091210632c21250ce2a652daed38fe8f94389984f"}, + {file = "notebook-6.5.5.tar.gz", hash = "sha256:457caa1fa1c647395420945b2b7559f603eedbc9aeb2a59a0c286c8029e31efa"}, ] [package.dependencies] @@ -4391,14 +4499,14 @@ argon2-cffi = "*" ipykernel = "*" ipython-genutils = "*" jinja2 = "*" -jupyter-client = ">=5.3.4" +jupyter-client = ">=5.3.4,<8" jupyter-core = ">=4.6.1" nbclassic = ">=0.4.7" nbconvert = ">=5" nbformat = "*" nest-asyncio = ">=1.5" prometheus-client = "*" -pyzmq = ">=17" +pyzmq = ">=17,<25" Send2Trash = ">=1.8.0" terminado = ">=0.8.3" tornado = ">=6.1" @@ -4628,82 +4736,80 @@ files = [ [package.dependencies] numpy = [ - {version = ">=1.21.0", markers = "python_version <= \"3.9\" and platform_system == \"Darwin\" and platform_machine == \"arm64\""}, - {version = ">=1.19.3", markers = "python_version >= \"3.6\" and platform_system == \"Linux\" and platform_machine == \"aarch64\" or python_version >= \"3.9\""}, - {version = ">=1.17.0", markers = "python_version >= \"3.7\""}, - {version = ">=1.17.3", markers = "python_version >= \"3.8\""}, - {version = ">=1.21.2", markers = "python_version >= \"3.10\""}, - {version = ">=1.21.4", markers = "python_version >= \"3.10\" and platform_system == \"Darwin\""}, + {version = ">=1.21.0", markers = "python_version == \"3.9\" and platform_system == \"Darwin\" and platform_machine == \"arm64\""}, + {version = ">=1.19.3", markers = "platform_system == \"Linux\" and platform_machine == \"aarch64\" and python_version >= \"3.8\" and python_version < \"3.10\" or python_version > \"3.9\" and python_version < \"3.10\" or python_version >= \"3.9\" and platform_system != \"Darwin\" and python_version < \"3.10\" or python_version >= \"3.9\" and platform_machine != \"arm64\" and python_version < \"3.10\""}, {version = ">=1.23.5", markers = "python_version >= \"3.11\""}, + {version = ">=1.21.2", markers = "platform_system != \"Darwin\" and python_version >= \"3.10\" and python_version < \"3.11\""}, + {version = ">=1.21.4", markers = "python_version >= \"3.10\" and platform_system == \"Darwin\" and python_version < \"3.11\""}, ] [[package]] name = "orjson" -version = "3.9.5" +version = "3.9.7" description = "Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy" optional = false python-versions = ">=3.7" files = [ - {file = "orjson-3.9.5-cp310-cp310-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:ad6845912a71adcc65df7c8a7f2155eba2096cf03ad2c061c93857de70d699ad"}, - {file = "orjson-3.9.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e298e0aacfcc14ef4476c3f409e85475031de24e5b23605a465e9bf4b2156273"}, - {file = "orjson-3.9.5-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:83c9939073281ef7dd7c5ca7f54cceccb840b440cec4b8a326bda507ff88a0a6"}, - {file = "orjson-3.9.5-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e174cc579904a48ee1ea3acb7045e8a6c5d52c17688dfcb00e0e842ec378cabf"}, - {file = "orjson-3.9.5-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f8d51702f42c785b115401e1d64a27a2ea767ae7cf1fb8edaa09c7cf1571c660"}, - {file = "orjson-3.9.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f13d61c0c7414ddee1ef4d0f303e2222f8cced5a2e26d9774751aecd72324c9e"}, - {file = "orjson-3.9.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d748cc48caf5a91c883d306ab648df1b29e16b488c9316852844dd0fd000d1c2"}, - {file = "orjson-3.9.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:bd19bc08fa023e4c2cbf8294ad3f2b8922f4de9ba088dbc71e6b268fdf54591c"}, - {file = "orjson-3.9.5-cp310-none-win32.whl", hash = "sha256:5793a21a21bf34e1767e3d61a778a25feea8476dcc0bdf0ae1bc506dc34561ea"}, - {file = "orjson-3.9.5-cp310-none-win_amd64.whl", hash = "sha256:2bcec0b1024d0031ab3eab7a8cb260c8a4e4a5e35993878a2da639d69cdf6a65"}, - {file = "orjson-3.9.5-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:8547b95ca0e2abd17e1471973e6d676f1d8acedd5f8fb4f739e0612651602d66"}, - {file = "orjson-3.9.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:87ce174d6a38d12b3327f76145acbd26f7bc808b2b458f61e94d83cd0ebb4d76"}, - {file = "orjson-3.9.5-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:a960bb1bc9a964d16fcc2d4af5a04ce5e4dfddca84e3060c35720d0a062064fe"}, - {file = "orjson-3.9.5-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1a7aa5573a949760d6161d826d34dc36db6011926f836851fe9ccb55b5a7d8e8"}, - {file = "orjson-3.9.5-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8b2852afca17d7eea85f8e200d324e38c851c96598ac7b227e4f6c4e59fbd3df"}, - {file = "orjson-3.9.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aa185959c082475288da90f996a82e05e0c437216b96f2a8111caeb1d54ef926"}, - {file = "orjson-3.9.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:89c9332695b838438ea4b9a482bce8ffbfddde4df92750522d928fb00b7b8dce"}, - {file = "orjson-3.9.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:2493f1351a8f0611bc26e2d3d407efb873032b4f6b8926fed8cfed39210ca4ba"}, - {file = "orjson-3.9.5-cp311-none-win32.whl", hash = "sha256:ffc544e0e24e9ae69301b9a79df87a971fa5d1c20a6b18dca885699709d01be0"}, - {file = "orjson-3.9.5-cp311-none-win_amd64.whl", hash = "sha256:89670fe2732e3c0c54406f77cad1765c4c582f67b915c74fda742286809a0cdc"}, - {file = "orjson-3.9.5-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:15df211469625fa27eced4aa08dc03e35f99c57d45a33855cc35f218ea4071b8"}, - {file = "orjson-3.9.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d9f17c59fe6c02bc5f89ad29edb0253d3059fe8ba64806d789af89a45c35269a"}, - {file = "orjson-3.9.5-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ca6b96659c7690773d8cebb6115c631f4a259a611788463e9c41e74fa53bf33f"}, - {file = "orjson-3.9.5-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a26fafe966e9195b149950334bdbe9026eca17fe8ffe2d8fa87fdc30ca925d30"}, - {file = "orjson-3.9.5-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9006b1eb645ecf460da067e2dd17768ccbb8f39b01815a571bfcfab7e8da5e52"}, - {file = "orjson-3.9.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ebfdbf695734b1785e792a1315e41835ddf2a3e907ca0e1c87a53f23006ce01d"}, - {file = "orjson-3.9.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:4a3943234342ab37d9ed78fb0a8f81cd4b9532f67bf2ac0d3aa45fa3f0a339f3"}, - {file = "orjson-3.9.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:e6762755470b5c82f07b96b934af32e4d77395a11768b964aaa5eb092817bc31"}, - {file = "orjson-3.9.5-cp312-none-win_amd64.whl", hash = "sha256:c74df28749c076fd6e2157190df23d43d42b2c83e09d79b51694ee7315374ad5"}, - {file = "orjson-3.9.5-cp37-cp37m-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:88e18a74d916b74f00d0978d84e365c6bf0e7ab846792efa15756b5fb2f7d49d"}, - {file = "orjson-3.9.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d28514b5b6dfaf69097be70d0cf4f1407ec29d0f93e0b4131bf9cc8fd3f3e374"}, - {file = "orjson-3.9.5-cp37-cp37m-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:25b81aca8c7be61e2566246b6a0ca49f8aece70dd3f38c7f5c837f398c4cb142"}, - {file = "orjson-3.9.5-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:385c1c713b1e47fd92e96cf55fd88650ac6dfa0b997e8aa7ecffd8b5865078b1"}, - {file = "orjson-3.9.5-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f9850c03a8e42fba1a508466e6a0f99472fd2b4a5f30235ea49b2a1b32c04c11"}, - {file = "orjson-3.9.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4449f84bbb13bcef493d8aa669feadfced0f7c5eea2d0d88b5cc21f812183af8"}, - {file = "orjson-3.9.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:86127bf194f3b873135e44ce5dc9212cb152b7e06798d5667a898a00f0519be4"}, - {file = "orjson-3.9.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:0abcd039f05ae9ab5b0ff11624d0b9e54376253b7d3217a358d09c3edf1d36f7"}, - {file = "orjson-3.9.5-cp37-none-win32.whl", hash = "sha256:10cc8ad5ff7188efcb4bec196009d61ce525a4e09488e6d5db41218c7fe4f001"}, - {file = "orjson-3.9.5-cp37-none-win_amd64.whl", hash = "sha256:ff27e98532cb87379d1a585837d59b187907228268e7b0a87abe122b2be6968e"}, - {file = "orjson-3.9.5-cp38-cp38-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:5bfa79916ef5fef75ad1f377e54a167f0de334c1fa4ebb8d0224075f3ec3d8c0"}, - {file = "orjson-3.9.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e87dfa6ac0dae764371ab19b35eaaa46dfcb6ef2545dfca03064f21f5d08239f"}, - {file = "orjson-3.9.5-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:50ced24a7b23058b469ecdb96e36607fc611cbaee38b58e62a55c80d1b3ad4e1"}, - {file = "orjson-3.9.5-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b1b74ea2a3064e1375da87788897935832e806cc784de3e789fd3c4ab8eb3fa5"}, - {file = "orjson-3.9.5-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a7cb961efe013606913d05609f014ad43edfaced82a576e8b520a5574ce3b2b9"}, - {file = "orjson-3.9.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1225d2d5ee76a786bda02f8c5e15017462f8432bb960de13d7c2619dba6f0275"}, - {file = "orjson-3.9.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:f39f4b99199df05c7ecdd006086259ed25886cdbd7b14c8cdb10c7675cfcca7d"}, - {file = "orjson-3.9.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:a461dc9fb60cac44f2d3218c36a0c1c01132314839a0e229d7fb1bba69b810d8"}, - {file = "orjson-3.9.5-cp38-none-win32.whl", hash = "sha256:dedf1a6173748202df223aea29de814b5836732a176b33501375c66f6ab7d822"}, - {file = "orjson-3.9.5-cp38-none-win_amd64.whl", hash = "sha256:fa504082f53efcbacb9087cc8676c163237beb6e999d43e72acb4bb6f0db11e6"}, - {file = "orjson-3.9.5-cp39-cp39-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:6900f0248edc1bec2a2a3095a78a7e3ef4e63f60f8ddc583687eed162eedfd69"}, - {file = "orjson-3.9.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:17404333c40047888ac40bd8c4d49752a787e0a946e728a4e5723f111b6e55a5"}, - {file = "orjson-3.9.5-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0eefb7cfdd9c2bc65f19f974a5d1dfecbac711dae91ed635820c6b12da7a3c11"}, - {file = "orjson-3.9.5-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:68c78b2a3718892dc018adbc62e8bab6ef3c0d811816d21e6973dee0ca30c152"}, - {file = "orjson-3.9.5-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:591ad7d9e4a9f9b104486ad5d88658c79ba29b66c5557ef9edf8ca877a3f8d11"}, - {file = "orjson-3.9.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6cc2cbf302fbb2d0b2c3c142a663d028873232a434d89ce1b2604ebe5cc93ce8"}, - {file = "orjson-3.9.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b26b5aa5e9ee1bad2795b925b3adb1b1b34122cb977f30d89e0a1b3f24d18450"}, - {file = "orjson-3.9.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ef84724f7d29dcfe3aafb1fc5fc7788dca63e8ae626bb9298022866146091a3e"}, - {file = "orjson-3.9.5-cp39-none-win32.whl", hash = "sha256:664cff27f85939059472afd39acff152fbac9a091b7137092cb651cf5f7747b5"}, - {file = "orjson-3.9.5-cp39-none-win_amd64.whl", hash = "sha256:91dda66755795ac6100e303e206b636568d42ac83c156547634256a2e68de694"}, - {file = "orjson-3.9.5.tar.gz", hash = "sha256:6daf5ee0b3cf530b9978cdbf71024f1c16ed4a67d05f6ec435c6e7fe7a52724c"}, + {file = "orjson-3.9.7-cp310-cp310-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:b6df858e37c321cefbf27fe7ece30a950bcc3a75618a804a0dcef7ed9dd9c92d"}, + {file = "orjson-3.9.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5198633137780d78b86bb54dafaaa9baea698b4f059456cd4554ab7009619221"}, + {file = "orjson-3.9.7-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5e736815b30f7e3c9044ec06a98ee59e217a833227e10eb157f44071faddd7c5"}, + {file = "orjson-3.9.7-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a19e4074bc98793458b4b3ba35a9a1d132179345e60e152a1bb48c538ab863c4"}, + {file = "orjson-3.9.7-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:80acafe396ab689a326ab0d80f8cc61dec0dd2c5dca5b4b3825e7b1e0132c101"}, + {file = "orjson-3.9.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:355efdbbf0cecc3bd9b12589b8f8e9f03c813a115efa53f8dc2a523bfdb01334"}, + {file = "orjson-3.9.7-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:3aab72d2cef7f1dd6104c89b0b4d6b416b0db5ca87cc2fac5f79c5601f549cc2"}, + {file = "orjson-3.9.7-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:36b1df2e4095368ee388190687cb1b8557c67bc38400a942a1a77713580b50ae"}, + {file = "orjson-3.9.7-cp310-none-win32.whl", hash = "sha256:e94b7b31aa0d65f5b7c72dd8f8227dbd3e30354b99e7a9af096d967a77f2a580"}, + {file = "orjson-3.9.7-cp310-none-win_amd64.whl", hash = "sha256:82720ab0cf5bb436bbd97a319ac529aee06077ff7e61cab57cee04a596c4f9b4"}, + {file = "orjson-3.9.7-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:1f8b47650f90e298b78ecf4df003f66f54acdba6a0f763cc4df1eab048fe3738"}, + {file = "orjson-3.9.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f738fee63eb263530efd4d2e9c76316c1f47b3bbf38c1bf45ae9625feed0395e"}, + {file = "orjson-3.9.7-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:38e34c3a21ed41a7dbd5349e24c3725be5416641fdeedf8f56fcbab6d981c900"}, + {file = "orjson-3.9.7-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:21a3344163be3b2c7e22cef14fa5abe957a892b2ea0525ee86ad8186921b6cf0"}, + {file = "orjson-3.9.7-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:23be6b22aab83f440b62a6f5975bcabeecb672bc627face6a83bc7aeb495dc7e"}, + {file = "orjson-3.9.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e5205ec0dfab1887dd383597012199f5175035e782cdb013c542187d280ca443"}, + {file = "orjson-3.9.7-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:8769806ea0b45d7bf75cad253fba9ac6700b7050ebb19337ff6b4e9060f963fa"}, + {file = "orjson-3.9.7-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:f9e01239abea2f52a429fe9d95c96df95f078f0172489d691b4a848ace54a476"}, + {file = "orjson-3.9.7-cp311-none-win32.whl", hash = "sha256:8bdb6c911dae5fbf110fe4f5cba578437526334df381b3554b6ab7f626e5eeca"}, + {file = "orjson-3.9.7-cp311-none-win_amd64.whl", hash = "sha256:9d62c583b5110e6a5cf5169ab616aa4ec71f2c0c30f833306f9e378cf51b6c86"}, + {file = "orjson-3.9.7-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:1c3cee5c23979deb8d1b82dc4cc49be59cccc0547999dbe9adb434bb7af11cf7"}, + {file = "orjson-3.9.7-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a347d7b43cb609e780ff8d7b3107d4bcb5b6fd09c2702aa7bdf52f15ed09fa09"}, + {file = "orjson-3.9.7-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:154fd67216c2ca38a2edb4089584504fbb6c0694b518b9020ad35ecc97252bb9"}, + {file = "orjson-3.9.7-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7ea3e63e61b4b0beeb08508458bdff2daca7a321468d3c4b320a758a2f554d31"}, + {file = "orjson-3.9.7-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1eb0b0b2476f357eb2975ff040ef23978137aa674cd86204cfd15d2d17318588"}, + {file = "orjson-3.9.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:70b9a20a03576c6b7022926f614ac5a6b0914486825eac89196adf3267c6489d"}, + {file = "orjson-3.9.7-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:915e22c93e7b7b636240c5a79da5f6e4e84988d699656c8e27f2ac4c95b8dcc0"}, + {file = "orjson-3.9.7-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:f26fb3e8e3e2ee405c947ff44a3e384e8fa1843bc35830fe6f3d9a95a1147b6e"}, + {file = "orjson-3.9.7-cp312-none-win_amd64.whl", hash = "sha256:d8692948cada6ee21f33db5e23460f71c8010d6dfcfe293c9b96737600a7df78"}, + {file = "orjson-3.9.7-cp37-cp37m-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:7bab596678d29ad969a524823c4e828929a90c09e91cc438e0ad79b37ce41166"}, + {file = "orjson-3.9.7-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:63ef3d371ea0b7239ace284cab9cd00d9c92b73119a7c274b437adb09bda35e6"}, + {file = "orjson-3.9.7-cp37-cp37m-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:2f8fcf696bbbc584c0c7ed4adb92fd2ad7d153a50258842787bc1524e50d7081"}, + {file = "orjson-3.9.7-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:90fe73a1f0321265126cbba13677dcceb367d926c7a65807bd80916af4c17047"}, + {file = "orjson-3.9.7-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:45a47f41b6c3beeb31ac5cf0ff7524987cfcce0a10c43156eb3ee8d92d92bf22"}, + {file = "orjson-3.9.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5a2937f528c84e64be20cb80e70cea76a6dfb74b628a04dab130679d4454395c"}, + {file = "orjson-3.9.7-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:b4fb306c96e04c5863d52ba8d65137917a3d999059c11e659eba7b75a69167bd"}, + {file = "orjson-3.9.7-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:410aa9d34ad1089898f3db461b7b744d0efcf9252a9415bbdf23540d4f67589f"}, + {file = "orjson-3.9.7-cp37-none-win32.whl", hash = "sha256:26ffb398de58247ff7bde895fe30817a036f967b0ad0e1cf2b54bda5f8dcfdd9"}, + {file = "orjson-3.9.7-cp37-none-win_amd64.whl", hash = "sha256:bcb9a60ed2101af2af450318cd89c6b8313e9f8df4e8fb12b657b2e97227cf08"}, + {file = "orjson-3.9.7-cp38-cp38-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:5da9032dac184b2ae2da4bce423edff7db34bfd936ebd7d4207ea45840f03905"}, + {file = "orjson-3.9.7-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7951af8f2998045c656ba8062e8edf5e83fd82b912534ab1de1345de08a41d2b"}, + {file = "orjson-3.9.7-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:b8e59650292aa3a8ea78073fc84184538783966528e442a1b9ed653aa282edcf"}, + {file = "orjson-3.9.7-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9274ba499e7dfb8a651ee876d80386b481336d3868cba29af839370514e4dce0"}, + {file = "orjson-3.9.7-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ca1706e8b8b565e934c142db6a9592e6401dc430e4b067a97781a997070c5378"}, + {file = "orjson-3.9.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:83cc275cf6dcb1a248e1876cdefd3f9b5f01063854acdfd687ec360cd3c9712a"}, + {file = "orjson-3.9.7-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:11c10f31f2c2056585f89d8229a56013bc2fe5de51e095ebc71868d070a8dd81"}, + {file = "orjson-3.9.7-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:cf334ce1d2fadd1bf3e5e9bf15e58e0c42b26eb6590875ce65bd877d917a58aa"}, + {file = "orjson-3.9.7-cp38-none-win32.whl", hash = "sha256:76a0fc023910d8a8ab64daed8d31d608446d2d77c6474b616b34537aa7b79c7f"}, + {file = "orjson-3.9.7-cp38-none-win_amd64.whl", hash = "sha256:7a34a199d89d82d1897fd4a47820eb50947eec9cda5fd73f4578ff692a912f89"}, + {file = "orjson-3.9.7-cp39-cp39-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:e7e7f44e091b93eb39db88bb0cb765db09b7a7f64aea2f35e7d86cbf47046c65"}, + {file = "orjson-3.9.7-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:01d647b2a9c45a23a84c3e70e19d120011cba5f56131d185c1b78685457320bb"}, + {file = "orjson-3.9.7-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0eb850a87e900a9c484150c414e21af53a6125a13f6e378cf4cc11ae86c8f9c5"}, + {file = "orjson-3.9.7-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8f4b0042d8388ac85b8330b65406c84c3229420a05068445c13ca28cc222f1f7"}, + {file = "orjson-3.9.7-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cd3e7aae977c723cc1dbb82f97babdb5e5fbce109630fbabb2ea5053523c89d3"}, + {file = "orjson-3.9.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4c616b796358a70b1f675a24628e4823b67d9e376df2703e893da58247458956"}, + {file = "orjson-3.9.7-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:c3ba725cf5cf87d2d2d988d39c6a2a8b6fc983d78ff71bc728b0be54c869c884"}, + {file = "orjson-3.9.7-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:4891d4c934f88b6c29b56395dfc7014ebf7e10b9e22ffd9877784e16c6b2064f"}, + {file = "orjson-3.9.7-cp39-none-win32.whl", hash = "sha256:14d3fb6cd1040a4a4a530b28e8085131ed94ebc90d72793c59a713de34b60838"}, + {file = "orjson-3.9.7-cp39-none-win_amd64.whl", hash = "sha256:9ef82157bbcecd75d6296d5d8b2d792242afcd064eb1ac573f8847b52e58f677"}, + {file = "orjson-3.9.7.tar.gz", hash = "sha256:85e39198f78e2f7e054d296395f6c96f5e02892337746ef5b6a1bf3ed5910142"}, ] [[package]] @@ -4767,8 +4873,8 @@ files = [ [package.dependencies] numpy = [ {version = ">=1.20.3", markers = "python_version < \"3.10\""}, - {version = ">=1.21.0", markers = "python_version >= \"3.10\""}, {version = ">=1.23.2", markers = "python_version >= \"3.11\""}, + {version = ">=1.21.0", markers = "python_version >= \"3.10\" and python_version < \"3.11\""}, ] python-dateutil = ">=2.8.1" pytz = ">=2020.1" @@ -5096,54 +5202,54 @@ virtualenv = ">=20.10.0" [[package]] name = "prefect" -version = "2.11.5" +version = "2.13.0" description = "Workflow orchestration and management." optional = false python-versions = ">=3.8" files = [ - {file = "prefect-2.11.5-py3-none-any.whl", hash = "sha256:a7f49155c9a8abd751faf5aa25b54d3e8b1da00adcbb384ab17988c35f8020ec"}, - {file = "prefect-2.11.5.tar.gz", hash = "sha256:7dd2ca1d95d34dc50be4812821def5354a56af6274b23348953d3b1f4698497e"}, + {file = "prefect-2.13.0-py3-none-any.whl", hash = "sha256:6a7e03cb3f267c54d2ce9c8f037e7932eb46d6b9b465a20005092a614a428bce"}, + {file = "prefect-2.13.0.tar.gz", hash = "sha256:04dae0c393d44078c48a6c3816b1877a6eb6f9cc41ad6215a86dcdfd7ffaf02f"}, ] [package.dependencies] aiosqlite = ">=0.17.0" -alembic = ">=1.7.5" -anyio = ">=3.4.0" -apprise = ">=1.1.0" -asgi-lifespan = ">=1.0" +alembic = ">=1.7.5,<2.0.0" +anyio = ">=3.4.0,<4.0.0" +apprise = ">=1.1.0,<2.0.0" +asgi-lifespan = ">=1.0,<3.0" asyncpg = ">=0.23" click = ">=8.0,<8.2" -cloudpickle = ">=2.0" -coolname = ">=1.0.4" -croniter = ">=1.0.12" +cloudpickle = ">=2.0,<3.0" +coolname = ">=1.0.4,<3.0.0" +croniter = ">=1.0.12,<2.0.0" cryptography = ">=36.0.1" -dateparser = ">=1.1.1" -docker = ">=4.0" +dateparser = ">=1.1.1,<2.0.0" +docker = ">=4.0,<7.0" fastapi = ">=0.93" fsspec = ">=2022.5.0" graphviz = ">=0.20.1" griffe = ">=0.20.0" httpx = {version = ">=0.23,<0.23.2 || >0.23.2", extras = ["http2"]} importlib-metadata = {version = ">=4.4", markers = "python_version < \"3.10\""} -jinja2 = ">=3.0.0" -jsonpatch = ">=1.32" +jinja2 = ">=3.0.0,<4.0.0" +jsonpatch = ">=1.32,<2.0" jsonschema = ">=3.2.0,<5.0.0" -kubernetes = ">=24.2.0" -orjson = ">=3.7" -packaging = ">=21.3" +kubernetes = ">=24.2.0,<28.0.0" +orjson = ">=3.7,<4.0" +packaging = ">=21.3,<24.3" pathspec = ">=0.8.0" -pendulum = ">=2.1.2" +pendulum = ">=2.1.2,<4.0.0" pydantic = ">=1.10.0,<2.0.0" -python-slugify = ">=5.0" -pytz = ">=2021.1" -pyyaml = ">=5.4.1" -readchar = ">=4.0.0" -rich = ">=11.0" +python-slugify = ">=5.0,<9.0" +pytz = ">=2021.1,<2024" +pyyaml = ">=5.4.1,<7.0.0" +readchar = ">=4.0.0,<5.0.0" +rich = ">=11.0,<14.0" ruamel-yaml = ">=0.17.0" -sqlalchemy = {version = ">=1.4.22,<1.4.33 || >1.4.33", extras = ["asyncio"]} +sqlalchemy = {version = ">=1.4.22,<1.4.33 || >1.4.33,<3.0.0", extras = ["asyncio"]} toml = ">=0.10.0" typer = ">=0.4.2" -typing-extensions = ">=4.1.0" +typing-extensions = ">=4.1.0,<5.0.0" uvicorn = ">=0.14.0" websockets = ">=10.4" @@ -5236,24 +5342,24 @@ wcwidth = "*" [[package]] name = "protobuf" -version = "4.24.2" +version = "4.24.3" description = "" optional = false python-versions = ">=3.7" files = [ - {file = "protobuf-4.24.2-cp310-abi3-win32.whl", hash = "sha256:58e12d2c1aa428ece2281cef09bbaa6938b083bcda606db3da4e02e991a0d924"}, - {file = "protobuf-4.24.2-cp310-abi3-win_amd64.whl", hash = "sha256:77700b55ba41144fc64828e02afb41901b42497b8217b558e4a001f18a85f2e3"}, - {file = "protobuf-4.24.2-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:237b9a50bd3b7307d0d834c1b0eb1a6cd47d3f4c2da840802cd03ea288ae8880"}, - {file = "protobuf-4.24.2-cp37-abi3-manylinux2014_aarch64.whl", hash = "sha256:25ae91d21e3ce8d874211110c2f7edd6384816fb44e06b2867afe35139e1fd1c"}, - {file = "protobuf-4.24.2-cp37-abi3-manylinux2014_x86_64.whl", hash = "sha256:c00c3c7eb9ad3833806e21e86dca448f46035242a680f81c3fe068ff65e79c74"}, - {file = "protobuf-4.24.2-cp37-cp37m-win32.whl", hash = "sha256:4e69965e7e54de4db989289a9b971a099e626f6167a9351e9d112221fc691bc1"}, - {file = "protobuf-4.24.2-cp37-cp37m-win_amd64.whl", hash = "sha256:c5cdd486af081bf752225b26809d2d0a85e575b80a84cde5172a05bbb1990099"}, - {file = "protobuf-4.24.2-cp38-cp38-win32.whl", hash = "sha256:6bd26c1fa9038b26c5c044ee77e0ecb18463e957fefbaeb81a3feb419313a54e"}, - {file = "protobuf-4.24.2-cp38-cp38-win_amd64.whl", hash = "sha256:bb7aa97c252279da65584af0456f802bd4b2de429eb945bbc9b3d61a42a8cd16"}, - {file = "protobuf-4.24.2-cp39-cp39-win32.whl", hash = "sha256:2b23bd6e06445699b12f525f3e92a916f2dcf45ffba441026357dea7fa46f42b"}, - {file = "protobuf-4.24.2-cp39-cp39-win_amd64.whl", hash = "sha256:839952e759fc40b5d46be319a265cf94920174d88de31657d5622b5d8d6be5cd"}, - {file = "protobuf-4.24.2-py3-none-any.whl", hash = "sha256:3b7b170d3491ceed33f723bbf2d5a260f8a4e23843799a3906f16ef736ef251e"}, - {file = "protobuf-4.24.2.tar.gz", hash = "sha256:7fda70797ddec31ddfa3576cbdcc3ddbb6b3078b737a1a87ab9136af0570cd6e"}, + {file = "protobuf-4.24.3-cp310-abi3-win32.whl", hash = "sha256:20651f11b6adc70c0f29efbe8f4a94a74caf61b6200472a9aea6e19898f9fcf4"}, + {file = "protobuf-4.24.3-cp310-abi3-win_amd64.whl", hash = "sha256:3d42e9e4796a811478c783ef63dc85b5a104b44aaaca85d4864d5b886e4b05e3"}, + {file = "protobuf-4.24.3-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:6e514e8af0045be2b56e56ae1bb14f43ce7ffa0f68b1c793670ccbe2c4fc7d2b"}, + {file = "protobuf-4.24.3-cp37-abi3-manylinux2014_aarch64.whl", hash = "sha256:ba53c2f04798a326774f0e53b9c759eaef4f6a568ea7072ec6629851c8435959"}, + {file = "protobuf-4.24.3-cp37-abi3-manylinux2014_x86_64.whl", hash = "sha256:f6ccbcf027761a2978c1406070c3788f6de4a4b2cc20800cc03d52df716ad675"}, + {file = "protobuf-4.24.3-cp37-cp37m-win32.whl", hash = "sha256:1b182c7181a2891e8f7f3a1b5242e4ec54d1f42582485a896e4de81aa17540c2"}, + {file = "protobuf-4.24.3-cp37-cp37m-win_amd64.whl", hash = "sha256:b0271a701e6782880d65a308ba42bc43874dabd1a0a0f41f72d2dac3b57f8e76"}, + {file = "protobuf-4.24.3-cp38-cp38-win32.whl", hash = "sha256:e29d79c913f17a60cf17c626f1041e5288e9885c8579832580209de8b75f2a52"}, + {file = "protobuf-4.24.3-cp38-cp38-win_amd64.whl", hash = "sha256:067f750169bc644da2e1ef18c785e85071b7c296f14ac53e0900e605da588719"}, + {file = "protobuf-4.24.3-cp39-cp39-win32.whl", hash = "sha256:2da777d34b4f4f7613cdf85c70eb9a90b1fbef9d36ae4a0ccfe014b0b07906f1"}, + {file = "protobuf-4.24.3-cp39-cp39-win_amd64.whl", hash = "sha256:f631bb982c5478e0c1c70eab383af74a84be66945ebf5dd6b06fc90079668d0b"}, + {file = "protobuf-4.24.3-py3-none-any.whl", hash = "sha256:f6f8dc65625dadaad0c8545319c2e2f0424fede988368893ca3844261342c11a"}, + {file = "protobuf-4.24.3.tar.gz", hash = "sha256:12e9ad2ec079b833176d2921be2cb24281fa591f0b119b208b788adc48c2561d"}, ] [[package]] @@ -5327,6 +5433,17 @@ files = [ [package.extras] tests = ["pytest"] +[[package]] +name = "py" +version = "1.11.0" +description = "library with cross-python path, ini-parsing, io, code, log facilities" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +files = [ + {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, + {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, +] + [[package]] name = "pyarrow" version = "11.0.0" @@ -5410,13 +5527,13 @@ test = ["pytest"] [[package]] name = "pycodestyle" -version = "2.9.1" +version = "2.11.0" description = "Python style guide checker" optional = false -python-versions = ">=3.6" +python-versions = ">=3.8" files = [ - {file = "pycodestyle-2.9.1-py2.py3-none-any.whl", hash = "sha256:d1735fc58b418fd7c5f658d28d943854f8a849b01a5d0a1e6f3f3fdd0166804b"}, - {file = "pycodestyle-2.9.1.tar.gz", hash = "sha256:2c9607871d58c76354b697b42f5d57e1ada7d261c261efac224b664affdc5785"}, + {file = "pycodestyle-2.11.0-py2.py3-none-any.whl", hash = "sha256:5d1013ba8dc7895b548be5afb05740ca82454fd899971563d2ef625d090326f8"}, + {file = "pycodestyle-2.11.0.tar.gz", hash = "sha256:259bcc17857d8a8b3b4a2327324b79e5f020a13c16074670f9c8c8f872ea76d0"}, ] [[package]] @@ -5484,13 +5601,13 @@ email = ["email-validator (>=1.0.3)"] [[package]] name = "pyflakes" -version = "2.5.0" +version = "3.1.0" description = "passive checker of Python programs" optional = false -python-versions = ">=3.6" +python-versions = ">=3.8" files = [ - {file = "pyflakes-2.5.0-py2.py3-none-any.whl", hash = "sha256:4579f67d887f804e67edb544428f264b7b24f435b263c4614f384135cea553d2"}, - {file = "pyflakes-2.5.0.tar.gz", hash = "sha256:491feb020dca48ccc562a8c0cbe8df07ee13078df59813b83959cbdada312ea3"}, + {file = "pyflakes-3.1.0-py2.py3-none-any.whl", hash = "sha256:4132f6d49cb4dae6819e5379898f2b8cce3c5f23994194c24b77d5da2e36f774"}, + {file = "pyflakes-3.1.0.tar.gz", hash = "sha256:a0aae034c444db0071aa077972ba4768d40c830d9539fd45bf4cd3f8f6992efc"}, ] [[package]] @@ -5525,43 +5642,57 @@ docs = ["sphinx (>=4.5.0,<5.0.0)", "sphinx-rtd-theme", "zope.interface"] tests = ["coverage[toml] (==5.0.4)", "pytest (>=6.0.0,<7.0.0)"] [[package]] -name = "pyparsing" -version = "3.0.9" -description = "pyparsing module - Classes and methods to define and execute parsing grammars" +name = "pylint" +version = "2.17.5" +description = "python code static checker" optional = false -python-versions = ">=3.6.8" +python-versions = ">=3.7.2" files = [ - {file = "pyparsing-3.0.9-py3-none-any.whl", hash = "sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc"}, - {file = "pyparsing-3.0.9.tar.gz", hash = "sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb"}, + {file = "pylint-2.17.5-py3-none-any.whl", hash = "sha256:73995fb8216d3bed149c8d51bba25b2c52a8251a2c8ac846ec668ce38fab5413"}, + {file = "pylint-2.17.5.tar.gz", hash = "sha256:f7b601cbc06fef7e62a754e2b41294c2aa31f1cb659624b9a85bcba29eaf8252"}, ] +[package.dependencies] +astroid = ">=2.15.6,<=2.17.0-dev0" +colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} +dill = [ + {version = ">=0.2", markers = "python_version < \"3.11\""}, + {version = ">=0.3.6", markers = "python_version >= \"3.11\""}, +] +isort = ">=4.2.5,<6" +mccabe = ">=0.6,<0.8" +platformdirs = ">=2.2.0" +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} +tomlkit = ">=0.10.1" +typing-extensions = {version = ">=3.10.0", markers = "python_version < \"3.10\""} + [package.extras] -diagrams = ["jinja2", "railroad-diagrams"] +spelling = ["pyenchant (>=3.2,<4.0)"] +testutils = ["gitpython (>3)"] [[package]] -name = "pyproject-flake8" -version = "5.0.4.post1" -description = "pyproject-flake8 (`pflake8`), a monkey patching wrapper to connect flake8 with pyproject.toml configuration" +name = "pyparsing" +version = "3.1.1" +description = "pyparsing module - Classes and methods to define and execute parsing grammars" optional = false -python-versions = "*" +python-versions = ">=3.6.8" files = [ - {file = "pyproject-flake8-5.0.4.post1.tar.gz", hash = "sha256:c2dfdf1064f47efbb2e4faf1a32b0b6a6ea67dc4d1debb98d862b0cdee377941"}, - {file = "pyproject_flake8-5.0.4.post1-py2.py3-none-any.whl", hash = "sha256:457e52dde1b7a1f84b5230c70d61afa58ced64a44b81a609f19e972319fa68ed"}, + {file = "pyparsing-3.1.1-py3-none-any.whl", hash = "sha256:32c7c0b711493c72ff18a981d24f28aaf9c1fb7ed5e9667c9e84e3db623bdbfb"}, + {file = "pyparsing-3.1.1.tar.gz", hash = "sha256:ede28a1a32462f5a9705e07aea48001a08f7cf81a021585011deba701581a0db"}, ] -[package.dependencies] -flake8 = "5.0.4" -tomli = {version = "*", markers = "python_version < \"3.11\""} +[package.extras] +diagrams = ["jinja2", "railroad-diagrams"] [[package]] name = "pytest" -version = "7.4.1" +version = "7.4.2" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.7" files = [ - {file = "pytest-7.4.1-py3-none-any.whl", hash = "sha256:460c9a59b14e27c602eb5ece2e47bec99dc5fc5f6513cf924a7d03a578991b1f"}, - {file = "pytest-7.4.1.tar.gz", hash = "sha256:2f2301e797521b23e4d2585a0a3d7b5e50fdddaaf7e7d6773ea26ddb17c213ab"}, + {file = "pytest-7.4.2-py3-none-any.whl", hash = "sha256:1d881c6124e08ff0a1bb75ba3ec0bfd8b5354a01c194ddd5a0a870a48d99b002"}, + {file = "pytest-7.4.2.tar.gz", hash = "sha256:a766259cfab564a2ad52cb1aae1b881a75c3eb7e34ca3779697c23ed47c47069"}, ] [package.dependencies] @@ -5657,6 +5788,20 @@ files = [ {file = "pytzdata-2020.1.tar.gz", hash = "sha256:3efa13b335a00a8de1d345ae41ec78dd11c9f8807f522d39850f2dd828681540"}, ] +[[package]] +name = "pyupgrade" +version = "3.10.1" +description = "A tool to automatically upgrade syntax for newer versions." +optional = false +python-versions = ">=3.8.1" +files = [ + {file = "pyupgrade-3.10.1-py2.py3-none-any.whl", hash = "sha256:f565b4d26daa46ed522e98746834e77e444269103f8bc04413d77dad95169a24"}, + {file = "pyupgrade-3.10.1.tar.gz", hash = "sha256:1d8d138c2ccdd3c42b1419230ae036d5607dc69465a26feacc069642fc8d1b90"}, +] + +[package.dependencies] +tokenize-rt = ">=5.2.0" + [[package]] name = "pywavelets" version = "1.4.1" @@ -5782,108 +5927,90 @@ files = [ [[package]] name = "pyzmq" -version = "25.1.1" +version = "24.0.1" description = "Python bindings for 0MQ" optional = false python-versions = ">=3.6" files = [ - {file = "pyzmq-25.1.1-cp310-cp310-macosx_10_15_universal2.whl", hash = "sha256:381469297409c5adf9a0e884c5eb5186ed33137badcbbb0560b86e910a2f1e76"}, - {file = "pyzmq-25.1.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:955215ed0604dac5b01907424dfa28b40f2b2292d6493445dd34d0dfa72586a8"}, - {file = "pyzmq-25.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:985bbb1316192b98f32e25e7b9958088431d853ac63aca1d2c236f40afb17c83"}, - {file = "pyzmq-25.1.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:afea96f64efa98df4da6958bae37f1cbea7932c35878b185e5982821bc883369"}, - {file = "pyzmq-25.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:76705c9325d72a81155bb6ab48d4312e0032bf045fb0754889133200f7a0d849"}, - {file = "pyzmq-25.1.1-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:77a41c26205d2353a4c94d02be51d6cbdf63c06fbc1295ea57dad7e2d3381b71"}, - {file = "pyzmq-25.1.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:12720a53e61c3b99d87262294e2b375c915fea93c31fc2336898c26d7aed34cd"}, - {file = "pyzmq-25.1.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:57459b68e5cd85b0be8184382cefd91959cafe79ae019e6b1ae6e2ba8a12cda7"}, - {file = "pyzmq-25.1.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:292fe3fc5ad4a75bc8df0dfaee7d0babe8b1f4ceb596437213821f761b4589f9"}, - {file = "pyzmq-25.1.1-cp310-cp310-win32.whl", hash = "sha256:35b5ab8c28978fbbb86ea54958cd89f5176ce747c1fb3d87356cf698048a7790"}, - {file = "pyzmq-25.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:11baebdd5fc5b475d484195e49bae2dc64b94a5208f7c89954e9e354fc609d8f"}, - {file = "pyzmq-25.1.1-cp311-cp311-macosx_10_15_universal2.whl", hash = "sha256:d20a0ddb3e989e8807d83225a27e5c2eb2260eaa851532086e9e0fa0d5287d83"}, - {file = "pyzmq-25.1.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:e1c1be77bc5fb77d923850f82e55a928f8638f64a61f00ff18a67c7404faf008"}, - {file = "pyzmq-25.1.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d89528b4943d27029a2818f847c10c2cecc79fa9590f3cb1860459a5be7933eb"}, - {file = "pyzmq-25.1.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:90f26dc6d5f241ba358bef79be9ce06de58d477ca8485e3291675436d3827cf8"}, - {file = "pyzmq-25.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c2b92812bd214018e50b6380ea3ac0c8bb01ac07fcc14c5f86a5bb25e74026e9"}, - {file = "pyzmq-25.1.1-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:2f957ce63d13c28730f7fd6b72333814221c84ca2421298f66e5143f81c9f91f"}, - {file = "pyzmq-25.1.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:047a640f5c9c6ade7b1cc6680a0e28c9dd5a0825135acbd3569cc96ea00b2505"}, - {file = "pyzmq-25.1.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:7f7e58effd14b641c5e4dec8c7dab02fb67a13df90329e61c869b9cc607ef752"}, - {file = "pyzmq-25.1.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c2910967e6ab16bf6fbeb1f771c89a7050947221ae12a5b0b60f3bca2ee19bca"}, - {file = "pyzmq-25.1.1-cp311-cp311-win32.whl", hash = "sha256:76c1c8efb3ca3a1818b837aea423ff8a07bbf7aafe9f2f6582b61a0458b1a329"}, - {file = "pyzmq-25.1.1-cp311-cp311-win_amd64.whl", hash = "sha256:44e58a0554b21fc662f2712814a746635ed668d0fbc98b7cb9d74cb798d202e6"}, - {file = "pyzmq-25.1.1-cp312-cp312-macosx_10_15_universal2.whl", hash = "sha256:e1ffa1c924e8c72778b9ccd386a7067cddf626884fd8277f503c48bb5f51c762"}, - {file = "pyzmq-25.1.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:1af379b33ef33757224da93e9da62e6471cf4a66d10078cf32bae8127d3d0d4a"}, - {file = "pyzmq-25.1.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cff084c6933680d1f8b2f3b4ff5bbb88538a4aac00d199ac13f49d0698727ecb"}, - {file = "pyzmq-25.1.1-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e2400a94f7dd9cb20cd012951a0cbf8249e3d554c63a9c0cdfd5cbb6c01d2dec"}, - {file = "pyzmq-25.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2d81f1ddae3858b8299d1da72dd7d19dd36aab654c19671aa8a7e7fb02f6638a"}, - {file = "pyzmq-25.1.1-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:255ca2b219f9e5a3a9ef3081512e1358bd4760ce77828e1028b818ff5610b87b"}, - {file = "pyzmq-25.1.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:a882ac0a351288dd18ecae3326b8a49d10c61a68b01419f3a0b9a306190baf69"}, - {file = "pyzmq-25.1.1-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:724c292bb26365659fc434e9567b3f1adbdb5e8d640c936ed901f49e03e5d32e"}, - {file = "pyzmq-25.1.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4ca1ed0bb2d850aa8471387882247c68f1e62a4af0ce9c8a1dbe0d2bf69e41fb"}, - {file = "pyzmq-25.1.1-cp312-cp312-win32.whl", hash = "sha256:b3451108ab861040754fa5208bca4a5496c65875710f76789a9ad27c801a0075"}, - {file = "pyzmq-25.1.1-cp312-cp312-win_amd64.whl", hash = "sha256:eadbefd5e92ef8a345f0525b5cfd01cf4e4cc651a2cffb8f23c0dd184975d787"}, - {file = "pyzmq-25.1.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:db0b2af416ba735c6304c47f75d348f498b92952f5e3e8bff449336d2728795d"}, - {file = "pyzmq-25.1.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c7c133e93b405eb0d36fa430c94185bdd13c36204a8635470cccc200723c13bb"}, - {file = "pyzmq-25.1.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:273bc3959bcbff3f48606b28229b4721716598d76b5aaea2b4a9d0ab454ec062"}, - {file = "pyzmq-25.1.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:cbc8df5c6a88ba5ae385d8930da02201165408dde8d8322072e3e5ddd4f68e22"}, - {file = "pyzmq-25.1.1-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:18d43df3f2302d836f2a56f17e5663e398416e9dd74b205b179065e61f1a6edf"}, - {file = "pyzmq-25.1.1-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:73461eed88a88c866656e08f89299720a38cb4e9d34ae6bf5df6f71102570f2e"}, - {file = "pyzmq-25.1.1-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:34c850ce7976d19ebe7b9d4b9bb8c9dfc7aac336c0958e2651b88cbd46682123"}, - {file = "pyzmq-25.1.1-cp36-cp36m-win32.whl", hash = "sha256:d2045d6d9439a0078f2a34b57c7b18c4a6aef0bee37f22e4ec9f32456c852c71"}, - {file = "pyzmq-25.1.1-cp36-cp36m-win_amd64.whl", hash = "sha256:458dea649f2f02a0b244ae6aef8dc29325a2810aa26b07af8374dc2a9faf57e3"}, - {file = "pyzmq-25.1.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:7cff25c5b315e63b07a36f0c2bab32c58eafbe57d0dce61b614ef4c76058c115"}, - {file = "pyzmq-25.1.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b1579413ae492b05de5a6174574f8c44c2b9b122a42015c5292afa4be2507f28"}, - {file = "pyzmq-25.1.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:3d0a409d3b28607cc427aa5c30a6f1e4452cc44e311f843e05edb28ab5e36da0"}, - {file = "pyzmq-25.1.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:21eb4e609a154a57c520e3d5bfa0d97e49b6872ea057b7c85257b11e78068222"}, - {file = "pyzmq-25.1.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:034239843541ef7a1aee0c7b2cb7f6aafffb005ede965ae9cbd49d5ff4ff73cf"}, - {file = "pyzmq-25.1.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:f8115e303280ba09f3898194791a153862cbf9eef722ad8f7f741987ee2a97c7"}, - {file = "pyzmq-25.1.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:1a5d26fe8f32f137e784f768143728438877d69a586ddeaad898558dc971a5ae"}, - {file = "pyzmq-25.1.1-cp37-cp37m-win32.whl", hash = "sha256:f32260e556a983bc5c7ed588d04c942c9a8f9c2e99213fec11a031e316874c7e"}, - {file = "pyzmq-25.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:abf34e43c531bbb510ae7e8f5b2b1f2a8ab93219510e2b287a944432fad135f3"}, - {file = "pyzmq-25.1.1-cp38-cp38-macosx_10_15_universal2.whl", hash = "sha256:87e34f31ca8f168c56d6fbf99692cc8d3b445abb5bfd08c229ae992d7547a92a"}, - {file = "pyzmq-25.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:c9c6c9b2c2f80747a98f34ef491c4d7b1a8d4853937bb1492774992a120f475d"}, - {file = "pyzmq-25.1.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:5619f3f5a4db5dbb572b095ea3cb5cc035335159d9da950830c9c4db2fbb6995"}, - {file = "pyzmq-25.1.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:5a34d2395073ef862b4032343cf0c32a712f3ab49d7ec4f42c9661e0294d106f"}, - {file = "pyzmq-25.1.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:25f0e6b78220aba09815cd1f3a32b9c7cb3e02cb846d1cfc526b6595f6046618"}, - {file = "pyzmq-25.1.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:3669cf8ee3520c2f13b2e0351c41fea919852b220988d2049249db10046a7afb"}, - {file = "pyzmq-25.1.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:2d163a18819277e49911f7461567bda923461c50b19d169a062536fffe7cd9d2"}, - {file = "pyzmq-25.1.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:df27ffddff4190667d40de7beba4a950b5ce78fe28a7dcc41d6f8a700a80a3c0"}, - {file = "pyzmq-25.1.1-cp38-cp38-win32.whl", hash = "sha256:a382372898a07479bd34bda781008e4a954ed8750f17891e794521c3e21c2e1c"}, - {file = "pyzmq-25.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:52533489f28d62eb1258a965f2aba28a82aa747202c8fa5a1c7a43b5db0e85c1"}, - {file = "pyzmq-25.1.1-cp39-cp39-macosx_10_15_universal2.whl", hash = "sha256:03b3f49b57264909aacd0741892f2aecf2f51fb053e7d8ac6767f6c700832f45"}, - {file = "pyzmq-25.1.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:330f9e188d0d89080cde66dc7470f57d1926ff2fb5576227f14d5be7ab30b9fa"}, - {file = "pyzmq-25.1.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:2ca57a5be0389f2a65e6d3bb2962a971688cbdd30b4c0bd188c99e39c234f414"}, - {file = "pyzmq-25.1.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:d457aed310f2670f59cc5b57dcfced452aeeed77f9da2b9763616bd57e4dbaae"}, - {file = "pyzmq-25.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c56d748ea50215abef7030c72b60dd723ed5b5c7e65e7bc2504e77843631c1a6"}, - {file = "pyzmq-25.1.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:8f03d3f0d01cb5a018debeb412441996a517b11c5c17ab2001aa0597c6d6882c"}, - {file = "pyzmq-25.1.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:820c4a08195a681252f46926de10e29b6bbf3e17b30037bd4250d72dd3ddaab8"}, - {file = "pyzmq-25.1.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:17ef5f01d25b67ca8f98120d5fa1d21efe9611604e8eb03a5147360f517dd1e2"}, - {file = "pyzmq-25.1.1-cp39-cp39-win32.whl", hash = "sha256:04ccbed567171579ec2cebb9c8a3e30801723c575601f9a990ab25bcac6b51e2"}, - {file = "pyzmq-25.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:e61f091c3ba0c3578411ef505992d356a812fb200643eab27f4f70eed34a29ef"}, - {file = "pyzmq-25.1.1-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:ade6d25bb29c4555d718ac6d1443a7386595528c33d6b133b258f65f963bb0f6"}, - {file = "pyzmq-25.1.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e0c95ddd4f6e9fca4e9e3afaa4f9df8552f0ba5d1004e89ef0a68e1f1f9807c7"}, - {file = "pyzmq-25.1.1-pp310-pypy310_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:48e466162a24daf86f6b5ca72444d2bf39a5e58da5f96370078be67c67adc978"}, - {file = "pyzmq-25.1.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:abc719161780932c4e11aaebb203be3d6acc6b38d2f26c0f523b5b59d2fc1996"}, - {file = "pyzmq-25.1.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:1ccf825981640b8c34ae54231b7ed00271822ea1c6d8ba1090ebd4943759abf5"}, - {file = "pyzmq-25.1.1-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:c2f20ce161ebdb0091a10c9ca0372e023ce24980d0e1f810f519da6f79c60800"}, - {file = "pyzmq-25.1.1-pp37-pypy37_pp73-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:deee9ca4727f53464daf089536e68b13e6104e84a37820a88b0a057b97bba2d2"}, - {file = "pyzmq-25.1.1-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:aa8d6cdc8b8aa19ceb319aaa2b660cdaccc533ec477eeb1309e2a291eaacc43a"}, - {file = "pyzmq-25.1.1-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:019e59ef5c5256a2c7378f2fb8560fc2a9ff1d315755204295b2eab96b254d0a"}, - {file = "pyzmq-25.1.1-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:b9af3757495c1ee3b5c4e945c1df7be95562277c6e5bccc20a39aec50f826cd0"}, - {file = "pyzmq-25.1.1-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:548d6482dc8aadbe7e79d1b5806585c8120bafa1ef841167bc9090522b610fa6"}, - {file = "pyzmq-25.1.1-pp38-pypy38_pp73-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:057e824b2aae50accc0f9a0570998adc021b372478a921506fddd6c02e60308e"}, - {file = "pyzmq-25.1.1-pp38-pypy38_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:2243700cc5548cff20963f0ca92d3e5e436394375ab8a354bbea2b12911b20b0"}, - {file = "pyzmq-25.1.1-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:79986f3b4af059777111409ee517da24a529bdbd46da578b33f25580adcff728"}, - {file = "pyzmq-25.1.1-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:11d58723d44d6ed4dd677c5615b2ffb19d5c426636345567d6af82be4dff8a55"}, - {file = "pyzmq-25.1.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:49d238cf4b69652257db66d0c623cd3e09b5d2e9576b56bc067a396133a00d4a"}, - {file = "pyzmq-25.1.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fedbdc753827cf014c01dbbee9c3be17e5a208dcd1bf8641ce2cd29580d1f0d4"}, - {file = "pyzmq-25.1.1-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bc16ac425cc927d0a57d242589f87ee093884ea4804c05a13834d07c20db203c"}, - {file = "pyzmq-25.1.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:11c1d2aed9079c6b0c9550a7257a836b4a637feb334904610f06d70eb44c56d2"}, - {file = "pyzmq-25.1.1-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:e8a701123029cc240cea61dd2d16ad57cab4691804143ce80ecd9286b464d180"}, - {file = "pyzmq-25.1.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:61706a6b6c24bdece85ff177fec393545a3191eeda35b07aaa1458a027ad1304"}, - {file = "pyzmq-25.1.1.tar.gz", hash = "sha256:259c22485b71abacdfa8bf79720cd7bcf4b9d128b30ea554f01ae71fdbfdaa23"}, + {file = "pyzmq-24.0.1-cp310-cp310-macosx_10_15_universal2.whl", hash = "sha256:28b119ba97129d3001673a697b7cce47fe6de1f7255d104c2f01108a5179a066"}, + {file = "pyzmq-24.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:bcbebd369493d68162cddb74a9c1fcebd139dfbb7ddb23d8f8e43e6c87bac3a6"}, + {file = "pyzmq-24.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ae61446166983c663cee42c852ed63899e43e484abf080089f771df4b9d272ef"}, + {file = "pyzmq-24.0.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:87f7ac99b15270db8d53f28c3c7b968612993a90a5cf359da354efe96f5372b4"}, + {file = "pyzmq-24.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9dca7c3956b03b7663fac4d150f5e6d4f6f38b2462c1e9afd83bcf7019f17913"}, + {file = "pyzmq-24.0.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:8c78bfe20d4c890cb5580a3b9290f700c570e167d4cdcc55feec07030297a5e3"}, + {file = "pyzmq-24.0.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:48f721f070726cd2a6e44f3c33f8ee4b24188e4b816e6dd8ba542c8c3bb5b246"}, + {file = "pyzmq-24.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:afe1f3bc486d0ce40abb0a0c9adb39aed3bbac36ebdc596487b0cceba55c21c1"}, + {file = "pyzmq-24.0.1-cp310-cp310-win32.whl", hash = "sha256:3e6192dbcefaaa52ed81be88525a54a445f4b4fe2fffcae7fe40ebb58bd06bfd"}, + {file = "pyzmq-24.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:86de64468cad9c6d269f32a6390e210ca5ada568c7a55de8e681ca3b897bb340"}, + {file = "pyzmq-24.0.1-cp311-cp311-macosx_10_15_universal2.whl", hash = "sha256:838812c65ed5f7c2bd11f7b098d2e5d01685a3f6d1f82849423b570bae698c00"}, + {file = "pyzmq-24.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:dfb992dbcd88d8254471760879d48fb20836d91baa90f181c957122f9592b3dc"}, + {file = "pyzmq-24.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7abddb2bd5489d30ffeb4b93a428130886c171b4d355ccd226e83254fcb6b9ef"}, + {file = "pyzmq-24.0.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:94010bd61bc168c103a5b3b0f56ed3b616688192db7cd5b1d626e49f28ff51b3"}, + {file = "pyzmq-24.0.1-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:8242543c522d84d033fe79be04cb559b80d7eb98ad81b137ff7e0a9020f00ace"}, + {file = "pyzmq-24.0.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ccb94342d13e3bf3ffa6e62f95b5e3f0bc6bfa94558cb37f4b3d09d6feb536ff"}, + {file = "pyzmq-24.0.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:6640f83df0ae4ae1104d4c62b77e9ef39be85ebe53f636388707d532bee2b7b8"}, + {file = "pyzmq-24.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:a180dbd5ea5d47c2d3b716d5c19cc3fb162d1c8db93b21a1295d69585bfddac1"}, + {file = "pyzmq-24.0.1-cp311-cp311-win32.whl", hash = "sha256:624321120f7e60336be8ec74a172ae7fba5c3ed5bf787cc85f7e9986c9e0ebc2"}, + {file = "pyzmq-24.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:1724117bae69e091309ffb8255412c4651d3f6355560d9af312d547f6c5bc8b8"}, + {file = "pyzmq-24.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:15975747462ec49fdc863af906bab87c43b2491403ab37a6d88410635786b0f4"}, + {file = "pyzmq-24.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b947e264f0e77d30dcbccbb00f49f900b204b922eb0c3a9f0afd61aaa1cedc3d"}, + {file = "pyzmq-24.0.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:0ec91f1bad66f3ee8c6deb65fa1fe418e8ad803efedd69c35f3b5502f43bd1dc"}, + {file = "pyzmq-24.0.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:db03704b3506455d86ec72c3358a779e9b1d07b61220dfb43702b7b668edcd0d"}, + {file = "pyzmq-24.0.1-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:e7e66b4e403c2836ac74f26c4b65d8ac0ca1eef41dfcac2d013b7482befaad83"}, + {file = "pyzmq-24.0.1-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:7a23ccc1083c260fa9685c93e3b170baba45aeed4b524deb3f426b0c40c11639"}, + {file = "pyzmq-24.0.1-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:fa0ae3275ef706c0309556061185dd0e4c4cd3b7d6f67ae617e4e677c7a41e2e"}, + {file = "pyzmq-24.0.1-cp36-cp36m-win32.whl", hash = "sha256:f01de4ec083daebf210531e2cca3bdb1608dbbbe00a9723e261d92087a1f6ebc"}, + {file = "pyzmq-24.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:de4217b9eb8b541cf2b7fde4401ce9d9a411cc0af85d410f9d6f4333f43640be"}, + {file = "pyzmq-24.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:78068e8678ca023594e4a0ab558905c1033b2d3e806a0ad9e3094e231e115a33"}, + {file = "pyzmq-24.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:77c2713faf25a953c69cf0f723d1b7dd83827b0834e6c41e3fb3bbc6765914a1"}, + {file = "pyzmq-24.0.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8bb4af15f305056e95ca1bd086239b9ebc6ad55e9f49076d27d80027f72752f6"}, + {file = "pyzmq-24.0.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:0f14cffd32e9c4c73da66db97853a6aeceaac34acdc0fae9e5bbc9370281864c"}, + {file = "pyzmq-24.0.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:0108358dab8c6b27ff6b985c2af4b12665c1bc659648284153ee501000f5c107"}, + {file = "pyzmq-24.0.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:d66689e840e75221b0b290b0befa86f059fb35e1ee6443bce51516d4d61b6b99"}, + {file = "pyzmq-24.0.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:ae08ac90aa8fa14caafc7a6251bd218bf6dac518b7bff09caaa5e781119ba3f2"}, + {file = "pyzmq-24.0.1-cp37-cp37m-win32.whl", hash = "sha256:8421aa8c9b45ea608c205db9e1c0c855c7e54d0e9c2c2f337ce024f6843cab3b"}, + {file = "pyzmq-24.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:54d8b9c5e288362ec8595c1d98666d36f2070fd0c2f76e2b3c60fbad9bd76227"}, + {file = "pyzmq-24.0.1-cp38-cp38-macosx_10_15_universal2.whl", hash = "sha256:acbd0a6d61cc954b9f535daaa9ec26b0a60a0d4353c5f7c1438ebc88a359a47e"}, + {file = "pyzmq-24.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:47b11a729d61a47df56346283a4a800fa379ae6a85870d5a2e1e4956c828eedc"}, + {file = "pyzmq-24.0.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:abe6eb10122f0d746a0d510c2039ae8edb27bc9af29f6d1b05a66cc2401353ff"}, + {file = "pyzmq-24.0.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:07bec1a1b22dacf718f2c0e71b49600bb6a31a88f06527dfd0b5aababe3fa3f7"}, + {file = "pyzmq-24.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f0d945a85b70da97ae86113faf9f1b9294efe66bd4a5d6f82f2676d567338b66"}, + {file = "pyzmq-24.0.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:1b7928bb7580736ffac5baf814097be342ba08d3cfdfb48e52773ec959572287"}, + {file = "pyzmq-24.0.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:b946da90dc2799bcafa682692c1d2139b2a96ec3c24fa9fc6f5b0da782675330"}, + {file = "pyzmq-24.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:c8840f064b1fb377cffd3efeaad2b190c14d4c8da02316dae07571252d20b31f"}, + {file = "pyzmq-24.0.1-cp38-cp38-win32.whl", hash = "sha256:4854f9edc5208f63f0841c0c667260ae8d6846cfa233c479e29fdc85d42ebd58"}, + {file = "pyzmq-24.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:42d4f97b9795a7aafa152a36fe2ad44549b83a743fd3e77011136def512e6c2a"}, + {file = "pyzmq-24.0.1-cp39-cp39-macosx_10_15_universal2.whl", hash = "sha256:52afb0ac962963fff30cf1be775bc51ae083ef4c1e354266ab20e5382057dd62"}, + {file = "pyzmq-24.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8bad8210ad4df68c44ff3685cca3cda448ee46e20d13edcff8909eba6ec01ca4"}, + {file = "pyzmq-24.0.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:dabf1a05318d95b1537fd61d9330ef4313ea1216eea128a17615038859da3b3b"}, + {file = "pyzmq-24.0.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:5bd3d7dfd9cd058eb68d9a905dec854f86649f64d4ddf21f3ec289341386c44b"}, + {file = "pyzmq-24.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e8012bce6836d3f20a6c9599f81dfa945f433dab4dbd0c4917a6fb1f998ab33d"}, + {file = "pyzmq-24.0.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:c31805d2c8ade9b11feca4674eee2b9cce1fec3e8ddb7bbdd961a09dc76a80ea"}, + {file = "pyzmq-24.0.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:3104f4b084ad5d9c0cb87445cc8cfd96bba710bef4a66c2674910127044df209"}, + {file = "pyzmq-24.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:df0841f94928f8af9c7a1f0aaaffba1fb74607af023a152f59379c01c53aee58"}, + {file = "pyzmq-24.0.1-cp39-cp39-win32.whl", hash = "sha256:a435ef8a3bd95c8a2d316d6e0ff70d0db524f6037411652803e118871d703333"}, + {file = "pyzmq-24.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:2032d9cb994ce3b4cba2b8dfae08c7e25bc14ba484c770d4d3be33c27de8c45b"}, + {file = "pyzmq-24.0.1-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:bb5635c851eef3a7a54becde6da99485eecf7d068bd885ac8e6d173c4ecd68b0"}, + {file = "pyzmq-24.0.1-pp37-pypy37_pp73-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:83ea1a398f192957cb986d9206ce229efe0ee75e3c6635baff53ddf39bd718d5"}, + {file = "pyzmq-24.0.1-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:941fab0073f0a54dc33d1a0460cb04e0d85893cb0c5e1476c785000f8b359409"}, + {file = "pyzmq-24.0.1-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0e8f482c44ccb5884bf3f638f29bea0f8dc68c97e38b2061769c4cb697f6140d"}, + {file = "pyzmq-24.0.1-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:613010b5d17906c4367609e6f52e9a2595e35d5cc27d36ff3f1b6fa6e954d944"}, + {file = "pyzmq-24.0.1-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:65c94410b5a8355cfcf12fd600a313efee46ce96a09e911ea92cf2acf6708804"}, + {file = "pyzmq-24.0.1-pp38-pypy38_pp73-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:20e7eeb1166087db636c06cae04a1ef59298627f56fb17da10528ab52a14c87f"}, + {file = "pyzmq-24.0.1-pp38-pypy38_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:a2712aee7b3834ace51738c15d9ee152cc5a98dc7d57dd93300461b792ab7b43"}, + {file = "pyzmq-24.0.1-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1a7c280185c4da99e0cc06c63bdf91f5b0b71deb70d8717f0ab870a43e376db8"}, + {file = "pyzmq-24.0.1-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:858375573c9225cc8e5b49bfac846a77b696b8d5e815711b8d4ba3141e6e8879"}, + {file = "pyzmq-24.0.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:80093b595921eed1a2cead546a683b9e2ae7f4a4592bb2ab22f70d30174f003a"}, + {file = "pyzmq-24.0.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8f3f3154fde2b1ff3aa7b4f9326347ebc89c8ef425ca1db8f665175e6d3bd42f"}, + {file = "pyzmq-24.0.1-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:abb756147314430bee5d10919b8493c0ccb109ddb7f5dfd2fcd7441266a25b75"}, + {file = "pyzmq-24.0.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:44e706bac34e9f50779cb8c39f10b53a4d15aebb97235643d3112ac20bd577b4"}, + {file = "pyzmq-24.0.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:687700f8371643916a1d2c61f3fdaa630407dd205c38afff936545d7b7466066"}, + {file = "pyzmq-24.0.1.tar.gz", hash = "sha256:216f5d7dbb67166759e59b0479bca82b8acf9bed6015b526b8eb10143fb08e77"}, ] [package.dependencies] cffi = {version = "*", markers = "implementation_name == \"pypy\""} +py = {version = "*", markers = "implementation_name == \"pypy\""} [[package]] name = "qtconsole" @@ -6187,108 +6314,108 @@ jupyter = ["ipywidgets (>=7.5.1,<9)"] [[package]] name = "rpds-py" -version = "0.10.2" +version = "0.10.3" description = "Python bindings to Rust's persistent data structures (rpds)" optional = false python-versions = ">=3.8" files = [ - {file = "rpds_py-0.10.2-cp310-cp310-macosx_10_7_x86_64.whl", hash = "sha256:9f00d54b18dd837f1431d66b076737deb7c29ce3ebb8412ceaf44d5e1954ac0c"}, - {file = "rpds_py-0.10.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8f4d561f4728f825e3b793a53064b606ca0b6fc264f67d09e54af452aafc5b82"}, - {file = "rpds_py-0.10.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:013d6c784150d10236a74b4094a79d96a256b814457e388fc5a4ba9efe24c402"}, - {file = "rpds_py-0.10.2-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bd1142d22fdb183a0fff66d79134bf644401437fed874f81066d314c67ee193c"}, - {file = "rpds_py-0.10.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4a0536ed2b9297c75104e1a3da330828ba1b2639fa53b38d396f98bf7e3c68df"}, - {file = "rpds_py-0.10.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:41bd430b7b63aa802c02964e331ac0b177148fef5f807d2c90d05ce71a52b4d4"}, - {file = "rpds_py-0.10.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4e8474f7233fe1949ce4e03bea698a600c2d5d6b51dab6d6e6336dbe69acf23e"}, - {file = "rpds_py-0.10.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d9d7efaad48b859053b90dedd69bc92f2095084251e732e4c57ac9726bcb1e64"}, - {file = "rpds_py-0.10.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:5612b0b1de8d5114520094bd5fc3d04eb8af6f3e10d48ef05b7c8e77c1fd9545"}, - {file = "rpds_py-0.10.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:5d5eaf988951f6ecb6854ca3300b87123599c711183c83da7ce39717a7cbdbce"}, - {file = "rpds_py-0.10.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:75c8766734ac0053e1d683567e65e85306c4ec62631b0591caeb287ac8f72e08"}, - {file = "rpds_py-0.10.2-cp310-none-win32.whl", hash = "sha256:8de9b88f0cbac73cfed34220d13c57849e62a7099a714b929142425e926d223a"}, - {file = "rpds_py-0.10.2-cp310-none-win_amd64.whl", hash = "sha256:2275f1a022e2383da5d2d101fe11ccdcbae799148c4b83260a4b9309fa3e1fc2"}, - {file = "rpds_py-0.10.2-cp311-cp311-macosx_10_7_x86_64.whl", hash = "sha256:dd91a7d7a9ce7f4983097c91ce211f3e5569cc21caa16f2692298a07e396f82b"}, - {file = "rpds_py-0.10.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e82b4a70cc67094f3f3fd77579702f48fcf1de7bdc67d79b8f1e24d089a6162c"}, - {file = "rpds_py-0.10.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e281b71922208e00886e4b7ffbfcf27874486364f177418ab676f102130e7ec9"}, - {file = "rpds_py-0.10.2-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:b3eb1a0d2b6d232d1bcdfc3fcc5f7b004ab3fbd9203011a3172f051d4527c0b6"}, - {file = "rpds_py-0.10.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:02945ae38fd78efc40900f509890de84cfd5ffe2cd2939eeb3a8800dc68b87cb"}, - {file = "rpds_py-0.10.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ccfb77f6dc8abffa6f1c7e3975ed9070a41ce5fcc11154d2bead8c1baa940f09"}, - {file = "rpds_py-0.10.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:af52078719209bef33e38131486fd784832dd8d1dc9b85f00a44f6e7437dd021"}, - {file = "rpds_py-0.10.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:56ba7c1100ed079527f2b995bf5486a2e557e6d5b733c52e8947476338815b69"}, - {file = "rpds_py-0.10.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:899b03a3be785a7e1ff84b237da71f0efa2f021512f147dd34ffdf7aa82cb678"}, - {file = "rpds_py-0.10.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:22e6de18f00583f06928cc8d0993104ecc62f7c6da6478db2255de89a30e45d1"}, - {file = "rpds_py-0.10.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:edd74b760a6bb950397e7a7bd2f38e6700f6525062650b1d77c6d851b82f02c2"}, - {file = "rpds_py-0.10.2-cp311-none-win32.whl", hash = "sha256:18909093944727e068ebfc92e2e6ed1c4fa44135507c1c0555213ce211c53214"}, - {file = "rpds_py-0.10.2-cp311-none-win_amd64.whl", hash = "sha256:9568764e72d85cf7855ca78b48e07ed1be47bf230e2cea8dabda3c95f660b0ff"}, - {file = "rpds_py-0.10.2-cp312-cp312-macosx_10_7_x86_64.whl", hash = "sha256:0fc625059b83695fbb4fc8b7a8b66fa94ff9c7b78c84fb9986cd53ff88a28d80"}, - {file = "rpds_py-0.10.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:c86231c66e4f422e7c13ea6200bb4048b3016c8bfd11b4fd0dabd04d2c8e3501"}, - {file = "rpds_py-0.10.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:56777c57246e048908b550af9b81b0ec9cf804fd47cb7502ccd93238bd6025c2"}, - {file = "rpds_py-0.10.2-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:a4cb372e22e9c879bd9a9cc9b20b7c1fbf30a605ac953da45ecec05d8a6e1c77"}, - {file = "rpds_py-0.10.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:aa3b3a43dabc4cc57a7800f526cbe03f71c69121e21b863fdf497b59b462b163"}, - {file = "rpds_py-0.10.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:59d222086daa55421d599609b32d0ebe544e57654c4a0a1490c54a7ebaa67561"}, - {file = "rpds_py-0.10.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:529aab727f54a937085184e7436e1d0e19975cf10115eda12d37a683e4ee5342"}, - {file = "rpds_py-0.10.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:43e9b1531d6a898bdf086acb75c41265c7ec4331267d7619148d407efc72bd24"}, - {file = "rpds_py-0.10.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:c2772bb95062e3f9774140205cd65d8997e39620715486cf5f843cf4ad8f744c"}, - {file = "rpds_py-0.10.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:ba1b28e44f611f3f2b436bd8290050a61db4b59a8e24be4465f44897936b3824"}, - {file = "rpds_py-0.10.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:5aba767e64b494483ad60c4873bec78d16205a21f8247c99749bd990d9c846c2"}, - {file = "rpds_py-0.10.2-cp38-cp38-macosx_10_7_x86_64.whl", hash = "sha256:e1954f4b239d1a92081647eecfd51cbfd08ea16eb743b8af1cd0113258feea14"}, - {file = "rpds_py-0.10.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:de4a2fd524993578fe093044f291b4b24aab134390030b3b9b5f87fd41ab7e75"}, - {file = "rpds_py-0.10.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e69737bd56006a86fd5a78b2b85447580a6138c930a75eb9ef39fe03d90782b1"}, - {file = "rpds_py-0.10.2-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f40abbcc0a7d9a8a80870af839d317e6932533f98682aabd977add6c53beeb23"}, - {file = "rpds_py-0.10.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:29ec8507664f94cc08457d98cfc41c3cdbddfa8952438e644177a29b04937876"}, - {file = "rpds_py-0.10.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bcde80aefe7054fad6277762fb7e9d35c72ea479a485ae1bb14629c640987b30"}, - {file = "rpds_py-0.10.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a65de5c02884760a14a58304fb6303f9ddfc582e630f385daea871e1bdb18686"}, - {file = "rpds_py-0.10.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e92e5817eb6bfed23aa5e45bfe30647b83602bdd6f9e25d63524d4e6258458b0"}, - {file = "rpds_py-0.10.2-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:2c8fc6c841ada60a86d29c9ebe2e8757c47eda6553f3596c560e59ca6e9b6fa1"}, - {file = "rpds_py-0.10.2-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:8557c807388e6617161fe51b1a4747ea8d1133f2d2ad8e79583439abebe58fbd"}, - {file = "rpds_py-0.10.2-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:00e97d43a36811b78fa9ad9d3329bf34f76a31e891a7031a2ac01450c9b168ab"}, - {file = "rpds_py-0.10.2-cp38-none-win32.whl", hash = "sha256:1ed3d5385d14be894e12a9033be989e012214a9811e7194849c94032ad69682a"}, - {file = "rpds_py-0.10.2-cp38-none-win_amd64.whl", hash = "sha256:02b4a2e28eb24dac4ef43dda4f6a6f7766e355179b143f7d0c76a1c5488a307b"}, - {file = "rpds_py-0.10.2-cp39-cp39-macosx_10_7_x86_64.whl", hash = "sha256:2a55631b93e47956fbc97d69ba2054a8c6a4016f9a3064ec4e031f5f1030cb90"}, - {file = "rpds_py-0.10.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:2ffbf1b38c88d0466de542e91b08225d51782282512f8e2b11715126c41fda48"}, - {file = "rpds_py-0.10.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:213f9ef5c02ec2f883c1075d25a873149daadbaea50d18d622e9db55ec9849c2"}, - {file = "rpds_py-0.10.2-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:b00150a9a3fd0a8efaa90bc2696c105b04039d50763dd1c95a34c88c5966cb57"}, - {file = "rpds_py-0.10.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ab0f7aabdbce4a202e013083eeab71afdb85efa405dc4a06fea98cde81204675"}, - {file = "rpds_py-0.10.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2cd0c9fb5d40887500b4ed818770c68ab4fa6e0395d286f9704be6751b1b7d98"}, - {file = "rpds_py-0.10.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8578fc6c8bdd0201327503720fa581000b4bd3934abbf07e2628d1ad3de157d"}, - {file = "rpds_py-0.10.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2d27d08056fcd61ff47a0cd8407eff4d3e816c82cb6b9c6f0ce9a0ad49225f81"}, - {file = "rpds_py-0.10.2-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:c8f6526df47953b07c45b95c4d1da6b9a0861c0e5da0271db96bb1d807825412"}, - {file = "rpds_py-0.10.2-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:177c033e467a66a054dd3a9534167234a3d0b2e41445807b13b626e01da25d92"}, - {file = "rpds_py-0.10.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:9c74cbee9e532dc34371127f7686d6953e5153a1f22beab7f953d95ee4a0fe09"}, - {file = "rpds_py-0.10.2-cp39-none-win32.whl", hash = "sha256:05a1382905026bdd560f806c8c7c16e0f3e3fb359ba8868203ca6e5799884968"}, - {file = "rpds_py-0.10.2-cp39-none-win_amd64.whl", hash = "sha256:3fd503c27e7b7034128e30847ecdb4bff4ca5e60f29ad022a9f66ae8940d54ac"}, - {file = "rpds_py-0.10.2-pp310-pypy310_pp73-macosx_10_7_x86_64.whl", hash = "sha256:4a96147791e49e84207dd1530109aa0e9eeaf1c8b7a59f150047fc0fcdf9bb64"}, - {file = "rpds_py-0.10.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:203eb1532d51591d32e8dfafd60b5d31347ea7278c8da02b4b550287f6abe28b"}, - {file = "rpds_py-0.10.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a2f416cdfe92f5fbb77177f5f3f7830059d1582db05f2c7119bf80069d1ab69b"}, - {file = "rpds_py-0.10.2-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:b2660000e1a113869c86eb5cc07f3343467490f3cd9d0299f81da9ddae7137b7"}, - {file = "rpds_py-0.10.2-pp310-pypy310_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1adb04e4b4e41bf30aaa77eeb169c1b9ba9e5010e2e6ce8d6c17e1446edc9b68"}, - {file = "rpds_py-0.10.2-pp310-pypy310_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2bca97521ee786087f0c5ef318fef3eef0266a9c3deff88205523cf353af7394"}, - {file = "rpds_py-0.10.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4969592e3cdeefa4cbb15a26cec102cbd4a1d6e5b695fac9fa026e19741138c8"}, - {file = "rpds_py-0.10.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:df61f818edf7c8626bfa392f825860fb670b5f8336e238eb0ec7e2a5689cdded"}, - {file = "rpds_py-0.10.2-pp310-pypy310_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:b589d93a60e78fe55d5bc76ee8c2bf945dbdbb7cd16044c53e0307604e448de1"}, - {file = "rpds_py-0.10.2-pp310-pypy310_pp73-musllinux_1_2_i686.whl", hash = "sha256:73da69e1f612c3e682e34dcb971272d90d6f27b2c99acff444ca455a89978574"}, - {file = "rpds_py-0.10.2-pp310-pypy310_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:89438e8885a186c69fe31f7ef98bb2bf29688c466c3caf9060f404c0be89ae80"}, - {file = "rpds_py-0.10.2-pp38-pypy38_pp73-macosx_10_7_x86_64.whl", hash = "sha256:c4ecc4e9a5d73a816cae36ee6b5d8b7a0c72013cae1e101406e832887c3dc2d8"}, - {file = "rpds_py-0.10.2-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:907b214da5d2fcff0b6ddb83de1333890ca92abaf4bbf8d9c61dc1b95c87fd6e"}, - {file = "rpds_py-0.10.2-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bb44644371eaa29a3aba7b69b1862d0d56f073bb7585baa32e4271a71a91ee82"}, - {file = "rpds_py-0.10.2-pp38-pypy38_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:80c3cf46511653f94dfe07c7c79ab105c4164d6e1dfcb35b7214fb9af53eaef4"}, - {file = "rpds_py-0.10.2-pp38-pypy38_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:eaba0613c759ebf95988a84f766ca6b7432d55ce399194f95dde588ad1be0878"}, - {file = "rpds_py-0.10.2-pp38-pypy38_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0527c97dcd8bb983822ee31d3760187083fd3ba18ac4dd22cf5347c89d5628f4"}, - {file = "rpds_py-0.10.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9cdfd649011ce2d90cb0dd304c5aba1190fac0c266d19a9e2b96b81cfd150a09"}, - {file = "rpds_py-0.10.2-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:75eea40355a8690459c7291ce6c8ce39c27bd223675c7da6619f510c728feb97"}, - {file = "rpds_py-0.10.2-pp38-pypy38_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:4f1b804cfad04f862d6a84af9d1ad941b06f671878f0f7ecad6c92007d423de6"}, - {file = "rpds_py-0.10.2-pp38-pypy38_pp73-musllinux_1_2_i686.whl", hash = "sha256:bf77f9017fcfa1232f98598a637406e6c33982ccba8a5922339575c3e2b90ea5"}, - {file = "rpds_py-0.10.2-pp38-pypy38_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:46c4c550bf59ce05d6bff2c98053822549aaf9fbaf81103edea325e03350bca1"}, - {file = "rpds_py-0.10.2-pp39-pypy39_pp73-macosx_10_7_x86_64.whl", hash = "sha256:46af4a742b90c7460e94214f923452c2c1d050a9da1d2b8d4c70cbc045e692b7"}, - {file = "rpds_py-0.10.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:2a86d246a160d98d820ee7d02dc18c923c228de095be362e57b9fd8970b2c4a1"}, - {file = "rpds_py-0.10.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ae141c9017f8f473a6ee07a9425da021816a9f8c0683c2e5442f0ccf56b0fc62"}, - {file = "rpds_py-0.10.2-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e1147bc3d0dd1e549d991110d0a09557ec9f925dbc1ca62871fcdab2ec9d716b"}, - {file = "rpds_py-0.10.2-pp39-pypy39_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fce7a8ee8d0f682c953c0188735d823f0fcb62779bf92cd6ba473a8e730e26ad"}, - {file = "rpds_py-0.10.2-pp39-pypy39_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4c7f9d70f99e1fbcbf57c75328b80e1c0a7f6cad43e75efa90a97221be5efe15"}, - {file = "rpds_py-0.10.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0b309908b6ff5ffbf6394818cb73b5a2a74073acee2c57fe8719046389aeff0d"}, - {file = "rpds_py-0.10.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:3ff1f585a0fdc1415bd733b804f33d386064a308672249b14828130dd43e7c31"}, - {file = "rpds_py-0.10.2-pp39-pypy39_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:0188b580c490bccb031e9b67e9e8c695a3c44ac5e06218b152361eca847317c3"}, - {file = "rpds_py-0.10.2-pp39-pypy39_pp73-musllinux_1_2_i686.whl", hash = "sha256:abe081453166e206e3a8c6d8ace57214c17b6d9477d7601ac14a365344dbc1f4"}, - {file = "rpds_py-0.10.2-pp39-pypy39_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:9118de88c16947eaf5b92f749e65b0501ea69e7c2be7bd6aefc12551622360e1"}, - {file = "rpds_py-0.10.2.tar.gz", hash = "sha256:289073f68452b96e70990085324be7223944c7409973d13ddfe0eea1c1b5663b"}, + {file = "rpds_py-0.10.3-cp310-cp310-macosx_10_7_x86_64.whl", hash = "sha256:485747ee62da83366a44fbba963c5fe017860ad408ccd6cd99aa66ea80d32b2e"}, + {file = "rpds_py-0.10.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c55f9821f88e8bee4b7a72c82cfb5ecd22b6aad04033334f33c329b29bfa4da0"}, + {file = "rpds_py-0.10.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d3b52a67ac66a3a64a7e710ba629f62d1e26ca0504c29ee8cbd99b97df7079a8"}, + {file = "rpds_py-0.10.3-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3aed39db2f0ace76faa94f465d4234aac72e2f32b009f15da6492a561b3bbebd"}, + {file = "rpds_py-0.10.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:271c360fdc464fe6a75f13ea0c08ddf71a321f4c55fc20a3fe62ea3ef09df7d9"}, + {file = "rpds_py-0.10.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ef5fddfb264e89c435be4adb3953cef5d2936fdeb4463b4161a6ba2f22e7b740"}, + {file = "rpds_py-0.10.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a771417c9c06c56c9d53d11a5b084d1de75de82978e23c544270ab25e7c066ff"}, + {file = "rpds_py-0.10.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:52b5cbc0469328e58180021138207e6ec91d7ca2e037d3549cc9e34e2187330a"}, + {file = "rpds_py-0.10.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:6ac3fefb0d168c7c6cab24fdfc80ec62cd2b4dfd9e65b84bdceb1cb01d385c33"}, + {file = "rpds_py-0.10.3-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:8d54bbdf5d56e2c8cf81a1857250f3ea132de77af543d0ba5dce667183b61fec"}, + {file = "rpds_py-0.10.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:cd2163f42868865597d89399a01aa33b7594ce8e2c4a28503127c81a2f17784e"}, + {file = "rpds_py-0.10.3-cp310-none-win32.whl", hash = "sha256:ea93163472db26ac6043e8f7f93a05d9b59e0505c760da2a3cd22c7dd7111391"}, + {file = "rpds_py-0.10.3-cp310-none-win_amd64.whl", hash = "sha256:7cd020b1fb41e3ab7716d4d2c3972d4588fdfbab9bfbbb64acc7078eccef8860"}, + {file = "rpds_py-0.10.3-cp311-cp311-macosx_10_7_x86_64.whl", hash = "sha256:1d9b5ee46dcb498fa3e46d4dfabcb531e1f2e76b477e0d99ef114f17bbd38453"}, + {file = "rpds_py-0.10.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:563646d74a4b4456d0cf3b714ca522e725243c603e8254ad85c3b59b7c0c4bf0"}, + {file = "rpds_py-0.10.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e626b864725680cd3904414d72e7b0bd81c0e5b2b53a5b30b4273034253bb41f"}, + {file = "rpds_py-0.10.3-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:485301ee56ce87a51ccb182a4b180d852c5cb2b3cb3a82f7d4714b4141119d8c"}, + {file = "rpds_py-0.10.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:42f712b4668831c0cd85e0a5b5a308700fe068e37dcd24c0062904c4e372b093"}, + {file = "rpds_py-0.10.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6c9141af27a4e5819d74d67d227d5047a20fa3c7d4d9df43037a955b4c748ec5"}, + {file = "rpds_py-0.10.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ef750a20de1b65657a1425f77c525b0183eac63fe7b8f5ac0dd16f3668d3e64f"}, + {file = "rpds_py-0.10.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e1a0ffc39f51aa5f5c22114a8f1906b3c17eba68c5babb86c5f77d8b1bba14d1"}, + {file = "rpds_py-0.10.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:f4c179a7aeae10ddf44c6bac87938134c1379c49c884529f090f9bf05566c836"}, + {file = "rpds_py-0.10.3-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:176287bb998fd1e9846a9b666e240e58f8d3373e3bf87e7642f15af5405187b8"}, + {file = "rpds_py-0.10.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:6446002739ca29249f0beaaf067fcbc2b5aab4bc7ee8fb941bd194947ce19aff"}, + {file = "rpds_py-0.10.3-cp311-none-win32.whl", hash = "sha256:c7aed97f2e676561416c927b063802c8a6285e9b55e1b83213dfd99a8f4f9e48"}, + {file = "rpds_py-0.10.3-cp311-none-win_amd64.whl", hash = "sha256:8bd01ff4032abaed03f2db702fa9a61078bee37add0bd884a6190b05e63b028c"}, + {file = "rpds_py-0.10.3-cp312-cp312-macosx_10_7_x86_64.whl", hash = "sha256:4cf0855a842c5b5c391dd32ca273b09e86abf8367572073bd1edfc52bc44446b"}, + {file = "rpds_py-0.10.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:69b857a7d8bd4f5d6e0db4086da8c46309a26e8cefdfc778c0c5cc17d4b11e08"}, + {file = "rpds_py-0.10.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:975382d9aa90dc59253d6a83a5ca72e07f4ada3ae3d6c0575ced513db322b8ec"}, + {file = "rpds_py-0.10.3-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:35fbd23c1c8732cde7a94abe7fb071ec173c2f58c0bd0d7e5b669fdfc80a2c7b"}, + {file = "rpds_py-0.10.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:106af1653007cc569d5fbb5f08c6648a49fe4de74c2df814e234e282ebc06957"}, + {file = "rpds_py-0.10.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ce5e7504db95b76fc89055c7f41e367eaadef5b1d059e27e1d6eabf2b55ca314"}, + {file = "rpds_py-0.10.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5aca759ada6b1967fcfd4336dcf460d02a8a23e6abe06e90ea7881e5c22c4de6"}, + {file = "rpds_py-0.10.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b5d4bdd697195f3876d134101c40c7d06d46c6ab25159ed5cbd44105c715278a"}, + {file = "rpds_py-0.10.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:a657250807b6efd19b28f5922520ae002a54cb43c2401e6f3d0230c352564d25"}, + {file = "rpds_py-0.10.3-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:177c9dd834cdf4dc39c27436ade6fdf9fe81484758885f2d616d5d03c0a83bd2"}, + {file = "rpds_py-0.10.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e22491d25f97199fc3581ad8dd8ce198d8c8fdb8dae80dea3512e1ce6d5fa99f"}, + {file = "rpds_py-0.10.3-cp38-cp38-macosx_10_7_x86_64.whl", hash = "sha256:2f3e1867dd574014253b4b8f01ba443b9c914e61d45f3674e452a915d6e929a3"}, + {file = "rpds_py-0.10.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:c22211c165166de6683de8136229721f3d5c8606cc2c3d1562da9a3a5058049c"}, + {file = "rpds_py-0.10.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:40bc802a696887b14c002edd43c18082cb7b6f9ee8b838239b03b56574d97f71"}, + {file = "rpds_py-0.10.3-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5e271dd97c7bb8eefda5cca38cd0b0373a1fea50f71e8071376b46968582af9b"}, + {file = "rpds_py-0.10.3-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:95cde244e7195b2c07ec9b73fa4c5026d4a27233451485caa1cd0c1b55f26dbd"}, + {file = "rpds_py-0.10.3-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:08a80cf4884920863623a9ee9a285ee04cef57ebedc1cc87b3e3e0f24c8acfe5"}, + {file = "rpds_py-0.10.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:763ad59e105fca09705d9f9b29ecffb95ecdc3b0363be3bb56081b2c6de7977a"}, + {file = "rpds_py-0.10.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:187700668c018a7e76e89424b7c1042f317c8df9161f00c0c903c82b0a8cac5c"}, + {file = "rpds_py-0.10.3-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:5267cfda873ad62591b9332fd9472d2409f7cf02a34a9c9cb367e2c0255994bf"}, + {file = "rpds_py-0.10.3-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:2ed83d53a8c5902ec48b90b2ac045e28e1698c0bea9441af9409fc844dc79496"}, + {file = "rpds_py-0.10.3-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:255f1a10ae39b52122cce26ce0781f7a616f502feecce9e616976f6a87992d6b"}, + {file = "rpds_py-0.10.3-cp38-none-win32.whl", hash = "sha256:a019a344312d0b1f429c00d49c3be62fa273d4a1094e1b224f403716b6d03be1"}, + {file = "rpds_py-0.10.3-cp38-none-win_amd64.whl", hash = "sha256:efb9ece97e696bb56e31166a9dd7919f8f0c6b31967b454718c6509f29ef6fee"}, + {file = "rpds_py-0.10.3-cp39-cp39-macosx_10_7_x86_64.whl", hash = "sha256:570cc326e78ff23dec7f41487aa9c3dffd02e5ee9ab43a8f6ccc3df8f9327623"}, + {file = "rpds_py-0.10.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:cff7351c251c7546407827b6a37bcef6416304fc54d12d44dbfecbb717064717"}, + {file = "rpds_py-0.10.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:177914f81f66c86c012311f8c7f46887ec375cfcfd2a2f28233a3053ac93a569"}, + {file = "rpds_py-0.10.3-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:448a66b8266de0b581246ca7cd6a73b8d98d15100fb7165974535fa3b577340e"}, + {file = "rpds_py-0.10.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3bbac1953c17252f9cc675bb19372444aadf0179b5df575ac4b56faaec9f6294"}, + {file = "rpds_py-0.10.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9dd9d9d9e898b9d30683bdd2b6c1849449158647d1049a125879cb397ee9cd12"}, + {file = "rpds_py-0.10.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e8c71ea77536149e36c4c784f6d420ffd20bea041e3ba21ed021cb40ce58e2c9"}, + {file = "rpds_py-0.10.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:16a472300bc6c83fe4c2072cc22b3972f90d718d56f241adabc7ae509f53f154"}, + {file = "rpds_py-0.10.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:b9255e7165083de7c1d605e818025e8860636348f34a79d84ec533546064f07e"}, + {file = "rpds_py-0.10.3-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:53d7a3cd46cdc1689296348cb05ffd4f4280035770aee0c8ead3bbd4d6529acc"}, + {file = "rpds_py-0.10.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:22da15b902f9f8e267020d1c8bcfc4831ca646fecb60254f7bc71763569f56b1"}, + {file = "rpds_py-0.10.3-cp39-none-win32.whl", hash = "sha256:850c272e0e0d1a5c5d73b1b7871b0a7c2446b304cec55ccdb3eaac0d792bb065"}, + {file = "rpds_py-0.10.3-cp39-none-win_amd64.whl", hash = "sha256:de61e424062173b4f70eec07e12469edde7e17fa180019a2a0d75c13a5c5dc57"}, + {file = "rpds_py-0.10.3-pp310-pypy310_pp73-macosx_10_7_x86_64.whl", hash = "sha256:af247fd4f12cca4129c1b82090244ea5a9d5bb089e9a82feb5a2f7c6a9fe181d"}, + {file = "rpds_py-0.10.3-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:3ad59efe24a4d54c2742929001f2d02803aafc15d6d781c21379e3f7f66ec842"}, + {file = "rpds_py-0.10.3-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:642ed0a209ced4be3a46f8cb094f2d76f1f479e2a1ceca6de6346a096cd3409d"}, + {file = "rpds_py-0.10.3-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:37d0c59548ae56fae01c14998918d04ee0d5d3277363c10208eef8c4e2b68ed6"}, + {file = "rpds_py-0.10.3-pp310-pypy310_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:aad6ed9e70ddfb34d849b761fb243be58c735be6a9265b9060d6ddb77751e3e8"}, + {file = "rpds_py-0.10.3-pp310-pypy310_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8f94fdd756ba1f79f988855d948ae0bad9ddf44df296770d9a58c774cfbcca72"}, + {file = "rpds_py-0.10.3-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:77076bdc8776a2b029e1e6ffbe6d7056e35f56f5e80d9dc0bad26ad4a024a762"}, + {file = "rpds_py-0.10.3-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:87d9b206b1bd7a0523375dc2020a6ce88bca5330682ae2fe25e86fd5d45cea9c"}, + {file = "rpds_py-0.10.3-pp310-pypy310_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:8efaeb08ede95066da3a3e3c420fcc0a21693fcd0c4396d0585b019613d28515"}, + {file = "rpds_py-0.10.3-pp310-pypy310_pp73-musllinux_1_2_i686.whl", hash = "sha256:a4d9bfda3f84fc563868fe25ca160c8ff0e69bc4443c5647f960d59400ce6557"}, + {file = "rpds_py-0.10.3-pp310-pypy310_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:d27aa6bbc1f33be920bb7adbb95581452cdf23005d5611b29a12bb6a3468cc95"}, + {file = "rpds_py-0.10.3-pp38-pypy38_pp73-macosx_10_7_x86_64.whl", hash = "sha256:ed8313809571a5463fd7db43aaca68ecb43ca7a58f5b23b6e6c6c5d02bdc7882"}, + {file = "rpds_py-0.10.3-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:e10e6a1ed2b8661201e79dff5531f8ad4cdd83548a0f81c95cf79b3184b20c33"}, + {file = "rpds_py-0.10.3-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:015de2ce2af1586ff5dc873e804434185199a15f7d96920ce67e50604592cae9"}, + {file = "rpds_py-0.10.3-pp38-pypy38_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ae87137951bb3dc08c7d8bfb8988d8c119f3230731b08a71146e84aaa919a7a9"}, + {file = "rpds_py-0.10.3-pp38-pypy38_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0bb4f48bd0dd18eebe826395e6a48b7331291078a879295bae4e5d053be50d4c"}, + {file = "rpds_py-0.10.3-pp38-pypy38_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:09362f86ec201288d5687d1dc476b07bf39c08478cde837cb710b302864e7ec9"}, + {file = "rpds_py-0.10.3-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:821392559d37759caa67d622d0d2994c7a3f2fb29274948ac799d496d92bca73"}, + {file = "rpds_py-0.10.3-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:7170cbde4070dc3c77dec82abf86f3b210633d4f89550fa0ad2d4b549a05572a"}, + {file = "rpds_py-0.10.3-pp38-pypy38_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:5de11c041486681ce854c814844f4ce3282b6ea1656faae19208ebe09d31c5b8"}, + {file = "rpds_py-0.10.3-pp38-pypy38_pp73-musllinux_1_2_i686.whl", hash = "sha256:4ed172d0c79f156c1b954e99c03bc2e3033c17efce8dd1a7c781bc4d5793dfac"}, + {file = "rpds_py-0.10.3-pp38-pypy38_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:11fdd1192240dda8d6c5d18a06146e9045cb7e3ba7c06de6973000ff035df7c6"}, + {file = "rpds_py-0.10.3-pp39-pypy39_pp73-macosx_10_7_x86_64.whl", hash = "sha256:f602881d80ee4228a2355c68da6b296a296cd22bbb91e5418d54577bbf17fa7c"}, + {file = "rpds_py-0.10.3-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:691d50c99a937709ac4c4cd570d959a006bd6a6d970a484c84cc99543d4a5bbb"}, + {file = "rpds_py-0.10.3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:24cd91a03543a0f8d09cb18d1cb27df80a84b5553d2bd94cba5979ef6af5c6e7"}, + {file = "rpds_py-0.10.3-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:fc2200e79d75b5238c8d69f6a30f8284290c777039d331e7340b6c17cad24a5a"}, + {file = "rpds_py-0.10.3-pp39-pypy39_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ea65b59882d5fa8c74a23f8960db579e5e341534934f43f3b18ec1839b893e41"}, + {file = "rpds_py-0.10.3-pp39-pypy39_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:829e91f3a8574888b73e7a3feb3b1af698e717513597e23136ff4eba0bc8387a"}, + {file = "rpds_py-0.10.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eab75a8569a095f2ad470b342f2751d9902f7944704f0571c8af46bede438475"}, + {file = "rpds_py-0.10.3-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:061c3ff1f51ecec256e916cf71cc01f9975af8fb3af9b94d3c0cc8702cfea637"}, + {file = "rpds_py-0.10.3-pp39-pypy39_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:39d05e65f23a0fe897b6ac395f2a8d48c56ac0f583f5d663e0afec1da89b95da"}, + {file = "rpds_py-0.10.3-pp39-pypy39_pp73-musllinux_1_2_i686.whl", hash = "sha256:4eca20917a06d2fca7628ef3c8b94a8c358f6b43f1a621c9815243462dcccf97"}, + {file = "rpds_py-0.10.3-pp39-pypy39_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:e8d0f0eca087630d58b8c662085529781fd5dc80f0a54eda42d5c9029f812599"}, + {file = "rpds_py-0.10.3.tar.gz", hash = "sha256:fcc1ebb7561a3e24a6588f7c6ded15d80aec22c66a070c757559b57b17ffd1cb"}, ] [[package]] @@ -6371,28 +6498,28 @@ files = [ [[package]] name = "ruff" -version = "0.0.286" +version = "0.0.288" description = "An extremely fast Python linter, written in Rust." optional = false python-versions = ">=3.7" files = [ - {file = "ruff-0.0.286-py3-none-macosx_10_7_x86_64.whl", hash = "sha256:8e22cb557e7395893490e7f9cfea1073d19a5b1dd337f44fd81359b2767da4e9"}, - {file = "ruff-0.0.286-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:68ed8c99c883ae79a9133cb1a86d7130feee0397fdf5ba385abf2d53e178d3fa"}, - {file = "ruff-0.0.286-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8301f0bb4ec1a5b29cfaf15b83565136c47abefb771603241af9d6038f8981e8"}, - {file = "ruff-0.0.286-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:acc4598f810bbc465ce0ed84417ac687e392c993a84c7eaf3abf97638701c1ec"}, - {file = "ruff-0.0.286-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:88c8e358b445eb66d47164fa38541cfcc267847d1e7a92dd186dddb1a0a9a17f"}, - {file = "ruff-0.0.286-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:0433683d0c5dbcf6162a4beb2356e820a593243f1fa714072fec15e2e4f4c939"}, - {file = "ruff-0.0.286-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ddb61a0c4454cbe4623f4a07fef03c5ae921fe04fede8d15c6e36703c0a73b07"}, - {file = "ruff-0.0.286-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:47549c7c0be24c8ae9f2bce6f1c49fbafea83bca80142d118306f08ec7414041"}, - {file = "ruff-0.0.286-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:559aa793149ac23dc4310f94f2c83209eedb16908a0343663be19bec42233d25"}, - {file = "ruff-0.0.286-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:d73cfb1c3352e7aa0ce6fb2321f36fa1d4a2c48d2ceac694cb03611ddf0e4db6"}, - {file = "ruff-0.0.286-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:3dad93b1f973c6d1db4b6a5da8690c5625a3fa32bdf38e543a6936e634b83dc3"}, - {file = "ruff-0.0.286-py3-none-musllinux_1_2_i686.whl", hash = "sha256:26afc0851f4fc3738afcf30f5f8b8612a31ac3455cb76e611deea80f5c0bf3ce"}, - {file = "ruff-0.0.286-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:9b6b116d1c4000de1b9bf027131dbc3b8a70507788f794c6b09509d28952c512"}, - {file = "ruff-0.0.286-py3-none-win32.whl", hash = "sha256:556e965ac07c1e8c1c2d759ac512e526ecff62c00fde1a046acb088d3cbc1a6c"}, - {file = "ruff-0.0.286-py3-none-win_amd64.whl", hash = "sha256:5d295c758961376c84aaa92d16e643d110be32add7465e197bfdaec5a431a107"}, - {file = "ruff-0.0.286-py3-none-win_arm64.whl", hash = "sha256:1d6142d53ab7f164204b3133d053c4958d4d11ec3a39abf23a40b13b0784e3f0"}, - {file = "ruff-0.0.286.tar.gz", hash = "sha256:f1e9d169cce81a384a26ee5bb8c919fe9ae88255f39a1a69fd1ebab233a85ed2"}, + {file = "ruff-0.0.288-py3-none-macosx_10_7_x86_64.whl", hash = "sha256:64c01615b8640c703a56a1eac3114a653166eafa5d416ffc9e6cafbfb86ab927"}, + {file = "ruff-0.0.288-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:84691fd3c8edd705c27eb7ccf745a3530c31e4c83010f9ce20e0b9eb0578f099"}, + {file = "ruff-0.0.288-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e08c81394ae272b1595580dad1bfc62de72d9356c51e76b5c2fdd546f84e6168"}, + {file = "ruff-0.0.288-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:db1de2ac1de219f29c12940b429fe365974c3d9f69464c4660c06e4b4b284dba"}, + {file = "ruff-0.0.288-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bd9977eee17d7f29beca74b478f6930c7dd006d486bac615c849a3436384fc28"}, + {file = "ruff-0.0.288-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:2d5df4a49eaa11536776b1efcc4e88e373b205a958712185de8e4ae287397614"}, + {file = "ruff-0.0.288-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:10feeabd15e2c6e06bce75aa97e806009cf909261cd124f24ef832385914aae9"}, + {file = "ruff-0.0.288-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0496556da7b413279370cae7de001a0415279e9318dc1fabd447a3ca7b398bce"}, + {file = "ruff-0.0.288-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ef9a6563bbacfc7afdba04722d742db4f1961ab6f398a2e305b43c21d418c149"}, + {file = "ruff-0.0.288-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:ea0535d48f674d6a6bf1e6fb1a18c40622cb6496b0994cfdcd7aec763ef8b589"}, + {file = "ruff-0.0.288-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:e450e50a936409439bf4e28e85412622693350cf4da89c69e1f14af21ddbc467"}, + {file = "ruff-0.0.288-py3-none-musllinux_1_2_i686.whl", hash = "sha256:28ee03358e4eb89e843cb4fd9cf0406eb603a7e060436ffc623b29544e374c2b"}, + {file = "ruff-0.0.288-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:13d1e6cef389dc0238ef0e97e25561c925bf255d0f59f70ed2d6bd0a13fdd7b0"}, + {file = "ruff-0.0.288-py3-none-win32.whl", hash = "sha256:7534da2f1e724b87a5041615652bca7c6e721f90ae3a01d1d8e965d08a615038"}, + {file = "ruff-0.0.288-py3-none-win_amd64.whl", hash = "sha256:73066b1da66b3d4942cce8c90fd6e09108851e0867a5f7071255d1b99aee3e75"}, + {file = "ruff-0.0.288-py3-none-win_arm64.whl", hash = "sha256:6ca84861bf046e4365e20f4d664dc0aa02b377a6896a393dad716e033ac47a65"}, + {file = "ruff-0.0.288.tar.gz", hash = "sha256:71eb3e09cb47cc02c13c6dc5561055b913572995cf5fa8286948f938bc464621"}, ] [[package]] @@ -6651,19 +6778,40 @@ win32 = ["pywin32"] [[package]] name = "setuptools" -version = "68.1.2" +version = "68.2.2" description = "Easily download, build, install, upgrade, and uninstall Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "setuptools-68.1.2-py3-none-any.whl", hash = "sha256:3d8083eed2d13afc9426f227b24fd1659489ec107c0e86cec2ffdde5c92e790b"}, - {file = "setuptools-68.1.2.tar.gz", hash = "sha256:3d4dfa6d95f1b101d695a6160a7626e15583af71a5f52176efa5d39a054d475d"}, + {file = "setuptools-68.2.2-py3-none-any.whl", hash = "sha256:b454a35605876da60632df1a60f736524eb73cc47bbc9f3f1ef1b644de74fd2a"}, + {file = "setuptools-68.2.2.tar.gz", hash = "sha256:4ac1475276d2f1c48684874089fefcd83bd7162ddaafb81fac866ba0db282a87"}, ] [package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5,<=7.1.2)", "sphinx-favicon", "sphinx-hoverxref (<2)", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (==0.8.3)", "sphinx-reredirects", "sphinxcontrib-towncrier"] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-hoverxref (<2)", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-ruff", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] -testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] +testing-integration = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "packaging (>=23.1)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] + +[[package]] +name = "setuptools-scm" +version = "7.1.0" +description = "the blessed package to manage your versions by scm tags" +optional = false +python-versions = ">=3.7" +files = [ + {file = "setuptools_scm-7.1.0-py3-none-any.whl", hash = "sha256:73988b6d848709e2af142aa48c986ea29592bbcfca5375678064708205253d8e"}, + {file = "setuptools_scm-7.1.0.tar.gz", hash = "sha256:6c508345a771aad7d56ebff0e70628bf2b0ec7573762be9960214730de278f27"}, +] + +[package.dependencies] +packaging = ">=20.0" +setuptools = "*" +tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +typing-extensions = "*" + +[package.extras] +test = ["pytest (>=6.2)", "virtualenv (>20)"] +toml = ["setuptools (>=42)"] [[package]] name = "shap" @@ -6741,13 +6889,13 @@ files = [ [[package]] name = "smart-open" -version = "6.3.0" +version = "6.4.0" description = "Utils for streaming large files (S3, HDFS, GCS, Azure Blob Storage, gzip, bz2...)" optional = false python-versions = ">=3.6,<4.0" files = [ - {file = "smart_open-6.3.0-py3-none-any.whl", hash = "sha256:b4c9ae193ad6d3e7add50944b86afa0d150bd821ab8ec21edb26d9a06b66f6a8"}, - {file = "smart_open-6.3.0.tar.gz", hash = "sha256:d5238825fe9a9340645fac3d75b287c08fbb99fb2b422477de781c9f5f09e019"}, + {file = "smart_open-6.4.0-py3-none-any.whl", hash = "sha256:8d3ef7e6997e8e42dd55c74166ed21e6ac70664caa32dd940b26d54a8f6b4142"}, + {file = "smart_open-6.4.0.tar.gz", hash = "sha256:be3c92c246fbe80ebce8fbacb180494a481a77fcdcb7c1aadb2ea5b9c2bee8b9"}, ] [package.extras] @@ -6905,13 +7053,13 @@ files = [ [[package]] name = "spacy-loggers" -version = "1.0.4" +version = "1.0.5" description = "Logging utilities for SpaCy" optional = false python-versions = ">=3.6" files = [ - {file = "spacy-loggers-1.0.4.tar.gz", hash = "sha256:e6f983bf71230091d5bb7b11bf64bd54415eca839108d5f83d9155d0ba93bf28"}, - {file = "spacy_loggers-1.0.4-py3-none-any.whl", hash = "sha256:e050bf2e63208b2f096b777e494971c962ad7c1dc997641c8f95c622550044ae"}, + {file = "spacy-loggers-1.0.5.tar.gz", hash = "sha256:d60b0bdbf915a60e516cc2e653baeff946f0cfc461b452d11a4d5458c6fe5f24"}, + {file = "spacy_loggers-1.0.5-py3-none-any.whl", hash = "sha256:196284c9c446cc0cdb944005384270d775fdeaf4f494d8e269466cfa497ef645"}, ] [[package]] @@ -6958,13 +7106,13 @@ test = ["pyshacl", "pytest"] [[package]] name = "sphinx" -version = "7.2.5" +version = "7.2.6" description = "Python documentation generator" optional = false python-versions = ">=3.9" files = [ - {file = "sphinx-7.2.5-py3-none-any.whl", hash = "sha256:9269f9ed2821c9ebd30e4204f5c2339f5d4980e377bc89cb2cb6f9b17409c20a"}, - {file = "sphinx-7.2.5.tar.gz", hash = "sha256:1a9290001b75c497fd087e92b0334f1bbfa1a1ae7fddc084990c4b7bd1130b88"}, + {file = "sphinx-7.2.6-py3-none-any.whl", hash = "sha256:1e09160a40b956dc623c910118fa636da93bd3ca0b9876a7b3df90f07d691560"}, + {file = "sphinx-7.2.6.tar.gz", hash = "sha256:9a5160e1ea90688d5963ba09a2dcd8bdd526620edbb65c328728f1b2228d5ab5"}, ] [package.dependencies] @@ -7217,7 +7365,7 @@ files = [ ] [package.dependencies] -greenlet = {version = "!=0.4.17", optional = true, markers = "python_version >= \"3\" and (platform_machine == \"win32\" or platform_machine == \"WIN32\" or platform_machine == \"AMD64\" or platform_machine == \"amd64\" or platform_machine == \"x86_64\" or platform_machine == \"ppc64le\" or platform_machine == \"aarch64\" or extra == \"asyncio\")"} +greenlet = {version = "!=0.4.17", optional = true, markers = "python_version >= \"3\" and (platform_machine == \"aarch64\" or platform_machine == \"ppc64le\" or platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"win32\" or platform_machine == \"WIN32\" or extra == \"asyncio\")"} [package.extras] aiomysql = ["aiomysql", "greenlet (!=0.4.17)"] @@ -7558,6 +7706,17 @@ webencodings = ">=0.4" doc = ["sphinx", "sphinx_rtd_theme"] test = ["flake8", "isort", "pytest"] +[[package]] +name = "tokenize-rt" +version = "5.2.0" +description = "A wrapper around the stdlib `tokenize` which roundtrips." +optional = false +python-versions = ">=3.8" +files = [ + {file = "tokenize_rt-5.2.0-py2.py3-none-any.whl", hash = "sha256:b79d41a65cfec71285433511b50271b05da3584a1da144a0752e9c621a285289"}, + {file = "tokenize_rt-5.2.0.tar.gz", hash = "sha256:9fe80f8a5c1edad2d3ede0f37481cc0cc1538a2f442c9c2f9e4feacd2792d054"}, +] + [[package]] name = "tokenizers" version = "0.13.3" @@ -7634,6 +7793,17 @@ files = [ {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, ] +[[package]] +name = "tomlkit" +version = "0.12.1" +description = "Style preserving TOML library" +optional = false +python-versions = ">=3.7" +files = [ + {file = "tomlkit-0.12.1-py3-none-any.whl", hash = "sha256:712cbd236609acc6a3e2e97253dfc52d4c2082982a88f61b640ecf0817eab899"}, + {file = "tomlkit-0.12.1.tar.gz", hash = "sha256:38e1ff8edb991273ec9f6181244a6a391ac30e9f5098e7535640ea6be97a7c86"}, +] + [[package]] name = "toolz" version = "0.12.0" @@ -7787,18 +7957,18 @@ telegram = ["requests"] [[package]] name = "traitlets" -version = "5.9.0" +version = "5.10.0" description = "Traitlets Python configuration system" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "traitlets-5.9.0-py3-none-any.whl", hash = "sha256:9e6ec080259b9a5940c797d58b613b5e31441c2257b87c2e795c5228ae80d2d8"}, - {file = "traitlets-5.9.0.tar.gz", hash = "sha256:f6cde21a9c68cf756af02035f72d5a723bf607e862e7be33ece505abf4a3bad9"}, + {file = "traitlets-5.10.0-py3-none-any.whl", hash = "sha256:417745a96681fbb358e723d5346a547521f36e9bd0d50ba7ab368fff5d67aa54"}, + {file = "traitlets-5.10.0.tar.gz", hash = "sha256:f584ea209240466e66e91f3c81aa7d004ba4cf794990b0c775938a1544217cd1"}, ] [package.extras] docs = ["myst-parser", "pydata-sphinx-theme", "sphinx"] -test = ["argcomplete (>=2.0)", "pre-commit", "pytest", "pytest-mock"] +test = ["argcomplete (>=3.0.3)", "mypy (>=1.5.1)", "pre-commit", "pytest (>=7.0,<7.5)", "pytest-mock", "pytest-mypy-testing"] [[package]] name = "transformers" @@ -7992,13 +8162,13 @@ standard = ["colorama (>=0.4)", "httptools (>=0.5.0)", "python-dotenv (>=0.13)", [[package]] name = "virtualenv" -version = "20.24.4" +version = "20.24.5" description = "Virtual Python Environment builder" optional = false python-versions = ">=3.7" files = [ - {file = "virtualenv-20.24.4-py3-none-any.whl", hash = "sha256:29c70bb9b88510f6414ac3e55c8b413a1f96239b6b789ca123437d5e892190cb"}, - {file = "virtualenv-20.24.4.tar.gz", hash = "sha256:772b05bfda7ed3b8ecd16021ca9716273ad9f4467c801f27e83ac73430246dca"}, + {file = "virtualenv-20.24.5-py3-none-any.whl", hash = "sha256:b80039f280f4919c77b30f1c23294ae357c4c8701042086e3fc005963e4e537b"}, + {file = "virtualenv-20.24.5.tar.gz", hash = "sha256:e8361967f6da6fbdf1426483bfe9fca8287c242ac0bc30429905721cefbff752"}, ] [package.dependencies] @@ -8078,13 +8248,13 @@ files = [ [[package]] name = "websocket-client" -version = "1.6.2" +version = "1.6.3" description = "WebSocket client for Python with low level API options" optional = false python-versions = ">=3.8" files = [ - {file = "websocket-client-1.6.2.tar.gz", hash = "sha256:53e95c826bf800c4c465f50093a8c4ff091c7327023b10bfaff40cf1ef170eaa"}, - {file = "websocket_client-1.6.2-py3-none-any.whl", hash = "sha256:ce54f419dfae71f4bdba69ebe65bf7f0a93fe71bc009ad3a010aacc3eebad537"}, + {file = "websocket-client-1.6.3.tar.gz", hash = "sha256:3aad25d31284266bcfcfd1fd8a743f63282305a364b8d0948a43bd606acc652f"}, + {file = "websocket_client-1.6.3-py3-none-any.whl", hash = "sha256:6cfc30d051ebabb73a5fa246efdcc14c8fbebbd0330f8984ac3bb6d9edd2ad03"}, ] [package.extras] @@ -8204,13 +8374,13 @@ test = ["pytest (>=6.0.0)", "setuptools (>=65)"] [[package]] name = "widgetsnbextension" -version = "4.0.8" +version = "4.0.9" description = "Jupyter interactive widgets for Jupyter Notebook" optional = false python-versions = ">=3.7" files = [ - {file = "widgetsnbextension-4.0.8-py3-none-any.whl", hash = "sha256:2e37f0ce9da11651056280c7efe96f2db052fe8fc269508e3724f5cbd6c93018"}, - {file = "widgetsnbextension-4.0.8.tar.gz", hash = "sha256:9ec291ba87c2dfad42c3d5b6f68713fa18be1acd7476569516b2431682315c17"}, + {file = "widgetsnbextension-4.0.9-py3-none-any.whl", hash = "sha256:91452ca8445beb805792f206e560c1769284267a30ceb1cec9f5bcc887d15175"}, + {file = "widgetsnbextension-4.0.9.tar.gz", hash = "sha256:3c1f5e46dc1166dfd40a42d685e6a51396fd34ff878742a3e47c6f0cc4a2a385"}, ] [[package]] @@ -8633,4 +8803,4 @@ report = ["category-encoders", "kaleido", "pillow", "plotly", "pybtex", "pydanti [metadata] lock-version = "2.0" python-versions = ">=3.9, <3.12" -content-hash = "d007665f76cbea0de1fe458ba875062942018187fc98600d43213e2d83ebb8ec" +content-hash = "f2196dd09e7b73ebc30f14411aaeaaad2810aeb45b43c02ab3adfc07589728f4" diff --git a/pyproject.toml b/pyproject.toml index 43ca44009..87063a1e0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,12 +69,12 @@ pillow = "^9.5.0" pytest = "^7.1.1" pre-commit = "^2.17.0" black = "^22.1.0" -pyproject-flake8 = "^5.0.4" pytest-cov = "^3.0.0" codecov = "^2.1.13" nbstripout = "^0.6.1" mypy = "^1.0.0" -ruff = "^0.0.286" +ruff = "^0.0.288" +nbqa = { version = "^1.7.0", extras = ["toolchain"] } [tool.poetry.group.docs.dependencies] numpydoc = "^1.2" @@ -193,10 +193,6 @@ convention = "numpy" [tool.ruff.pycodestyle] max-doc-length = 88 -[tool.flake8] -max-line-length = 88 -extend-ignore = ["E203", "W503", "F401"] - [tool.pytest.ini_options] markers = [ "integration_test: marks tests as integration tests", diff --git a/tests/cyclops/data/test_slicer.py b/tests/cyclops/data/test_slicer.py index b617adab8..35f6f7d3c 100644 --- a/tests/cyclops/data/test_slicer.py +++ b/tests/cyclops/data/test_slicer.py @@ -30,16 +30,13 @@ def visits_table() -> pd.DataFrame: """Get the visits table.""" ops = qo.Sequential( - [ - qo.ConditionEquals("gender_source_value", "M"), # type: ignore - qo.Rename({"race_source_value": "race"}), # type: ignore - ], + qo.ConditionEquals("gender_source_value", "M"), # type: ignore + qo.Rename({"race_source_value": "race"}), # type: ignore ) - - persons_qi = SYNTHEA.person(ops=ops) - return SYNTHEA.visit_occurrence( - join=qo.JoinArgs(join_table=persons_qi.query, on="person_id"), - ).run() + persons = SYNTHEA.person() + persons = persons.ops(ops) + visits = SYNTHEA.visit_occurrence() + return visits.join(persons, on="person_id").run() def measurement_table() -> pd.DataFrame: diff --git a/tests/cyclops/query/test_interface.py b/tests/cyclops/query/test_interface.py index b3f326d1c..51bd5a671 100644 --- a/tests/cyclops/query/test_interface.py +++ b/tests/cyclops/query/test_interface.py @@ -8,7 +8,7 @@ import pandas as pd import pytest -from cyclops.query.interface import QueryInterface, QueryInterfaceProcessed +from cyclops.query.interface import QueryInterface from cyclops.query.omop import OMOPQuerier @@ -74,25 +74,3 @@ def test_query_interface_integration(): visits_df = synthea_db.run_query("SELECT * FROM cdm_synthea10.visit_occurrence") assert isinstance(visits_df, pd.DataFrame) assert visits_df.shape[0] > 0 - - -@patch("cyclops.query.orm.Database") -@patch("sqlalchemy.sql.selectable.Subquery") -def test_query_interface_processed( - database, - query, - test_data, -): - """Test QueryInterface.""" - # Identity fn for post-processing. - query_interface = QueryInterfaceProcessed(database, query, lambda x: x) - query_interface.run() - - query_interface._data = test_data - path = os.path.join("test_save", "test_features.parquet") - query_interface.save(path) - loaded_data = pd.read_parquet(path) - assert loaded_data.equals(test_data) - shutil.rmtree("test_save") - query_interface.clear_data() - assert not query_interface.data diff --git a/tests/cyclops/query/test_mimiciv.py b/tests/cyclops/query/test_mimiciv.py index c881b5e3c..77422d85c 100644 --- a/tests/cyclops/query/test_mimiciv.py +++ b/tests/cyclops/query/test_mimiciv.py @@ -17,10 +17,6 @@ def test_mimiciv_querier(): assert len(diagnoses) == 10 assert "long_title" in diagnoses - care_units = querier.care_units().run(limit=10) - assert "admit" in care_units - assert "discharge" in care_units - lab_events = querier.labevents().run(limit=10) assert "category" in lab_events diff --git a/tests/cyclops/query/test_omop.py b/tests/cyclops/query/test_omop.py index 7a8f78faa..f8d23e094 100644 --- a/tests/cyclops/query/test_omop.py +++ b/tests/cyclops/query/test_omop.py @@ -11,16 +11,14 @@ def test_omop_querier_synthea(): """Test OMOPQuerier on synthea data.""" querier = OMOPQuerier("cdm_synthea10", database="synthea_integration_test") ops = qo.Sequential( - [ - qo.ConditionEquals("gender_source_value", "M"), - qo.Rename({"race_source_value": "race"}), - ], + qo.ConditionEquals("gender_source_value", "M"), + qo.Rename({"race_source_value": "race"}), ) - persons_qi = querier.person(ops=ops) - visits = querier.visit_occurrence( - join=qo.JoinArgs(join_table=persons_qi.query, on="person_id"), - ).run() - persons = persons_qi.run() + persons = querier.person() + persons = persons.ops(ops) + visits = querier.visit_occurrence() + visits = visits.join(persons, "person_id").run() + persons = persons.run() observations = querier.observation().run() measurements = querier.measurement().run() visit_details = querier.visit_detail().run() diff --git a/tests/cyclops/query/test_ops.py b/tests/cyclops/query/test_ops.py index bab890dbe..9613ab0f2 100644 --- a/tests/cyclops/query/test_ops.py +++ b/tests/cyclops/query/test_ops.py @@ -42,7 +42,6 @@ Sequential, Substring, Trim, - Union, _addindent, _none_add, _process_checks, @@ -61,15 +60,15 @@ def table_input(): @pytest.fixture() -def visits_input(): +def visits_table(): """Test visits table input.""" - return QUERIER.visit_occurrence().query + return QUERIER.visit_occurrence() @pytest.fixture() -def measurements_input(): +def measurements_table(): """Test measurement table input.""" - return QUERIER.measurement().query + return QUERIER.measurement() def test__none_add(): @@ -146,22 +145,20 @@ def test_add_child_operation_dot_name(self): @pytest.mark.integration_test() -def test_drop(visits_input): +def test_drop(visits_table): """Test Drop.""" - visits = Drop("care_site_source_value")(visits_input) - visits = QUERIER.get_interface(visits).run() + visits = visits_table.ops(Drop("care_site_source_value")).run() assert "care_site_source_value" not in visits.columns @pytest.mark.integration_test() -def test_fill_null(visits_input): +def test_fill_null(visits_table): """Test FillNull.""" - visits_before = QUERIER.get_interface(visits_input).run() + visits_before = visits_table.run() unique_before = visits_before["preceding_visit_occurrence_id"].unique() - visits = FillNull(["preceding_visit_occurrence_id", "care_site_id"], 0)( - visits_input, - ) - visits_after = QUERIER.get_interface(visits).run() + visits_after = visits_table.ops( + FillNull(["preceding_visit_occurrence_id", "care_site_id"], 0), + ).run() unique_after = visits_after["preceding_visit_occurrence_id"].unique() assert visits_after["preceding_visit_occurrence_id"].isna().sum() == 0 assert visits_after["care_site_id"].isna().sum() == 0 @@ -169,12 +166,13 @@ def test_fill_null(visits_input): assert len(unique_after) == len(unique_before) assert len(visits_after["care_site_id"].unique()) == 1 - visits = FillNull( - ["preceding_visit_occurrence_id", "care_site_id"], - [0, -99], - ["col1", "col2"], - )(visits_input) - visits_after = QUERIER.get_interface(visits).run() + visits_after = visits_table.ops( + FillNull( + ["preceding_visit_occurrence_id", "care_site_id"], + [0, -99], + ["col1", "col2"], + ), + ).run() assert visits_after["preceding_visit_occurrence_id"].isna().sum() != 0 assert visits_after["care_site_id"].isna().sum() != 0 assert visits_after["col1"].isna().sum() == 0 @@ -184,51 +182,46 @@ def test_fill_null(visits_input): @pytest.mark.integration_test() -def test_add_column(visits_input): +def test_add_column(visits_table): """Test AddColumn.""" ops = Sequential( - [ - Literal(2, "test_col1"), - Literal(3, "test_col2"), - AddColumn("test_col1", "test_col2", new_col_labels="test_col3"), - ], + Literal(2, "test_col1"), + Literal(3, "test_col2"), + AddColumn("test_col1", "test_col2", new_col_labels="test_col3"), ) - visits = QUERIER.get_interface(visits_input, ops=ops).run() + visits = visits_table.ops(ops).run() assert "test_col3" in visits.columns assert (visits["test_col3"] == 5).all() ops = Sequential( - [ - Literal(2, "test_col1"), - Literal(3, "test_col2"), - AddColumn( - "test_col1", - "test_col2", - negative=True, - new_col_labels="test_col3", - ), - ], + Literal(2, "test_col1"), + Literal(3, "test_col2"), + AddColumn( + "test_col1", + "test_col2", + negative=True, + new_col_labels="test_col3", + ), ) - visits = QUERIER.get_interface(visits_input, ops=ops).run() + visits = visits_table.ops(ops).run() assert "test_col3" in visits.columns assert (visits["test_col3"] == -1).all() @pytest.mark.integration_test() -def test_rename(visits_input): +def test_rename(visits_table): """Test Rename.""" - visits = Rename({"care_site_name": "hospital_name"})(visits_input) - visits = QUERIER.get_interface(visits).run() + rename_op = Rename({"care_site_name": "hospital_name"}) + visits = visits_table.ops(rename_op).run() assert "hospital_name" in visits.columns assert "care_site_name" not in visits.columns @pytest.mark.integration_test() -def test_literal(visits_input): +def test_literal(visits_table): """Test Literal.""" - visits = Literal(1, "new_col")(visits_input) - visits = Literal("a", "new_col2")(visits) - visits = QUERIER.get_interface(visits).run() + literal_ops = Sequential(Literal(1, "new_col"), Literal("a", "new_col2")) + visits = visits_table.ops(literal_ops).run() assert "new_col" in visits.columns assert visits["new_col"].iloc[0] == 1 assert "new_col2" in visits.columns @@ -236,88 +229,84 @@ def test_literal(visits_input): @pytest.mark.integration_test() -def test_reorder_after(visits_input): +def test_reorder_after(visits_table): """Test ReorderAfter.""" - visits = ReorderAfter("visit_concept_name", "care_site_id")(visits_input) - visits = QUERIER.get_interface(visits).run() + reorder_op = ReorderAfter("visit_concept_name", "care_site_id") + visits = visits_table.ops(reorder_op).run() assert list(visits.columns).index("care_site_id") + 1 == list(visits.columns).index( "visit_concept_name", ) @pytest.mark.integration_test() -def test_limit(visits_input): +def test_limit(visits_table): """Test Limit.""" - visits = Limit(10)(visits_input) - visits = QUERIER.get_interface(visits).run() + visits = visits_table.ops(Limit(10)).run() assert len(visits) == 10 @pytest.mark.integration_test() -def test_order_by(visits_input): +def test_order_by(visits_table): """Test OrderBy.""" - visits = OrderBy("visit_concept_name")(visits_input) - visits = QUERIER.get_interface(visits).run() + orderby_op = OrderBy("visit_concept_name") + visits = visits_table.ops(orderby_op).run() assert visits["visit_concept_name"].is_monotonic_increasing @pytest.mark.integration_test() -def test_substring(visits_input): +def test_substring(visits_table): """Test Substring.""" - visits = Substring("visit_concept_name", 0, 3, "visit_concept_name_substr")( - visits_input, - ) - visits = QUERIER.get_interface(visits).run() + substring_op = Substring("visit_concept_name", 0, 3, "visit_concept_name_substr") + visits = visits_table.ops(substring_op).run() assert visits["visit_concept_name_substr"].iloc[0] == "In" @pytest.mark.integration_test() -def test_trim(visits_input): +def test_trim(visits_table): """Test Trim.""" - visits = Trim("visit_concept_name", "visit_concept_name_trim")(visits_input) - visits = QUERIER.get_interface(visits).run() + trim_op = Trim("visit_concept_name", "visit_concept_name_trim") + visits = visits_table.ops(trim_op).run() assert visits["visit_concept_name_trim"].iloc[0] == "Inpatient Visit" @pytest.mark.integration_test() def test_extract_timestamp_component( - visits_input, + visits_table, ): """Test ExtractTimestampComponent.""" - visits = ExtractTimestampComponent( + extract_ts_op = ExtractTimestampComponent( "visit_start_date", "year", "visit_start_date_year", - )(visits_input) - visits = QUERIER.get_interface(visits).run() + ) + visits = visits_table.ops(extract_ts_op).run() assert visits["visit_start_date_year"].iloc[0] == 2021 @pytest.mark.integration_test() -def test_add_numeric(visits_input): +def test_add_numeric(visits_table): """Test AddNumeric.""" - visits = Literal(1, "new_col")(visits_input) - visits = AddNumeric("new_col", 1, "new_col_plus_1")(visits) - visits = QUERIER.get_interface(visits).run() + ops = Sequential(Literal(1, "new_col"), AddNumeric("new_col", 1, "new_col_plus_1")) + visits = visits_table.ops(ops).run() assert visits["new_col_plus_1"].iloc[0] == 2 @pytest.mark.integration_test() -def test_apply(visits_input): +def test_apply(visits_table): """Test Apply.""" - visits = Apply( + apply_op = Apply( "visit_concept_name", lambda x: x + "!", "visit_concept_name_exclaim", - )(visits_input) - visits = QUERIER.get_interface(visits).run() + ) + visits = visits_table.ops(apply_op).run() assert visits["visit_concept_name_exclaim"].iloc[0] == "Inpatient Visit!" - visits = Apply( + apply_op = Apply( ["visit_occurrence_id", "preceding_visit_occurrence_id"], lambda x, y: x + y, "sum_id", - )(visits_input) - visits = QUERIER.get_interface(visits).run() + ) + visits = visits_table.ops(apply_op).run() assert ( visits["sum_id"].iloc[0] == visits["visit_occurrence_id"].iloc[0] @@ -327,12 +316,12 @@ def test_apply(visits_input): visits["sum_id"].isna().sum() == visits["preceding_visit_occurrence_id"].isna().sum() ) - visits = Apply( + apply_op = Apply( ["visit_occurrence_id", "preceding_visit_occurrence_id"], [lambda x: x + 1, lambda x: x + 2], ["sum_id", "sum_id2"], - )(visits_input) - visits = QUERIER.get_interface(visits).run() + ) + visits = visits_table.ops(apply_op).run() assert visits["sum_id"].iloc[0] == visits["visit_occurrence_id"].iloc[0] + 1 assert ( visits["sum_id2"].iloc[0] == visits["preceding_visit_occurrence_id"].iloc[0] + 2 @@ -341,15 +330,15 @@ def test_apply(visits_input): @pytest.mark.integration_test() def test_condition_regex_match( - measurements_input, + measurements_table, ): """Test ConditionRegexMatch.""" - measurements = ConditionRegexMatch( + measurements_op = ConditionRegexMatch( "value_source_value", r"^[0-9]+(\.[0-9]+)?$", binarize_col="value_source_value_match", - )(measurements_input) - measurements = QUERIER.get_interface(measurements).run() + ) + measurements = measurements_table.ops(measurements_op).run() assert "value_source_value_match" in measurements.columns assert ( measurements["value_source_value_match"].sum() @@ -359,56 +348,62 @@ def test_condition_regex_match( @pytest.mark.integration_test() def test_group_by_aggregate( - visits_input, - measurements_input, + visits_table, + measurements_table, ): """Test GroupByAggregate.""" with pytest.raises(ValueError): - GroupByAggregate("person_id", {"person_id": ("donkey", "visit_count")})( - visits_input, + visits_table.ops( + GroupByAggregate("person_id", {"person_id": ("donkey", "visit_count")}), ) with pytest.raises(ValueError): - GroupByAggregate("person_id", {"person_id": ("count", "person_id")})( - visits_input, + visits_table.ops( + GroupByAggregate("person_id", {"person_id": ("count", "person_id")}), ) - visits_count = GroupByAggregate( - "person_id", - {"person_id": ("count", "num_visits")}, - )(visits_input) - visits_string_agg = GroupByAggregate( - "person_id", - {"visit_concept_name": ("string_agg", "visit_concept_names")}, - {"visit_concept_name": ", "}, - )(visits_input) - measurements_sum = GroupByAggregate( - "person_id", - {"value_as_number": ("sum", "value_as_number_sum")}, - )(measurements_input) - measurements_average = GroupByAggregate( - "person_id", - {"value_as_number": ("average", "value_as_number_average")}, - )(measurements_input) - measurements_min = GroupByAggregate( - "person_id", - {"value_as_number": ("min", "value_as_number_min")}, - )(measurements_input) - measurements_max = GroupByAggregate( - "person_id", - {"value_as_number": ("max", "value_as_number_max")}, - )(measurements_input) - measurements_median = GroupByAggregate( - "person_id", - {"value_as_number": ("median", "value_as_number_median")}, - )(measurements_input) - - visits_count = QUERIER.get_interface(visits_count).run() - visits_string_agg = QUERIER.get_interface(visits_string_agg).run() - measurements_sum = QUERIER.get_interface(measurements_sum).run() - measurements_average = QUERIER.get_interface(measurements_average).run() - measurements_min = QUERIER.get_interface(measurements_min).run() - measurements_max = QUERIER.get_interface(measurements_max).run() - measurements_median = QUERIER.get_interface(measurements_median).run() + visits_count = visits_table.ops( + GroupByAggregate( + "person_id", + {"person_id": ("count", "num_visits")}, + ), + ).run() + visits_string_agg = visits_table.ops( + GroupByAggregate( + "person_id", + {"visit_concept_name": ("string_agg", "visit_concept_names")}, + {"visit_concept_name": ", "}, + ), + ).run() + measurements_sum = measurements_table.ops( + GroupByAggregate( + "person_id", + {"value_as_number": ("sum", "value_as_number_sum")}, + ), + ).run() + measurements_average = measurements_table.ops( + GroupByAggregate( + "person_id", + {"value_as_number": ("average", "value_as_number_average")}, + ), + ).run() + measurements_min = measurements_table.ops( + GroupByAggregate( + "person_id", + {"value_as_number": ("min", "value_as_number_min")}, + ), + ).run() + measurements_max = measurements_table.ops( + GroupByAggregate( + "person_id", + {"value_as_number": ("max", "value_as_number_max")}, + ), + ).run() + measurements_median = measurements_table.ops( + GroupByAggregate( + "person_id", + {"value_as_number": ("median", "value_as_number_median")}, + ), + ).run() assert "num_visits" in visits_count.columns assert visits_count[visits_count["person_id"] == 33]["num_visits"][0] == 86 @@ -452,133 +447,135 @@ def test_group_by_aggregate( @pytest.mark.integration_test() -def test_drop_nulls(visits_input): +def test_drop_nulls(visits_table): """Test DropNulls.""" - visits = DropNulls("preceding_visit_occurrence_id")(visits_input) - visits = QUERIER.get_interface(visits).run() + visits = visits_table.ops(DropNulls("preceding_visit_occurrence_id")).run() assert visits["preceding_visit_occurrence_id"].isnull().sum() == 0 @pytest.mark.integration_test() -def test_condition_before_date(visits_input): +def test_condition_before_date(visits_table): """Test ConditionBeforeDate.""" - visits = ConditionBeforeDate("visit_start_date", "2018-01-01")(visits_input) - visits = QUERIER.get_interface(visits).run() + visits = visits_table.ops( + ConditionBeforeDate("visit_start_date", "2018-01-01"), + ).run() assert pd.Timestamp(visits["visit_start_date"].max()) < pd.Timestamp("2018-01-01") @pytest.mark.integration_test() -def test_condition_after_date(visits_input): +def test_condition_after_date(visits_table): """Test ConditionAfterDate.""" - visits = ConditionAfterDate("visit_start_date", "2018-01-01")(visits_input) - visits = QUERIER.get_interface(visits).run() + visits = visits_table.ops( + ConditionAfterDate("visit_start_date", "2018-01-01"), + ).run() assert pd.Timestamp(visits["visit_start_date"].min()) > pd.Timestamp("2018-01-01") @pytest.mark.integration_test() -def test_condition_in(visits_input): +def test_condition_in(visits_table): """Test ConditionIn.""" - visits = ConditionIn("visit_concept_name", ["Outpatient Visit"])(visits_input) - visits = QUERIER.get_interface(visits).run() + visits = visits_table.ops( + ConditionIn("visit_concept_name", ["Outpatient Visit"]), + ).run() assert all(visits["visit_concept_name"] == "Outpatient Visit") @pytest.mark.integration_test() -def test_condition_in_months(visits_input): +def test_condition_in_months(visits_table): """Test ConditionInMonths.""" - visits_input = Cast("visit_start_date", "timestamp")(visits_input) - visits = ConditionInMonths("visit_start_date", 6)(visits_input) - visits = QUERIER.get_interface(visits).run() + ops = Sequential( + Cast("visit_start_date", "timestamp"), + ConditionInMonths("visit_start_date", 6), + ) + visits = visits_table.ops(ops).run() assert (visits["visit_start_date"].dt.month == 6).all() @pytest.mark.integration_test() -def test_condition_in_years(visits_input): +def test_condition_in_years(visits_table): """Test ConditionInYears.""" - visits_input = Cast("visit_start_date", "timestamp")(visits_input) - visits = ConditionInYears("visit_start_date", 2018)(visits_input) - visits = QUERIER.get_interface(visits).run() + ops = Sequential( + Cast("visit_start_date", "timestamp"), + ConditionInYears("visit_start_date", 2018), + ) + visits = visits_table.ops(ops).run() assert (visits["visit_start_date"].dt.year == 2018).all() @pytest.mark.integration_test() -def test_condition_substring(visits_input): +def test_condition_substring(visits_table): """Test ConditionSubstring.""" - visits = ConditionSubstring("visit_concept_name", "Outpatient")(visits_input) - visits = QUERIER.get_interface(visits).run() + visits = visits_table.ops( + ConditionSubstring("visit_concept_name", "Outpatient"), + ).run() assert all(visits["visit_concept_name"].str.contains("Outpatient")) @pytest.mark.integration_test() -def test_condition_starts_with(visits_input): +def test_condition_starts_with(visits_table): """Test ConditionStartsWith.""" - visits = ConditionStartsWith("visit_concept_name", "Outpatient")(visits_input) - visits = QUERIER.get_interface(visits).run() + visits = visits_table.ops( + ConditionStartsWith("visit_concept_name", "Outpatient"), + ).run() assert all(visits["visit_concept_name"].str.startswith("Outpatient")) @pytest.mark.integration_test() -def test_condition_ends_with(visits_input): +def test_condition_ends_with(visits_table): """Test ConditionEndsWith.""" - visits = ConditionEndsWith("visit_concept_name", "Visit")(visits_input) - visits = QUERIER.get_interface(visits).run() + visits = visits_table.ops(ConditionEndsWith("visit_concept_name", "Visit")).run() assert all(visits["visit_concept_name"].str.endswith("Visit")) @pytest.mark.integration_test() -def test_condition_equals(visits_input): +def test_condition_equals(visits_table): """Test ConditionEquals.""" - visits = ConditionEquals("visit_concept_name", "Outpatient Visit")(visits_input) - visits = QUERIER.get_interface(visits).run() + visits = visits_table.ops( + ConditionEquals("visit_concept_name", "Outpatient Visit"), + ).run() assert all(visits["visit_concept_name"] == "Outpatient Visit") - visits = ConditionEquals("visit_concept_name", "Outpatient Visit", not_=True)( - visits_input, - ) - visits = QUERIER.get_interface(visits).run() + visits = visits_table.ops( + ConditionEquals("visit_concept_name", "Outpatient Visit", not_=True), + ).run() assert all(visits["visit_concept_name"] != "Outpatient Visit") @pytest.mark.integration_test() -def test_condition_greater_than(visits_input): +def test_condition_greater_than(visits_table): """Test ConditionGreaterThan.""" - visits = ConditionGreaterThan("visit_concept_id", 9300)(visits_input) - visits = QUERIER.get_interface(visits).run() + visits = visits_table.ops(ConditionGreaterThan("visit_concept_id", 9300)).run() assert all(visits["visit_concept_id"] > 9300) @pytest.mark.integration_test() -def test_condition_less_than(visits_input): +def test_condition_less_than(visits_table): """Test ConditionLessThan.""" - visits = ConditionLessThan("visit_concept_id", 9300)(visits_input) - visits = QUERIER.get_interface(visits).run() + visits = visits_table.ops(ConditionLessThan("visit_concept_id", 9300)).run() assert all(visits["visit_concept_id"] < 9300) @pytest.mark.integration_test() -def test_union(visits_input): +def test_union(visits_table): """Test Union.""" - visits = Union( - ConditionEquals("visit_concept_name", "Outpatient Visit")(visits_input), - )(ConditionEquals("visit_concept_name", "Emergency Room Visit")(visits_input)) - visits = QUERIER.get_interface(visits).run() + outpatient_filtered = visits_table.ops( + ConditionEquals("visit_concept_name", "Outpatient Visit"), + ) + emergency_filtered = visits_table.ops( + ConditionEquals("visit_concept_name", "Emergency Room Visit"), + ) + visits = emergency_filtered.union(outpatient_filtered).run() assert len(visits) == 4212 assert all( visits["visit_concept_name"].isin(["Outpatient Visit", "Emergency Room Visit"]), ) - visits = Union( - ConditionEquals("visit_concept_name", "Outpatient Visit")(visits_input), - union_all=True, - )(ConditionEquals("visit_concept_name", "Outpatient Visit")(visits_input)) - visits = QUERIER.get_interface(visits).run() - assert len(visits) == 8114 + visits = emergency_filtered.union_all(emergency_filtered).run() + assert len(visits) == 310 @pytest.mark.integration_test() -def test_sequential(visits_input): +def test_sequential(visits_table): """Test Sequential.""" - substr_op = Sequential( - Substring("visit_concept_name", 0, 4, "visit_concept_name_substr"), - ) + substr_op = Substring("visit_concept_name", 0, 4, "visit_concept_name_substr") operations = [ Literal(33, "const"), Rename({"care_site_name": "hospital_name"}), @@ -587,7 +584,7 @@ def test_sequential(visits_input): substr_op, ] sequential_ops = Sequential(operations) - visits = QUERIER.get_interface(visits_input, ops=sequential_ops).run() + visits = visits_table.ops(sequential_ops).run() assert "hospital_name" in visits.columns assert "visit_concept_name_exclaim" in visits.columns assert list(visits[visits["person_id"] == 33]["visit_concept_name_exclaim"])[0] == ( @@ -600,15 +597,13 @@ def test_sequential(visits_input): @pytest.mark.integration_test() -def test_or(visits_input): +def test_or(visits_table): """Test Or.""" - visits = Or( - [ - ConditionEquals("visit_concept_name", "Outpatient Visit"), - ConditionLike("visit_concept_name", "%Emergency%"), - ], - )(visits_input) - visits = QUERIER.get_interface(visits).run() + or_op = Or( + ConditionEquals("visit_concept_name", "Outpatient Visit"), + ConditionLike("visit_concept_name", "%Emergency%"), + ) + visits = visits_table.ops(or_op).run() assert len(visits) == 4212 assert all( visits["visit_concept_name"].isin(["Outpatient Visit", "Emergency Room Visit"]), @@ -616,37 +611,36 @@ def test_or(visits_input): @pytest.mark.integration_test() -def test_and(visits_input): +def test_and(visits_table): """Test And.""" - visits = And( + and_op = And( [ ConditionEquals("visit_concept_name", "Outpatient Visit"), ConditionLike("visit_concept_name", "%Emergency%", not_=True), ], - )(visits_input) - visits = QUERIER.get_interface(visits).run() + ) + visits = visits_table.ops(and_op).run() assert len(visits) == 4057 - visits = And( + and_op = And( ConditionEquals("visit_concept_name", "Outpatient Visit"), ConditionLike("visit_concept_name", "%Emergency%", not_=True), - )(visits_input) - visits = QUERIER.get_interface(visits).run() + ) + visits = visits_table.ops(and_op).run() assert len(visits) == 4057 @pytest.mark.integration_test() -def test_distinct(visits_input): +def test_distinct(visits_table): """Test Distinct.""" distinct_op = Distinct(["person_id"]) - visits = QUERIER.get_interface(visits_input, ops=distinct_op).run() + visits = visits_table.ops(distinct_op).run() assert len(visits) == 109 - visits = QUERIER.get_interface(visits_input).run() @pytest.mark.integration_test() -def test_condition_like(visits_input): +def test_condition_like(visits_table): """Test ConditionLike.""" like_op = ConditionLike("visit_concept_name", "Outpatient%") - visits = QUERIER.get_interface(visits_input, ops=like_op).run() + visits = visits_table.ops(like_op).run() assert len(visits) == 4057 assert all(visits["visit_concept_name"].str.startswith("Outpatient")) diff --git a/use_cases/common/2.1-tabular_processing.ipynb b/use_cases/common/2.1-tabular_processing.ipynb index ea116a76c..54c825594 100644 --- a/use_cases/common/2.1-tabular_processing.ipynb +++ b/use_cases/common/2.1-tabular_processing.ipynb @@ -273,7 +273,8 @@ "outputs": [], "source": [ "tab_splits = tab_vectorized.split_by_fraction(\n", - " ENCOUNTER_ID, use_case_params.SPLIT_FRACTIONS,\n", + " ENCOUNTER_ID,\n", + " use_case_params.SPLIT_FRACTIONS,\n", ")\n", "tab_train, tab_val, tab_test = tab_splits" ] diff --git a/use_cases/common/2.2-temporal_processing.ipynb b/use_cases/common/2.2-temporal_processing.ipynb index ffe95c5f8..7129e28c5 100644 --- a/use_cases/common/2.2-temporal_processing.ipynb +++ b/use_cases/common/2.2-temporal_processing.ipynb @@ -403,10 +403,15 @@ "shape = (len(aligned_timestamps), num_timesteps)\n", "\n", "arr1 = timestamp_ffill_agg(\n", - " aligned_timestamps[\"target_timestep\"], num_timesteps, fill_nan=2,\n", + " aligned_timestamps[\"target_timestep\"],\n", + " num_timesteps,\n", + " fill_nan=2,\n", ")\n", "arr2 = timestamp_ffill_agg(\n", - " aligned_timestamps[discharge_timestep], num_timesteps, val=-1, fill_nan=2,\n", + " aligned_timestamps[discharge_timestep],\n", + " num_timesteps,\n", + " val=-1,\n", + " fill_nan=2,\n", ")\n", "targets = np.minimum(arr1, arr2)\n", "targets[targets == 2] = 0\n", @@ -452,10 +457,10 @@ "outputs": [], "source": [ "# Include target\n", - "# temp_vectorized = temp_vectorized.remove_with_index(EVENT_NAME, TEMP_TARGETS)\n", - "# print(temp_vectorized.shape)\n", "temp_vectorized = temp_vectorized.concat_over_axis(\n", - " EVENT_NAME, targets, use_case_params.TEMP_TARGETS,\n", + " EVENT_NAME,\n", + " targets,\n", + " use_case_params.TEMP_TARGETS,\n", ")\n", "temp_vectorized.shape" ] @@ -564,7 +569,9 @@ "source": [ "# Combine\n", "comb_vectorized = temp_vectorized.concat_over_axis(\n", - " EVENT_NAME, tab_aggregated_vec.data, tab_aggregated_vec.get_index(EVENT_NAME),\n", + " EVENT_NAME,\n", + " tab_aggregated_vec.data,\n", + " tab_aggregated_vec.get_index(EVENT_NAME),\n", ")\n", "comb_vectorized.shape" ] @@ -665,7 +672,8 @@ "outputs": [], "source": [ "tab_vectorized, temp_vectorized, comb_vectorized = intersect_vectorized(\n", - " [tab_vectorized, temp_vectorized, comb_vectorized], axes=ENCOUNTER_ID,\n", + " [tab_vectorized, temp_vectorized, comb_vectorized],\n", + " axes=ENCOUNTER_ID,\n", ")\n", "tab_vectorized.shape, temp_vectorized.shape, comb_vectorized.shape" ] @@ -827,7 +835,8 @@ "outputs": [], "source": [ "temp_train_X, temp_train_y = temp_train.split_out(\n", - " EVENT_NAME, use_case_params.TEMP_TARGETS,\n", + " EVENT_NAME,\n", + " use_case_params.TEMP_TARGETS,\n", ")\n", "temp_train_X.shape, temp_train_y.shape" ] @@ -862,7 +871,8 @@ "outputs": [], "source": [ "comb_train_X, comb_train_y = comb_train.split_out(\n", - " EVENT_NAME, use_case_params.TEMP_TARGETS,\n", + " EVENT_NAME,\n", + " use_case_params.TEMP_TARGETS,\n", ")\n", "comb_train_X.shape, comb_train_y.shape" ] diff --git a/use_cases/common/3.2-temporal_model.ipynb b/use_cases/common/3.2-temporal_model.ipynb index 61e6e20f5..530cd83f2 100644 --- a/use_cases/common/3.2-temporal_model.ipynb +++ b/use_cases/common/3.2-temporal_model.ipynb @@ -28,8 +28,6 @@ "import numpy as np\n", "import plotly.graph_objects as go\n", "import torch\n", - "import torch.nn as nn\n", - "import torch.optim as optim\n", "from drift_detection.baseline_models.temporal.pytorch.optimizer import Optimizer\n", "from drift_detection.baseline_models.temporal.pytorch.utils import (\n", " get_data,\n", @@ -37,6 +35,7 @@ " get_temporal_model,\n", ")\n", "from sklearn import metrics\n", + "from torch import nn, optim\n", "\n", "from cyclops.models.util import metrics_binary\n", "from cyclops.process.column_names import EVENT_NAME\n", @@ -366,7 +365,9 @@ "source": [ "loss_fn = nn.BCEWithLogitsLoss(reduction=\"none\")\n", "optimizer = optim.Adagrad(\n", - " model.parameters(), lr=learning_rate, weight_decay=weight_decay,\n", + " model.parameters(),\n", + " lr=learning_rate,\n", + " weight_decay=weight_decay,\n", ")\n", "lr_scheduler = optim.lr_scheduler.StepLR(optimizer, step_size=128, gamma=0.5)\n", "activation = nn.Sigmoid()\n", @@ -419,7 +420,10 @@ "outputs": [], "source": [ "y_test_labels, y_pred_values, y_pred_labels = opt.evaluate(\n", - " test_loader, batch_size=1, n_features=n_features, timesteps=timesteps,\n", + " test_loader,\n", + " batch_size=1,\n", + " n_features=n_features,\n", + " timesteps=timesteps,\n", ")\n", "\n", "y_pred_values = y_pred_values[y_test_labels != -1]\n", @@ -477,7 +481,8 @@ "\n", "\n", "plot_confusion_matrix(\n", - " confusion_matrix, [\"low risk of mortality\", \"high risk of mortality\"],\n", + " confusion_matrix,\n", + " [\"low risk of mortality\", \"high risk of mortality\"],\n", ")" ] }, @@ -489,7 +494,11 @@ "outputs": [], "source": [ "y_test_labels, y_pred_values, y_pred_labels = opt.evaluate(\n", - " test_loader, batch_size=1, n_features=n_features, timesteps=timesteps, flatten=False,\n", + " test_loader,\n", + " batch_size=1,\n", + " n_features=n_features,\n", + " timesteps=timesteps,\n", + " flatten=False,\n", ")" ] }, @@ -521,7 +530,11 @@ " y=[label_h for x in prediction_hours],\n", " line={\"color\": \"Black\"},\n", " name=\"low risk of mortality label\",\n", - " marker={\"color\": \"Green\", \"size\": 20, \"line\": {\"color\": \"Black\", \"width\": 2}},\n", + " marker={\n", + " \"color\": \"Green\",\n", + " \"size\": 20,\n", + " \"line\": {\"color\": \"Black\", \"width\": 2},\n", + " },\n", " ),\n", " go.Scatter(\n", " mode=\"markers\",\n", @@ -529,7 +542,11 @@ " y=[label_h for _, v in enumerate(is_mortality) if v],\n", " line={\"color\": \"Red\"},\n", " name=\"high risk of mortality label\",\n", - " marker={\"color\": \"Red\", \"size\": 20, \"line\": {\"color\": \"Black\", \"width\": 2}},\n", + " marker={\n", + " \"color\": \"Red\",\n", + " \"size\": 20,\n", + " \"line\": {\"color\": \"Black\", \"width\": 2},\n", + " },\n", " ),\n", " go.Scatter(\n", " mode=\"markers\",\n", @@ -537,7 +554,11 @@ " y=[label_h for _, v in enumerate(after_discharge) if v],\n", " line={\"color\": \"Grey\"},\n", " name=\"post discharge label\",\n", - " marker={\"color\": \"Grey\", \"size\": 20, \"line\": {\"color\": \"Black\", \"width\": 2}},\n", + " marker={\n", + " \"color\": \"Grey\",\n", + " \"size\": 20,\n", + " \"line\": {\"color\": \"Black\", \"width\": 2},\n", + " },\n", " ),\n", " go.Bar(\n", " x=prediction_hours,\n", @@ -566,7 +587,8 @@ "mortality_cases = list(range(y_test_labels.shape[1]))\n", "sample_idx = random.choice(mortality_cases)\n", "fig = plot_risk_mortality(\n", - " y_pred_values[:, sample_idx].squeeze(), y_test_labels[:, sample_idx].squeeze(),\n", + " y_pred_values[:, sample_idx].squeeze(),\n", + " y_test_labels[:, sample_idx].squeeze(),\n", ")\n", "fig.show()" ] diff --git a/use_cases/cxr_classification.ipynb b/use_cases/cxr_classification.ipynb index 22d3f3071..cbc637a52 100644 --- a/use_cases/cxr_classification.ipynb +++ b/use_cases/cxr_classification.ipynb @@ -70,7 +70,9 @@ "outputs": [], "source": [ "test_df = pd.read_csv(\n", - " join(NIHCXR_DIR, \"test_list.txt\"), header=None, names=[\"Image Index\"],\n", + " join(NIHCXR_DIR, \"test_list.txt\"),\n", + " header=None,\n", + " names=[\"Image Index\"],\n", ")\n", "\n", "# select only the images in the test list\n", @@ -104,7 +106,7 @@ " ----\n", " df (pd.DataFrame): NIHCXR dataframe.\n", "\n", - " Returns:\n", + " Returns\n", " -------\n", " pd.DataFrame: pre-processed NIHCXR dataframe.\n", " \"\"\"\n", @@ -361,7 +363,10 @@ "outputs": [], "source": [ "preds = cxr_task.predict(\n", - " nih_ds, model_name=resnet_name, transforms=transforms, only_predictions=True,\n", + " nih_ds,\n", + " model_name=resnet_name,\n", + " transforms=transforms,\n", + " only_predictions=True,\n", ")" ] }, @@ -388,7 +393,6 @@ "spec_list = [\n", " {\"Patient Gender\": {\"value\": \"M\"}},\n", " {\"Patient Gender\": {\"value\": \"F\"}},\n", - " # {\"Patient Age\": {\"min_value\": 25, \"max_value\": 40}},\n", " {\"Patient Age\": {\"min_value\": 65}},\n", " {\"View Position\": {\"value\": \"PA\"}},\n", "]\n", diff --git a/use_cases/data_collectors/mimiciv/mortality_decompensation.ipynb b/use_cases/data_collectors/mimiciv/mortality_decompensation.ipynb index 0b2d4531d..2f123c708 100644 --- a/use_cases/data_collectors/mimiciv/mortality_decompensation.ipynb +++ b/use_cases/data_collectors/mimiciv/mortality_decompensation.ipynb @@ -211,17 +211,19 @@ "\n", " # Reverse deidentified dating\n", " events = pd.merge(\n", - " encounters[[ENCOUNTER_ID, \"anchor_year_difference\"]], events, on=ENCOUNTER_ID,\n", + " encounters[[ENCOUNTER_ID, \"anchor_year_difference\"]],\n", + " events,\n", + " on=ENCOUNTER_ID,\n", " )\n", " events[EVENT_TIMESTAMP] = add_years_approximate(\n", - " events[EVENT_TIMESTAMP], events[\"anchor_year_difference\"],\n", + " events[EVENT_TIMESTAMP],\n", + " events[\"anchor_year_difference\"],\n", " )\n", " events = events.drop(\"anchor_year_difference\", axis=1)\n", "\n", " # Preprocessing\n", " events[EVENT_NAME] = normalize_names(events[EVENT_NAME])\n", " events[EVENT_CATEGORY] = normalize_categories(events[EVENT_CATEGORY])\n", - " # events[EVENT_VALUE] = normalize_values(events[EVENT_VALUE])\n", "\n", " # Concatenate event name and category since some names are the same in\n", " # different categories, e.g., 'flow' for categories 'heartware' and 'ecmo'\n", diff --git a/use_cases/mortality_prediction.ipynb b/use_cases/mortality_prediction.ipynb index 983e34ae9..79da859b2 100644 --- a/use_cases/mortality_prediction.ipynb +++ b/use_cases/mortality_prediction.ipynb @@ -250,7 +250,9 @@ " # Convert the events rows into feature columns\n", " aggregated = aggregated.reset_index()\n", " return aggregated.pivot(\n", - " index=ENCOUNTER_ID, columns=EVENT_NAME, values=EVENT_VALUE,\n", + " index=ENCOUNTER_ID,\n", + " columns=EVENT_NAME,\n", + " values=EVENT_VALUE,\n", " )" ] }, @@ -411,7 +413,9 @@ "# the same class ratio for both subsets\n", "dataset = dataset.cast_column(OUTCOME_DEATH, ClassLabel(num_classes=2))\n", "dataset = dataset.train_test_split(\n", - " train_size=SPLIT_FRACTIONS[0], stratify_by_column=OUTCOME_DEATH, seed=42,\n", + " train_size=SPLIT_FRACTIONS[0],\n", + " stratify_by_column=OUTCOME_DEATH,\n", + " seed=42,\n", ")\n", "dataset[\"train\"]" ] @@ -466,7 +470,9 @@ "outputs": [], "source": [ "mortality_task = MortalityPredictionTask(\n", - " {xgb_name: xgb_model}, task_features=features_list, task_target=OUTCOME_DEATH,\n", + " {xgb_name: xgb_model},\n", + " task_features=features_list,\n", + " task_target=OUTCOME_DEATH,\n", ")" ] },