diff --git a/pdm.lock b/pdm.lock index cd59a8f..d5035c3 100644 --- a/pdm.lock +++ b/pdm.lock @@ -2,10 +2,62 @@ # It is not intended for manual editing. [metadata] -groups = ["default", "notebooks", "trials"] +groups = ["default", "notebooks", "trials", "trails"] strategy = ["cross_platform", "inherit_metadata"] -lock_version = "4.4.1" -content_hash = "sha256:e00f157f833ee7615d96375c352e2caa6b4f6b50e5615ccbefa79446189594c7" +lock_version = "4.4.2" +content_hash = "sha256:36979d60d30dad28e15e0f93496b4ea25af7fc5a12b91e82c12e1b957325c0af" + +[[package]] +name = "alph" +version = "0.4.10" +requires_python = "<4.0,>=3.9" +summary = "alph" +groups = ["trails", "trials"] +dependencies = [ + "altair>=5.0.1", + "networkx>=2.6.3", + "pandas>=1.3.5", + "scikit-network>=0.27.1", +] +files = [ + {file = "alph-0.4.10-py3-none-any.whl", hash = "sha256:47649ef9d12ac7bddaa9cfc7510ab333e7fe1c76d4da4d1b09629bbd174fbe63"}, + {file = "alph-0.4.10.tar.gz", hash = "sha256:a2cfe932c7a6a973c718f8c5bc1b1dbc7a1d18a122cb5e438db5ea3a61d6b5c3"}, +] + +[[package]] +name = "alph" +version = "0.4.10" +extras = ["graphviz"] +requires_python = "<4.0,>=3.9" +summary = "alph" +groups = ["trails", "trials"] +dependencies = [ + "alph==0.4.10", + "pygraphviz>=1.10", +] +files = [ + {file = "alph-0.4.10-py3-none-any.whl", hash = "sha256:47649ef9d12ac7bddaa9cfc7510ab333e7fe1c76d4da4d1b09629bbd174fbe63"}, + {file = "alph-0.4.10.tar.gz", hash = "sha256:a2cfe932c7a6a973c718f8c5bc1b1dbc7a1d18a122cb5e438db5ea3a61d6b5c3"}, +] + +[[package]] +name = "altair" +version = "5.3.0" +requires_python = ">=3.8" +summary = "Vega-Altair: A declarative statistical visualization library for Python." +groups = ["trails", "trials"] +dependencies = [ + "jinja2", + "jsonschema>=3.0", + "numpy", + "packaging", + "pandas>=0.25", + "toolz", +] +files = [ + {file = "altair-5.3.0-py3-none-any.whl", hash = "sha256:7084a1dab4d83c5e7e5246b92dc1b4451a6c68fd057f3716ee9d315c8980e59a"}, + {file = "altair-5.3.0.tar.gz", hash = "sha256:5a268b1a0983b23d8f9129f819f956174aa7aea2719ed55a52eba9979b9f6675"}, +] [[package]] name = "annotated-types" @@ -136,7 +188,7 @@ name = "attrs" version = "23.2.0" requires_python = ">=3.7" summary = "Classes Without Boilerplate" -groups = ["notebooks"] +groups = ["notebooks", "trails", "trials"] files = [ {file = "attrs-23.2.0-py3-none-any.whl", hash = "sha256:99b87a485a5820b23b879f04c2305b44b951b502fd64be915879d77a7e8fc6f1"}, {file = "attrs-23.2.0.tar.gz", hash = "sha256:935dc3b529c262f6cf76e50877d35a4bd3c1de194fd41f47a2b7ae8f19971f30"}, @@ -187,7 +239,7 @@ name = "blinker" version = "1.8.2" requires_python = ">=3.8" summary = "Fast, simple object-to-object and broadcast signaling" -groups = ["trials"] +groups = ["default"] files = [ {file = "blinker-1.8.2-py3-none-any.whl", hash = "sha256:1779309f71bf239144b9399d06ae925637cf6634cf6bd131104184531bf67c01"}, {file = "blinker-1.8.2.tar.gz", hash = "sha256:8f77b09d3bf7c795e969e9486f39c2c5e9c39d4ee07424be2bc594ece9642d83"}, @@ -231,7 +283,7 @@ name = "certifi" version = "2024.2.2" requires_python = ">=3.6" summary = "Python package for providing Mozilla's CA Bundle." -groups = ["default", "notebooks", "trials"] +groups = ["default", "notebooks"] files = [ {file = "certifi-2024.2.2-py3-none-any.whl", hash = "sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1"}, {file = "certifi-2024.2.2.tar.gz", hash = "sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f"}, @@ -276,7 +328,7 @@ name = "charset-normalizer" version = "3.3.2" requires_python = ">=3.7.0" summary = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." -groups = ["default", "notebooks", "trials"] +groups = ["default", "notebooks"] files = [ {file = "charset-normalizer-3.3.2.tar.gz", hash = "sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5"}, {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:802fe99cca7457642125a8a88a084cef28ff0cf9407060f7b93dca5aa25480db"}, @@ -317,7 +369,7 @@ name = "click" version = "8.1.7" requires_python = ">=3.7" summary = "Composable command line interface toolkit" -groups = ["default", "trials"] +groups = ["default"] dependencies = [ "colorama; platform_system == \"Windows\"", ] @@ -342,7 +394,7 @@ name = "colorama" version = "0.4.6" requires_python = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" summary = "Cross-platform colored terminal text." -groups = ["default", "notebooks", "trials"] +groups = ["default", "notebooks"] marker = "platform_system == \"Windows\" or sys_platform == \"win32\"" files = [ {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, @@ -402,7 +454,7 @@ name = "dash" version = "2.17.0" requires_python = ">=3.8" summary = "A Python framework for building reactive web-apps. Developed by Plotly." -groups = ["trials"] +groups = ["default"] dependencies = [ "Flask<3.1,>=1.0.4", "Werkzeug<3.1", @@ -426,7 +478,7 @@ files = [ name = "dash-core-components" version = "2.0.0" summary = "Core component suite for Dash" -groups = ["trials"] +groups = ["default"] files = [ {file = "dash_core_components-2.0.0-py3-none-any.whl", hash = "sha256:52b8e8cce13b18d0802ee3acbc5e888cb1248a04968f962d63d070400af2e346"}, {file = "dash_core_components-2.0.0.tar.gz", hash = "sha256:c6733874af975e552f95a1398a16c2ee7df14ce43fa60bb3718a3c6e0b63ffee"}, @@ -437,7 +489,7 @@ name = "dash-cytoscape" version = "1.0.1" requires_python = ">=3.8" summary = "A Component Library for Dash aimed at facilitating network visualization in Python, wrapped around Cytoscape.js" -groups = ["trials"] +groups = ["default"] dependencies = [ "dash", ] @@ -449,7 +501,7 @@ files = [ name = "dash-html-components" version = "2.0.0" summary = "Vanilla HTML components for Dash" -groups = ["trials"] +groups = ["default"] files = [ {file = "dash_html_components-2.0.0-py3-none-any.whl", hash = "sha256:b42cc903713c9706af03b3f2548bda4be7307a7cf89b7d6eae3da872717d1b63"}, {file = "dash_html_components-2.0.0.tar.gz", hash = "sha256:8703a601080f02619a6390998e0b3da4a5daabe97a1fd7a9cebc09d015f26e50"}, @@ -459,7 +511,7 @@ files = [ name = "dash-table" version = "5.0.0" summary = "Dash table" -groups = ["trials"] +groups = ["default"] files = [ {file = "dash_table-5.0.0-py3-none-any.whl", hash = "sha256:19036fa352bb1c11baf38068ec62d172f0515f73ca3276c79dee49b95ddc16c9"}, {file = "dash_table-5.0.0.tar.gz", hash = "sha256:18624d693d4c8ef2ddec99a6f167593437a7ea0bf153aa20f318c170c5bc7308"}, @@ -543,7 +595,7 @@ name = "flask" version = "3.0.3" requires_python = ">=3.8" summary = "A simple framework for building complex web applications." -groups = ["trials"] +groups = ["default"] dependencies = [ "Jinja2>=3.1.2", "Werkzeug>=3.0.0", @@ -647,7 +699,7 @@ name = "idna" version = "3.7" requires_python = ">=3.5" summary = "Internationalized Domain Names in Applications (IDNA)" -groups = ["default", "notebooks", "trials"] +groups = ["default", "notebooks"] files = [ {file = "idna-3.7-py3-none-any.whl", hash = "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0"}, {file = "idna-3.7.tar.gz", hash = "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc"}, @@ -658,7 +710,7 @@ name = "importlib-metadata" version = "7.1.0" requires_python = ">=3.8" summary = "Read metadata from Python packages" -groups = ["trials"] +groups = ["default"] dependencies = [ "zipp>=0.5", ] @@ -767,7 +819,7 @@ name = "itsdangerous" version = "2.2.0" requires_python = ">=3.8" summary = "Safely pass data to untrusted environments and back." -groups = ["trials"] +groups = ["default"] files = [ {file = "itsdangerous-2.2.0-py3-none-any.whl", hash = "sha256:c6242fc49e35958c8b15141343aa660db5fc54d4f13a1db01a3f5891b98700ef"}, {file = "itsdangerous-2.2.0.tar.gz", hash = "sha256:e0050c0b7da1eea53ffaf149c0cfbb5c6e2e2b69c4bef22c81fa6eb73e5f6173"}, @@ -792,7 +844,7 @@ name = "jinja2" version = "3.1.4" requires_python = ">=3.7" summary = "A very fast and expressive template engine." -groups = ["default", "notebooks", "trials"] +groups = ["default", "notebooks", "trails", "trials"] dependencies = [ "MarkupSafe>=2.0", ] @@ -839,7 +891,7 @@ name = "jsonschema" version = "4.22.0" requires_python = ">=3.8" summary = "An implementation of JSON Schema validation for Python" -groups = ["notebooks"] +groups = ["notebooks", "trails", "trials"] dependencies = [ "attrs>=22.2.0", "jsonschema-specifications>=2023.03.6", @@ -856,7 +908,7 @@ name = "jsonschema-specifications" version = "2023.12.1" requires_python = ">=3.8" summary = "The JSON Schema meta-schemas and vocabularies, exposed as a Registry" -groups = ["notebooks"] +groups = ["notebooks", "trails", "trials"] dependencies = [ "referencing>=0.31.0", ] @@ -1160,7 +1212,7 @@ name = "markupsafe" version = "2.1.5" requires_python = ">=3.7" summary = "Safely add untrusted strings to HTML/XML markup." -groups = ["default", "notebooks", "trials"] +groups = ["default", "notebooks", "trails", "trials"] files = [ {file = "MarkupSafe-2.1.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:629ddd2ca402ae6dbedfceeba9c46d5f7b2a61d9749597d4307f943ef198fc1f"}, {file = "MarkupSafe-2.1.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5b7b716f97b52c5a14bffdf688f971b2d5ef4029127f1ad7a513973cfd818df2"}, @@ -1325,7 +1377,7 @@ name = "nest-asyncio" version = "1.6.0" requires_python = ">=3.5" summary = "Patch asyncio to allow nested event loops" -groups = ["notebooks", "trials"] +groups = ["default", "notebooks"] files = [ {file = "nest_asyncio-1.6.0-py3-none-any.whl", hash = "sha256:87af6efd6b5e897c81050477ef65c62e2b2f35d51703cae01aff2905b1852e1c"}, {file = "nest_asyncio-1.6.0.tar.gz", hash = "sha256:6f172d5449aca15afd6c646851f4e31e02c598d553a667e38cafa997cfec55fe"}, @@ -1336,7 +1388,7 @@ name = "networkx" version = "3.3" requires_python = ">=3.10" summary = "Python package for creating and manipulating graphs and networks" -groups = ["default"] +groups = ["default", "trails", "trials"] files = [ {file = "networkx-3.3-py3-none-any.whl", hash = "sha256:28575580c6ebdaf4505b22c6256a2b9de86b316dc63ba9e93abde3d78dfdbcf2"}, {file = "networkx-3.3.tar.gz", hash = "sha256:0c127d8b2f4865f59ae9cb8aafcd60b5c70f3241ebd66f7defad7c4ab90126c9"}, @@ -1361,7 +1413,7 @@ name = "numpy" version = "1.26.4" requires_python = ">=3.9" summary = "Fundamental package for array computing in Python" -groups = ["default"] +groups = ["default", "trails", "trials"] files = [ {file = "numpy-1.26.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4c66707fabe114439db9068ee468c26bbdf909cac0fb58686a42a24de1760c71"}, {file = "numpy-1.26.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:edd8b5fe47dab091176d21bb6de568acdd906d1887a4584a15a9a96a1dca06ef"}, @@ -1555,7 +1607,7 @@ name = "packaging" version = "24.0" requires_python = ">=3.7" summary = "Core utilities for Python packages" -groups = ["default", "notebooks", "trials"] +groups = ["default", "notebooks", "trails", "trials"] files = [ {file = "packaging-24.0-py3-none-any.whl", hash = "sha256:2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5"}, {file = "packaging-24.0.tar.gz", hash = "sha256:eb82c5e3e56209074766e6885bb04b8c38a0c015d0a30036ebe7ece34c9989e9"}, @@ -1566,7 +1618,7 @@ name = "pandas" version = "2.2.2" requires_python = ">=3.9" summary = "Powerful data structures for data analysis, time series, and statistics" -groups = ["default"] +groups = ["default", "trails", "trials"] dependencies = [ "numpy>=1.23.2; python_version == \"3.11\"", "numpy>=1.26.0; python_version >= \"3.12\"", @@ -1701,7 +1753,7 @@ name = "plotly" version = "5.22.0" requires_python = ">=3.8" summary = "An open-source, interactive data visualization library for Python" -groups = ["trials"] +groups = ["default"] dependencies = [ "packaging", "tenacity>=6.2.0", @@ -1890,12 +1942,22 @@ files = [ {file = "pygments-2.18.0.tar.gz", hash = "sha256:786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199"}, ] +[[package]] +name = "pygraphviz" +version = "1.13" +requires_python = ">=3.10" +summary = "Python interface to Graphviz" +groups = ["trails", "trials"] +files = [ + {file = "pygraphviz-1.13.tar.gz", hash = "sha256:6ad8aa2f26768830a5a1cfc8a14f022d13df170a8f6fdfd68fd1aa1267000964"}, +] + [[package]] name = "python-dateutil" version = "2.9.0.post0" requires_python = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" summary = "Extensions to the standard Python datetime module" -groups = ["default", "notebooks"] +groups = ["default", "notebooks", "trails", "trials"] dependencies = [ "six>=1.5", ] @@ -1919,7 +1981,7 @@ files = [ name = "pytz" version = "2024.1" summary = "World timezone definitions, modern and historical" -groups = ["default"] +groups = ["default", "trails", "trials"] files = [ {file = "pytz-2024.1-py2.py3-none-any.whl", hash = "sha256:328171f4e3623139da4983451950b28e95ac706e13f3f2630a879749e7a8b319"}, {file = "pytz-2024.1.tar.gz", hash = "sha256:2a29735ea9c18baf14b448846bde5a48030ed267578472d8955cd0e7443a9812"}, @@ -2041,7 +2103,7 @@ name = "referencing" version = "0.35.1" requires_python = ">=3.8" summary = "JSON Referencing + Python" -groups = ["notebooks"] +groups = ["notebooks", "trails", "trials"] dependencies = [ "attrs>=22.2.0", "rpds-py>=0.7.0", @@ -2096,7 +2158,7 @@ name = "requests" version = "2.31.0" requires_python = ">=3.7" summary = "Python HTTP for Humans." -groups = ["default", "notebooks", "trials"] +groups = ["default", "notebooks"] dependencies = [ "certifi>=2017.4.17", "charset-normalizer<4,>=2", @@ -2112,7 +2174,7 @@ files = [ name = "retrying" version = "1.3.4" summary = "Retrying" -groups = ["trials"] +groups = ["default"] dependencies = [ "six>=1.7.0", ] @@ -2151,7 +2213,7 @@ name = "rpds-py" version = "0.18.1" requires_python = ">=3.8" summary = "Python bindings to Rust's persistent data structures (rpds)" -groups = ["notebooks"] +groups = ["notebooks", "trails", "trials"] files = [ {file = "rpds_py-0.18.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:6b5ff7e1d63a8281654b5e2896d7f08799378e594f09cf3674e832ecaf396ce8"}, {file = "rpds_py-0.18.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:8927638a4d4137a289e41d0fd631551e89fa346d6dbcfc31ad627557d03ceb6d"}, @@ -2302,12 +2364,29 @@ files = [ {file = "scikit_learn-1.4.2-cp312-cp312-win_amd64.whl", hash = "sha256:d762070980c17ba3e9a4a1e043ba0518ce4c55152032f1af0ca6f39b376b5928"}, ] +[[package]] +name = "scikit-network" +version = "0.32.1" +requires_python = ">=3.8" +summary = "Graph algorithms" +groups = ["trails", "trials"] +dependencies = [ + "numpy>=1.22.4", + "scipy>=1.7.3", +] +files = [ + {file = "scikit_network-0.32.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6228326cc5a813f4a7c031b64f1276d9cc1d5ccff082e62fb176f1e53ae2cc46"}, + {file = "scikit_network-0.32.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d634aab1e379702134c877c8c4a6803b7d7ba4efc103198474b7e896ec37e242"}, + {file = "scikit_network-0.32.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e32e247728815750b12b950279cae6b12041a0c4bf95d1accdd273b0c1a6ea1"}, + {file = "scikit_network-0.32.1-cp311-cp311-win_amd64.whl", hash = "sha256:c7016dce37120aa527fcff4254985360f164306ed060c496a6cf296a6d0fd2c3"}, +] + [[package]] name = "scipy" version = "1.13.0" requires_python = ">=3.9" summary = "Fundamental algorithms for scientific computing in Python" -groups = ["default"] +groups = ["default", "trails", "trials"] dependencies = [ "numpy<2.3,>=1.22.4", ] @@ -2364,7 +2443,7 @@ name = "setuptools" version = "69.5.1" requires_python = ">=3.8" summary = "Easily download, build, install, upgrade, and uninstall Python packages" -groups = ["default", "trials"] +groups = ["default"] files = [ {file = "setuptools-69.5.1-py3-none-any.whl", hash = "sha256:c636ac361bc47580504644275c9ad802c50415c7522212252c033bd15f301f32"}, {file = "setuptools-69.5.1.tar.gz", hash = "sha256:6c1fccdac05a97e598fb0ae3bbed5904ccb317337a51139dcd51453611bbb987"}, @@ -2375,7 +2454,7 @@ name = "six" version = "1.16.0" requires_python = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" summary = "Python 2 and 3 compatibility utilities" -groups = ["default", "notebooks", "trials"] +groups = ["default", "notebooks", "trails", "trials"] files = [ {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, @@ -2635,7 +2714,7 @@ name = "tenacity" version = "8.3.0" requires_python = ">=3.8" summary = "Retry code until it succeeds" -groups = ["trials"] +groups = ["default"] files = [ {file = "tenacity-8.3.0-py3-none-any.whl", hash = "sha256:3649f6443dbc0d9b01b9d8020a9c4ec7a1ff5f6f3c6c8a036ef371f573fe9185"}, {file = "tenacity-8.3.0.tar.gz", hash = "sha256:953d4e6ad24357bceffbc9707bc74349aca9d245f68eb65419cf0c249a1949a2"}, @@ -2790,6 +2869,17 @@ files = [ {file = "tokenizers-0.15.2.tar.gz", hash = "sha256:e6e9c6e019dd5484be5beafc775ae6c925f4c69a3487040ed09b45e13df2cb91"}, ] +[[package]] +name = "toolz" +version = "0.12.1" +requires_python = ">=3.7" +summary = "List processing tools and functional utilities" +groups = ["trails", "trials"] +files = [ + {file = "toolz-0.12.1-py3-none-any.whl", hash = "sha256:d22731364c07d72eea0a0ad45bafb2c2937ab6fd38a3507bf55eae8744aa7d85"}, + {file = "toolz-0.12.1.tar.gz", hash = "sha256:ecca342664893f177a13dac0e6b41cbd8ac25a358e5f215316d43e2100224f4d"}, +] + [[package]] name = "torch" version = "2.3.0" @@ -2941,7 +3031,7 @@ name = "typing-extensions" version = "4.12.2" requires_python = ">=3.8" summary = "Backported and Experimental Type Hints for Python 3.8+" -groups = ["default", "notebooks", "trials"] +groups = ["default", "notebooks"] files = [ {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, @@ -2952,7 +3042,7 @@ name = "tzdata" version = "2024.1" requires_python = ">=2" summary = "Provider of IANA time zone data" -groups = ["default"] +groups = ["default", "trails", "trials"] files = [ {file = "tzdata-2024.1-py2.py3-none-any.whl", hash = "sha256:9068bc196136463f5245e51efda838afa15aaeca9903f49050dfa2679db4d252"}, {file = "tzdata-2024.1.tar.gz", hash = "sha256:2674120f8d891909751c38abcdfd386ac0a5a1127954fbc332af6b5ceae07efd"}, @@ -2974,7 +3064,7 @@ name = "urllib3" version = "2.2.1" requires_python = ">=3.8" summary = "HTTP library with thread-safe connection pooling, file post, and more." -groups = ["default", "notebooks", "trials"] +groups = ["default", "notebooks"] files = [ {file = "urllib3-2.2.1-py3-none-any.whl", hash = "sha256:450b20ec296a467077128bff42b73080516e71b56ff59a60a02bef2232c4fa9d"}, {file = "urllib3-2.2.1.tar.gz", hash = "sha256:d0570876c61ab9e520d776c38acbbb5b05a776d3f9ff98a5c8fd5162a444cf19"}, @@ -3063,7 +3153,7 @@ name = "werkzeug" version = "3.0.3" requires_python = ">=3.8" summary = "The comprehensive WSGI web application library." -groups = ["trials"] +groups = ["default"] dependencies = [ "MarkupSafe>=2.1.1", ] @@ -3088,7 +3178,7 @@ name = "zipp" version = "3.18.2" requires_python = ">=3.8" summary = "Backport of pathlib-compatible object wrapper for zip files" -groups = ["trials"] +groups = ["default"] files = [ {file = "zipp-3.18.2-py3-none-any.whl", hash = "sha256:dce197b859eb796242b0622af1b8beb0a722d52aa2f57133ead08edd5bf5374e"}, {file = "zipp-3.18.2.tar.gz", hash = "sha256:6278d9ddbcfb1f1089a88fde84481528b07b0e10474e09dcfe53dad4069fa059"}, diff --git a/pyproject.toml b/pyproject.toml index 05b6632..6c253a3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,6 +13,9 @@ dependencies = [ "numpy>=1.26.4", "pip>=24.0", "typing-extensions>=4.12.2", + "plotly>=5.22.0", + "dash>=2.17.0", + "dash-cytoscape>=1.0.1", ] requires-python = ">=3.11" readme = "README.md" @@ -31,10 +34,13 @@ notebooks = [ "jupyterlab>=4.2.0", "ipywidgets>=8.1.2", ] -trials = [ - "plotly>=5.22.0", - "dash>=2.17.0", - "dash-cytoscape>=1.0.1", +# Alph relies on Pygraphviz which again relies on Graphviz, to sucessfully build +# Pygraphviz the MSVC toolchain should be installed on the target system if it is Windows +# (Linux not tested yet). The compiler needs additional information about the location of Graphviz +# files. This information is provided by extra options. +# --config-setting="--global-option=build_ext" --config-setting="--global-option=-IC:\Program Files\Graphviz\include" --config-setting="--global-option=-LC:\Program Files\Graphviz\lib" +trails = [ + "alph[graphviz]>=0.4.10", ] [tool.ruff] diff --git a/scripts/analyse_dataset.py b/scripts/analyse_dataset.py index 677172c..30202e8 100644 --- a/scripts/analyse_dataset.py +++ b/scripts/analyse_dataset.py @@ -30,11 +30,11 @@ from lang_main.types import ( ) # ** build pipelines -pipe_merge = build_merge_duplicates_pipe() pipe_target_feat = build_base_target_feature_pipe() -pipe_timeline = build_timeline_pipe() +pipe_merge = build_merge_duplicates_pipe() pipe_token_analysis = build_tk_graph_pipe() pipe_graph_postprocessing = build_tk_graph_post_pipe() +pipe_timeline = build_timeline_pipe() # ** preprocessing pipeline @@ -76,8 +76,6 @@ def run_graph_postprocessing() -> None: # filter graph by edge weight and remove single nodes (no connection) ret = cast(tuple[TokenGraph], pipe_graph_postprocessing.run(starting_values=(tk_graph,))) tk_graph_filtered = ret[0] - # tk_graph_filtered = tk_graph.filter_by_edge_weight(THRESHOLD_EDGE_WEIGHT, None) - # tk_graph_filtered = tk_graph_filtered.filter_by_node_degree(1, None) tk_graph_filtered.to_GraphML( SAVE_PATH_FOLDER, filename='TokenGraph-filtered', directed=False ) diff --git a/scripts/dashboard/cyto.py b/scripts/dashboard/cyto.py index 349980d..20ce34d 100644 --- a/scripts/dashboard/cyto.py +++ b/scripts/dashboard/cyto.py @@ -16,8 +16,8 @@ target = '../results/test_20240529/Pipe-Token_Analysis_Step-1_build_token_graph. p = Path(target).resolve() ret = lang_main.io.load_pickle(p) tk_graph = cast(graphs.TokenGraph, ret[0]) -tk_graph_filtered = tk_graph.filter_by_edge_weight(150, None) -tk_graph_filtered = tk_graph_filtered.filter_by_node_degree(1, None) +tk_graph_filtered = graphs.filter_graph_by_edge_weight(tk_graph, 150, None) +tk_graph_filtered = graphs.filter_graph_by_node_degree(tk_graph_filtered, 1, None) cyto_data_base, weight_data = graphs.convert_graph_to_cytoscape(tk_graph_filtered) MIN_WEIGHT = weight_data['min'] @@ -235,8 +235,16 @@ def update_edge_weight(weight_min, weight_max): weight_min = MIN_WEIGHT if weight_max is None: weight_max = MAX_WEIGHT - tk_graph_filtered = tk_graph.filter_by_edge_weight(weight_min, weight_max) - tk_graph_filtered = tk_graph_filtered.filter_by_node_degree(1, None) + tk_graph_filtered = graphs.filter_graph_by_edge_weight( + tk_graph, + weight_min, + weight_max, + ) + tk_graph_filtered = graphs.filter_graph_by_node_degree( + tk_graph_filtered, + 1, + None, + ) cyto_data, _ = graphs.convert_graph_to_cytoscape(tk_graph_filtered) return cyto_data diff --git a/scripts/dashboard/timeline.py b/scripts/dashboard/dash_timeline.py similarity index 72% rename from scripts/dashboard/timeline.py rename to scripts/dashboard/dash_timeline.py index 021d96d..fd41bd1 100644 --- a/scripts/dashboard/timeline.py +++ b/scripts/dashboard/dash_timeline.py @@ -2,10 +2,9 @@ import time import webbrowser from pathlib import Path from threading import Thread -from typing import cast +from typing import Any, Final, cast import dash_cytoscape as cyto -import pandas as pd import plotly.express as px from dash import ( Dash, @@ -19,45 +18,33 @@ from dash import ( ) from pandas import DataFrame -from lang_main.analysis import graphs -from lang_main.io import load_pickle -from lang_main.types import ObjectID, TimelineCandidates -from lang_main.analysis import tokens +import lang_main.io +from lang_main.analysis import graphs, tokens from lang_main.constants import SPCY_MODEL - -# df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/gapminder_unfiltered.csv') +from lang_main.types import ObjectID, TimelineCandidates # ** data -# p_df = Path(r'../Pipe-TargetFeature_Step-3_remove_NA.pkl').resolve() p_df = Path(r'../results/test_20240619/TIMELINE.pkl').resolve() -# p_tl = Path(r'/Pipe-Timeline_Analysis_Step-4_get_timeline_candidates.pkl').resolve() +(data,) = cast(tuple[DataFrame], lang_main.io.load_pickle(p_df)) p_tl = Path(r'../results/test_20240619/TIMELINE_POSTPROCESSING.pkl').resolve() -ret = cast(tuple[DataFrame], load_pickle(p_df)) -data = ret[0] -ret = cast(tuple[TimelineCandidates, dict[ObjectID, str]], load_pickle(p_tl)) -cands = ret[0] -texts = ret[1] +cands, texts = cast( + tuple[TimelineCandidates, dict[ObjectID, str]], lang_main.io.load_pickle(p_tl) +) -# p_df = Path(r'.\test-notebooks\dashboard\data.pkl') -# p_cands = Path(r'.\test-notebooks\dashboard\map_candidates.pkl') -# p_map = Path(r'.\test-notebooks\dashboard\map_texts.pkl') -# data = cast(DataFrame, load_pickle(p_df)) -# cands = cast(TimelineCandidates, load_pickle(p_cands)) -# texts = cast(dict[ObjectID, str], load_pickle(p_map)) -table_feats = [ +TABLE_FEATS: Final[list[str]] = [ 'ErstellungsDatum', 'ErledigungsDatum', 'VorgangsTypName', 'VorgangsBeschreibung', ] -table_feats_dates = [ +TABLE_FEATS_DATES: Final[list[str]] = [ 'ErstellungsDatum', 'ErledigungsDatum', ] # ** figure config -markers = { +MARKERS: Final[dict[str, Any]] = { 'size': 12, 'color': 'yellow', 'line': { @@ -65,15 +52,15 @@ markers = { 'color': 'red', }, } -hover_data = { +HOVER_DATA: Final[dict[str, Any]] = { 'ErstellungsDatum': '|%d.%m.%Y', 'VorgangsBeschreibung': True, } -# ** graphs +# ** graph target = '../results/test_20240529/Pipe-Token_Analysis_Step-1_build_token_graph.pkl' p = Path(target).resolve() -ret = load_pickle(p) +ret = lang_main.io.load_pickle(p) tk_graph = cast(graphs.TokenGraph, ret[0]) tk_graph_filtered = graphs.filter_graph_by_edge_weight(tk_graph, 150, None) tk_graph_filtered = graphs.filter_graph_by_node_degree(tk_graph_filtered, 1, None) @@ -142,14 +129,12 @@ my_stylesheet = [ # {'selector': '.triangle', 'style': {'shape': 'triangle'}}, ] -# ** app -external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css'] -app = Dash(__name__, external_stylesheets=external_stylesheets) - graph_layout = html.Div( [ html.Button('Trigger JS Weight', id='test_js_weight'), - html.Button('Trigger Candidate Graph', id='cand_graph'), + html.Button('Trigger Candidate Graph', id='graph-build-btn'), + dcc.Store(id='graph-store', storage_type='memory'), + dcc.Store(id='graph-store-cyto-curr_cands', storage_type='memory'), html.Div(id='output'), html.Div( [ @@ -184,7 +169,7 @@ graph_layout = html.Div( [ html.H3('Graph Filter'), dcc.Input( - id='weight_min', + id='graph-weight_min', type='number', min=MIN_WEIGHT, max=MAX_WEIGHT, @@ -194,7 +179,7 @@ graph_layout = html.Div( style={'width': '40%'}, ), dcc.Input( - id='weight_max', + id='graph-weight_max', type='number', min=MIN_WEIGHT, max=MAX_WEIGHT, @@ -204,7 +189,7 @@ graph_layout = html.Div( style={'width': '40%'}, ), html.H3('Graph'), - html.Button('Re-Layout', id='trigger_relayout'), + html.Button('Re-Layout', id='graph-trigger_relayout'), html.Div( [ cyto.Cytoscape( @@ -230,6 +215,12 @@ graph_layout = html.Div( ], ) + +# ** app +external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css'] +app = Dash(__name__, external_stylesheets=external_stylesheets) + + app.layout = html.Div( [ html.H1(children='Demo Zeitreihenanalyse', style={'textAlign': 'center'}), @@ -238,16 +229,16 @@ app.layout = html.Div( html.H2('Wählen Sie ein Objekt aus (ObjektID):'), dcc.Dropdown( list(cands.keys()), - id='dropdown-selection', + id='selector-obj_id', placeholder='ObjektID auswählen...', ), ] ), html.Div( children=[ - html.H3(id='object_text'), - dcc.Dropdown(id='choice-candidates'), - dcc.Graph(id='graph-output'), + html.H3(id='object-text'), + dcc.Dropdown(id='selector-candidates'), + dcc.Graph(id='graph-candidates'), ] ), html.Div( @@ -260,8 +251,8 @@ app.layout = html.Div( @callback( - Output('object_text', 'children'), - Input('dropdown-selection', 'value'), + Output('object-text', 'children'), + Input('selector-obj_id', 'value'), prevent_initial_call=True, ) def update_obj_text(obj_id): @@ -272,21 +263,24 @@ def update_obj_text(obj_id): @callback( - Output('choice-candidates', 'options'), - Input('dropdown-selection', 'value'), + [Output('selector-candidates', 'options'), Output('selector-candidates', 'value')], + Input('selector-obj_id', 'value'), prevent_initial_call=True, ) def update_choice_candidates(obj_id): obj_id = int(obj_id) cands_obj_id = cands[obj_id] choices = list(range(1, len(cands_obj_id) + 1)) - return choices + return choices, choices[0] +# TODO check possible storage of pre-filtered result +# TODO change input of ``update_table_candidates`` and ``display_candidates_as_graph`` +# TODO to storage component @callback( - Output('graph-output', 'figure'), - Input('choice-candidates', 'value'), - State('dropdown-selection', 'value'), + Output('graph-candidates', 'figure'), + Input('selector-candidates', 'value'), + State('selector-obj_id', 'value'), prevent_initial_call=True, ) def update_timeline(index, obj_id): @@ -295,19 +289,20 @@ def update_timeline(index, obj_id): obj_text = texts[obj_id] title = f'HObjektText: {obj_text}' # cands - cands_obj_id = cands[obj_id] - cands_choice = cands_obj_id[int(index) - 1] + # cands_per_obj_id = cands[obj_id] + # cands_similar = cands_per_obj_id[int(index) - 1] # data - df = data.loc[list(cands_choice)].sort_index() # type: ignore + # df = data.loc[list(cands_similar)].sort_index() # type: ignore + df = pre_filter_data(data, idx=index, obj_id=obj_id) # figure fig = px.line( data_frame=df, x='ErstellungsDatum', y='ObjektID', title=title, - hover_data=hover_data, + hover_data=HOVER_DATA, ) - fig.update_traces(mode='markers+lines', marker=markers, marker_symbol='diamond') + fig.update_traces(mode='markers+lines', marker=MARKERS, marker_symbol='diamond') fig.update_xaxes( tickformat='%B\n%Y', rangeslider_visible=True, @@ -319,24 +314,18 @@ def update_timeline(index, obj_id): @callback( [Output('table-candidates', 'data'), Output('table-candidates', 'columns')], - Input('choice-candidates', 'value'), - State('dropdown-selection', 'value'), + Input('selector-candidates', 'value'), + State('selector-obj_id', 'value'), prevent_initial_call=True, ) def update_table_candidates(index, obj_id): - # obj_id = int(obj_id) - # # cands - # cands_obj_id = cands[obj_id] - # cands_choice = cands_obj_id[int(index) - 1] - # # data - # df = data.loc[list(cands_choice)].sort_index() # type: ignore df = pre_filter_data(data, idx=index, obj_id=obj_id) - df = df.filter(items=table_feats, axis=1).sort_values( + df = df.filter(items=TABLE_FEATS, axis=1).sort_values( by='ErstellungsDatum', ascending=True ) cols = [{'name': i, 'id': i} for i in df.columns] # convert dates to strings - for col in table_feats_dates: + for col in TABLE_FEATS_DATES: df[col] = df[col].dt.strftime(r'%Y-%m-%d') table_data = df.to_dict('records') @@ -348,6 +337,7 @@ def pre_filter_data( idx: int, obj_id: ObjectID, ) -> DataFrame: + idx = int(idx) obj_id = int(obj_id) data = data.copy() # cands @@ -359,33 +349,53 @@ def pre_filter_data( return data -# ** graph +# ** graph callbacks +# TODO store pre-calculated graph @app.callback( Output('cytoscape-graph', 'elements', allow_duplicate=True), - Output('weight_min', 'min', allow_duplicate=True), - Output('weight_min', 'max', allow_duplicate=True), - Output('weight_min', 'placeholder', allow_duplicate=True), - Output('weight_max', 'min', allow_duplicate=True), - Output('weight_max', 'max', allow_duplicate=True), - Output('weight_max', 'placeholder', allow_duplicate=True), - Input('cand_graph', 'n_clicks'), - State('choice-candidates', 'value'), - State('dropdown-selection', 'value'), + Output('graph-weight_min', 'min', allow_duplicate=True), + Output('graph-weight_min', 'max', allow_duplicate=True), + Output('graph-weight_min', 'placeholder', allow_duplicate=True), + Output('graph-weight_max', 'min', allow_duplicate=True), + Output('graph-weight_max', 'max', allow_duplicate=True), + Output('graph-weight_max', 'placeholder', allow_duplicate=True), + Output('graph-store', 'data'), + Output('graph-store-cyto-curr_cands', 'data'), + # Input('graph-build-btn', 'n_clicks'), + Input('selector-candidates', 'value'), + State('selector-obj_id', 'value'), prevent_initial_call=True, ) -def update_graph_candidates(_, index, obj_id): +def display_candidates_as_graph(index, obj_id): + t1 = time.perf_counter() df = pre_filter_data(data, idx=index, obj_id=obj_id) + t2 = time.perf_counter() + print(f'Time for filtering: {t2 - t1} s') + + t1 = time.perf_counter() tk_graph_cands, _ = tokens.build_token_graph( data=df, model=SPCY_MODEL, target_feature='VorgangsBeschreibung', build_map=False, + logging_graph=False, ) + t2 = time.perf_counter() + print(f'Time for graph building: {t2 - t1} s') + + t1 = time.perf_counter() cyto_data, weight_info = graphs.convert_graph_to_cytoscape(tk_graph_cands) weight_min = weight_info['min'] weight_max = weight_info['max'] placeholder_min = f'Minimum edge weight: {weight_min} - {weight_max}' - placeholder_max = f'Minimum edge weight: {weight_min} - {weight_max}' + placeholder_max = f'Maximum edge weight: {weight_min} - {weight_max}' + t2 = time.perf_counter() + print(f'Time for graph metadata and conversion: {t2 - t1} s') + + t1 = time.perf_counter() + graph_to_store = lang_main.io.encode_to_base64_str(tk_graph_cands) + t2 = time.perf_counter() + print(f'Time for encoding: {t2 - t1} s') return ( cyto_data, weight_min, @@ -394,6 +404,8 @@ def update_graph_candidates(_, index, obj_id): weight_min, weight_max, placeholder_max, + graph_to_store, + cyto_data, ) @@ -412,30 +424,44 @@ def update_layout_internal(layout_choice): @app.callback( Output('cytoscape-graph', 'zoom'), Output('cytoscape-graph', 'elements', allow_duplicate=True), - Output('weight_min', 'value'), - Output('weight_max', 'value'), + Output('graph-weight_min', 'value'), + Output('graph-weight_max', 'value'), Input('bt-reset', 'n_clicks'), + State('graph-store-cyto-curr_cands', 'data'), prevent_initial_call=True, ) -def reset_layout(n_clicks): - return (1, cyto_data_base, None, None) +def reset_layout(_, current_cands_cyto_elements): + return (1, current_cands_cyto_elements, None, None) # update edge weight @app.callback( Output('cytoscape-graph', 'elements', allow_duplicate=True), - Input('weight_min', 'value'), - Input('weight_max', 'value'), + Input('graph-weight_min', 'value'), + Input('graph-weight_max', 'value'), + State('graph-store', 'data'), + State('graph-store-cyto-curr_cands', 'data'), + State('graph-weight_min', 'min'), + State('graph-weight_min', 'max'), prevent_initial_call=True, ) -def update_edge_weight(weight_min, weight_max): - if not any([weight_min, weight_max]): - return cyto_data_base +def update_edge_weight( + weight_min, + weight_max, + current_graph, + current_cands_cyto_elements, + current_min, + current_max, +): + if not any((weight_min, weight_max)): + return current_cands_cyto_elements if weight_min is None: - weight_min = MIN_WEIGHT + weight_min = current_min if weight_max is None: - weight_max = MAX_WEIGHT + weight_max = current_max + + tk_graph = cast(graphs.TokenGraph, lang_main.io.decode_from_base64_str(current_graph)) tk_graph_filtered = graphs.filter_graph_by_edge_weight(tk_graph, weight_min, weight_max) # tk_graph_filtered = tk_graph.filter_by_edge_weight(weight_min, weight_max) tk_graph_filtered = graphs.filter_graph_by_node_degree(tk_graph_filtered, 1, None) @@ -444,6 +470,7 @@ def update_edge_weight(weight_min, weight_max): return cyto_data +# ** graph: layout with edge weight app.clientside_callback( """ function(n_clicks, layout) { @@ -458,11 +485,12 @@ app.clientside_callback( } """, Output('cytoscape-graph', 'layout', allow_duplicate=True), - Input('trigger_relayout', 'n_clicks'), + Input('graph-trigger_relayout', 'n_clicks'), State('cytoscape-graph', 'layout'), prevent_initial_call=True, ) +# ** graph: display edge weight (line thickness) app.clientside_callback( """ function(n_clicks, stylesheet) { diff --git a/src/lang_main/__init__.py b/src/lang_main/__init__.py index cf26f07..c9b2122 100644 --- a/src/lang_main/__init__.py +++ b/src/lang_main/__init__.py @@ -1,4 +1,5 @@ import logging +import os import shutil import sys from pathlib import Path @@ -41,3 +42,9 @@ else: loaded_cfg = load_toml_config(path_to_toml=cfg_path_external) CONFIG: Final[dict[str, Any]] = loaded_cfg.copy() + +# append Graphviz binary folder to system path if not already contained +if sys.platform == 'win32': + path = Path(r'C:\Program Files\Graphviz\bin') + if path.is_dir() and str(path).lower() not in os.environ['PATH'].lower(): + os.environ['PATH'] += f';{path}' diff --git a/src/lang_main/analysis/graphs.py b/src/lang_main/analysis/graphs.py index dde0248..de7abe9 100644 --- a/src/lang_main/analysis/graphs.py +++ b/src/lang_main/analysis/graphs.py @@ -164,8 +164,11 @@ def convert_graph_to_cytoscape( } cyto_data.append(edge_data) - min_weight = min(weights) - max_weight = max(weights) + min_weight: int = 0 + max_weight: int = 0 + if weights: + min_weight = min(weights) + max_weight = max(weights) weight_metadata: WeightData = {'min': min_weight, 'max': max_weight} return cyto_data, weight_metadata @@ -284,6 +287,9 @@ class TokenGraph(DiGraph): f'{len(self.edges)})' ) + def disable_logging(self) -> None: + self.logging = False + # !! only used to verify that saving was done correctly """ def __key(self) -> tuple[Hashable, ...]: @@ -337,16 +343,9 @@ class TokenGraph(DiGraph): logging: bool | None = ..., ) -> Graph: ... - @overload def to_undirected( self, - inplace: bool = ..., - logging: bool | None = ..., - ) -> Graph | None: ... - - def to_undirected( - self, - inplace=True, + inplace: bool = True, logging: bool | None = None, ) -> Graph | None: if logging is None: diff --git a/src/lang_main/analysis/tokens.py b/src/lang_main/analysis/tokens.py index 705effb..eef07dc 100644 --- a/src/lang_main/analysis/tokens.py +++ b/src/lang_main/analysis/tokens.py @@ -21,7 +21,8 @@ from lang_main.types import PandasIndex # POS_OF_INTEREST: frozenset[str] = frozenset(['NOUN', 'PROPN', 'ADJ', 'VERB', 'AUX']) # POS_OF_INTEREST: frozenset[str] = frozenset(['NOUN', 'ADJ', 'VERB', 'AUX']) # POS_OF_INTEREST: frozenset[str] = frozenset(['NOUN', 'PROPN']) -POS_OF_INTEREST: frozenset[str] = frozenset(['NOUN', 'PROPN', 'VERB', 'AUX']) +# POS_OF_INTEREST: frozenset[str] = frozenset(['NOUN', 'PROPN', 'VERB', 'AUX']) +POS_OF_INTEREST: frozenset[str] = frozenset(['NOUN', 'PROPN', 'VERB', 'AUX', 'ADV']) # POS_INDIRECT: frozenset[str] = frozenset(['AUX', 'VERB']) POS_INDIRECT: frozenset[str] = frozenset(['AUX']) @@ -153,6 +154,7 @@ def build_token_graph( batch_idx_feature: str = ..., build_map: Literal[False], batch_size_model: int = ..., + logging_graph: bool = ..., ) -> tuple[TokenGraph, None]: ... @@ -166,6 +168,7 @@ def build_token_graph( batch_idx_feature: str = ..., build_map: Literal[True] = ..., batch_size_model: int = ..., + logging_graph: bool = ..., ) -> tuple[TokenGraph, dict[PandasIndex, SpacyDoc]]: ... @@ -175,11 +178,12 @@ def build_token_graph( *, target_feature: str = 'entry', weights_feature: str | None = None, - batch_idx_feature: str = 'batched_idxs', + batch_idx_feature: str | None = 'batched_idxs', build_map: bool = True, batch_size_model: int = 50, + logging_graph: bool = True, ) -> tuple[TokenGraph, dict[PandasIndex, SpacyDoc] | None]: - graph = TokenGraph() + graph = TokenGraph(enable_logging=logging_graph) model_input = cast(tuple[str], tuple(data[target_feature].to_list())) if weights_feature is not None: weights = cast(tuple[int], tuple(data[weights_feature].to_list())) @@ -187,7 +191,9 @@ def build_token_graph( weights = None docs_mapping: dict[PandasIndex, SpacyDoc] | None - if build_map: + if build_map and batch_idx_feature is None: + raise ValueError('Can not build mapping if batched indices are unknown.') + elif build_map: indices = cast(tuple[list[PandasIndex]], tuple(data[batch_idx_feature].to_list())) docs_mapping = {} else: @@ -199,10 +205,10 @@ def build_token_graph( for doc in tqdm( model.pipe(model_input, batch_size=batch_size_model), total=len(model_input) ): + weight: int | None = None if weights is not None: weight = weights[index] - else: - weight = None + add_doc_info_to_graph( graph=graph, doc=doc, @@ -219,7 +225,7 @@ def build_token_graph( # metadata graph.update_metadata() # convert to undirected - graph.to_undirected() + graph.to_undirected(logging=False) return graph, docs_mapping @@ -250,7 +256,7 @@ def build_token_graph_simple( # metadata graph.update_metadata() # convert to undirected - graph.to_undirected() + graph.to_undirected(logging=False) return graph, docs_mapping diff --git a/src/lang_main/io.py b/src/lang_main/io.py index 9107d72..ca8933d 100644 --- a/src/lang_main/io.py +++ b/src/lang_main/io.py @@ -1,4 +1,5 @@ import pickle +import base64 import shutil import tomllib from pathlib import Path @@ -61,6 +62,24 @@ def load_pickle( return obj +def encode_to_base64_str( + obj: Any, + encoding: str = 'utf-8', +) -> str: + serialised = pickle.dumps(obj, protocol=pickle.HIGHEST_PROTOCOL) + b64_bytes = base64.b64encode(serialised) + return b64_bytes.decode(encoding=encoding) + + +def decode_from_base64_str( + b64_str: str, + encoding: str = 'utf-8', +) -> Any: + b64_bytes = b64_str.encode(encoding=encoding) + decoded = base64.b64decode(b64_bytes) + return pickle.loads(decoded) + + def get_entry_point( saving_path: Path, filename: str, diff --git a/src/lang_main/pipelines/base.py b/src/lang_main/pipelines/base.py index 2cc25a7..1dfd427 100644 --- a/src/lang_main/pipelines/base.py +++ b/src/lang_main/pipelines/base.py @@ -97,6 +97,18 @@ class BasePipeline(ABC): class PipelineContainer(BasePipeline): + """Container class for basic actions. + Basic actions are usually functions, which do not take any parameters + and return nothing. Indeed, if an action returns any values after its + procedure is finished, an error is raised. Therefore, PipelineContainers + can be seen as a concatenation of many (independent) simple procedures + which are executed in the order in which they were added to the pipe. + With a simple call of the ``run`` method the actions are performed. + Additionally, there is an option to skip actions which can be set in + the ``add`` method. This allows for easily configurable pipelines, + e.g., via a user configuration. + """ + def __init__( self, name: str, @@ -169,9 +181,6 @@ class Pipeline(BasePipeline): f'working dir: {self.working_dir}, contents: {self.action_names})' ) - # @property - # def intermediate_result(self) -> tuple[Any, ...] | None: - # return self._intermediate_result @override def add( self, diff --git a/test-notebooks/misc.ipynb b/test-notebooks/misc.ipynb index 920cde4..a443ffd 100644 --- a/test-notebooks/misc.ipynb +++ b/test-notebooks/misc.ipynb @@ -2,1662 +2,319 @@ "cells": [ { "cell_type": "code", - "execution_count": 7, - "id": "b9ec018c-dffc-420f-85b4-b792e3aebb17", + "execution_count": 55, + "id": "af118d77-d87a-4687-be5b-e810a24c403e", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "2024-06-19 11:10:00 +0000 | io:INFO | Loaded TOML config file successfully.\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "A:\\Arbeitsaufgaben\\lang-main\\.venv\\Lib\\site-packages\\transformers\\utils\\generic.py:441: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead.\n", - " _torch_pytree._register_pytree_node(\n" + "2024-06-26 13:01:06 +0000 | io:INFO | Loaded TOML config file successfully.\n" ] } ], "source": [ - "import pandas as pd\n", + "from lang_main import io\n", "\n", - "from lang_main.analysis.preprocessing import numeric_pre_filter_feature" + "from pathlib import Path\n", + "import pickle\n", + "import base64" ] }, { "cell_type": "code", - "execution_count": 8, - "id": "492f6106-b60b-47f3-bb82-7f831028a8d9", + "execution_count": 56, + "id": "4256081a-6364-4e8f-8cfd-799912ca6b94", "metadata": {}, "outputs": [], "source": [ - "data = {\n", - " 'col1': range(10),\n", - " 'col2': range(10),\n", - "}" + "res_path = Path(r'A:\\Arbeitsaufgaben\\lang-main\\scripts\\results\\test_20240619')\n", + "assert res_path.exists()" ] }, { "cell_type": "code", - "execution_count": 9, - "id": "966a6e04-6e4c-4962-a3b1-51370c1e1571", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
col1col2
000
111
222
333
444
555
666
777
888
999
\n", - "
" - ], - "text/plain": [ - " col1 col2\n", - "0 0 0\n", - "1 1 1\n", - "2 2 2\n", - "3 3 3\n", - "4 4 4\n", - "5 5 5\n", - "6 6 6\n", - "7 7 7\n", - "8 8 8\n", - "9 9 9" - ] - }, - "execution_count": 9, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df = pd.DataFrame.from_dict(data)\n", - "df" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "456fca6a-0ce6-4f81-bf3b-edf370670243", - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": 10, - "id": "0675a24d-16f9-46b7-86da-140fcc664d8e", + "execution_count": 121, + "id": "e9a92ad6-5e63-49c4-b9e7-9f81da8549fe", "metadata": {}, "outputs": [], "source": [ - "d, = numeric_pre_filter_feature(df, 'col1', 3, 5)" + "# obj = 'TK-GRAPH_POSTPROCESSING.pkl'\n", + "obj = 'TK-GRAPH_ANALYSIS.pkl'\n", + "load_pth = res_path / obj\n", + "assert load_pth.exists()" ] }, { "cell_type": "code", - "execution_count": 11, - "id": "3092e20f-a2e3-42c3-afad-aa6f05a79d8e", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
col1col2
333
444
555
\n", - "
" - ], - "text/plain": [ - " col1 col2\n", - "3 3 3\n", - "4 4 4\n", - "5 5 5" - ] - }, - "execution_count": 11, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "d" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "e1ae2606-98d0-4554-86ae-c7cc830bc81d", - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "b4377b3a-abfa-4154-b006-813d5625cbea", - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": 8, - "id": "93896a5f-cb6c-4a17-9c17-818da4cd9584", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "0 False\n", - "1 False\n", - "2 False\n", - "3 True\n", - "4 True\n", - "Name: col1, dtype: bool" - ] - }, - "execution_count": 8, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "f1 = df['col1'] > 2\n", - "f1" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "id": "6752944d-4d20-486b-bbde-47f2a27a09e5", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "0 True\n", - "1 True\n", - "2 True\n", - "3 True\n", - "4 False\n", - "Name: col1, dtype: bool" - ] - }, - "execution_count": 9, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "f2 = df['col1'] < 4\n", - "f2" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "id": "65bc71ca-4c23-49a8-ba54-3497e555978b", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "0 False\n", - "1 False\n", - "2 False\n", - "3 True\n", - "4 False\n", - "Name: col1, dtype: bool" - ] - }, - "execution_count": 10, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "f1 & f2" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "id": "774c857f-d5d5-48f4-9064-9d0e4947d315", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "4" - ] - }, - "execution_count": 12, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df['col1'].max()" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "id": "a6855e4d-c678-45cd-bb34-c413c4591146", - "metadata": {}, - "outputs": [], - "source": [ - "from collections.abc import Callable" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "id": "7d449844-16d9-44cb-ae9f-700de74c5b1e", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'Callable'" - ] - }, - "execution_count": 6, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "Callable.__name__" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "id": "46a3897d-9910-426d-b5b8-c9c8f11b1b3d", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
col1col2
000
111
222
333
444
555
666
777
888
999
\n", - "
" - ], - "text/plain": [ - " col1 col2\n", - "0 0 0\n", - "1 1 1\n", - "2 2 2\n", - "3 3 3\n", - "4 4 4\n", - "5 5 5\n", - "6 6 6\n", - "7 7 7\n", - "8 8 8\n", - "9 9 9" - ] - }, - "execution_count": 12, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "(df,)" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "id": "7017f5ae-6be9-4059-b41c-5f2ba4ad0202", - "metadata": {}, - "outputs": [], - "source": [ - "def test(ret):\n", - " print(ret)" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "id": "043baf70-aa27-4412-9cc0-9fc12a916021", - "metadata": {}, - "outputs": [], - "source": [ - "import networkx as nx" - ] - }, - { - "cell_type": "code", - "execution_count": 20, - "id": "e8f7d226-601d-4563-9103-642d012f0ebf", - "metadata": {}, - "outputs": [], - "source": [ - "G = nx.path_graph(5)" - ] - }, - { - "cell_type": "code", - "execution_count": 22, - "id": "2642d9d9-dc9c-4f73-9a18-cb3a773c70e2", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "NodeView((0, 1, 2, 3, 4))" - ] - }, - "execution_count": 22, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [] - }, - { - "cell_type": "code", - "execution_count": 23, - "id": "ebb4d78b-008c-4ca7-954b-ad6fb4320535", - "metadata": {}, - "outputs": [ - { - "ename": "TypeError", - "evalue": "test() takes 1 positional argument but 5 were given", - "output_type": "error", - "traceback": [ - "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[1;31mTypeError\u001b[0m Traceback (most recent call last)", - "Cell \u001b[1;32mIn[23], line 1\u001b[0m\n\u001b[1;32m----> 1\u001b[0m \u001b[43mtest\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mG\u001b[49m\u001b[43m)\u001b[49m\n", - "\u001b[1;31mTypeError\u001b[0m: test() takes 1 positional argument but 5 were given" - ] - } - ], - "source": [ - "test(*G)" - ] - }, - { - "cell_type": "code", - "execution_count": 27, - "id": "f02f3099-19e8-4d24-8f8d-0d34aea4cf54", + "execution_count": 122, + "id": "c2421d89-ed8c-41dd-b363-ad5b5b716704", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Graph with 5 nodes and 4 edges\n" + "2024-06-26 13:22:38 +0000 | io:INFO | Loaded file successfully.\n" ] } ], "source": [ - "if not isinstance(G, tuple):\n", - " ret = (G,)\n", - "test(*ret)" + "ret = io.load_pickle(load_pth)" ] }, { "cell_type": "code", - "execution_count": 28, - "id": "500549ea-1142-4070-be16-a41bb51489cf", + "execution_count": 123, + "id": "ca25a7f2-84af-4b5e-89d6-b139fca35617", "metadata": {}, "outputs": [], "source": [ - "t = True" + "tkg = ret[0]" ] }, { "cell_type": "code", - "execution_count": 29, - "id": "79ed1f52-73a1-43b7-a5a4-6beceacd20fc", + "execution_count": 124, + "id": "ff7e7ab6-67d9-4a2c-b668-cf10740f7542", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "-2" + "TokenGraph(name: TokenGraph, number of nodes: 143, number of edges: 163)" ] }, - "execution_count": 29, + "execution_count": 124, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "~t" + "tkg" ] }, { "cell_type": "code", - "execution_count": 30, - "id": "1902dd8d-4146-4095-8813-d26bbc84fdf9", + "execution_count": 125, + "id": "f0df3580-cea5-48cc-bdbc-2927dd446e1b", "metadata": {}, "outputs": [], "source": [ - "from pathlib import Path" + "import networkx as nx\n", + "from alph import alph, layout\n", + "import altair as alt" + ] + }, + { + "cell_type": "markdown", + "id": "f042b302-fa3c-45b0-8d7a-7a68b66bf595", + "metadata": {}, + "source": [ + "layout_fn=lambda g: nx.spring_layout(\n", + " g,\n", + " weight=\"weight\",\n", + " k=20,\n", + " iterations=5000,\n", + " seed=42\n", + " ),\n", + "layout_fn=lambda g: layout.force_atlas_sknet(\n", + " g,\n", + " n_iter=100,\n", + " gravity_factor=0.01,\n", + " repulsive_factor=0.1,\n", + " init_seed=42,\n", + " )," ] }, { "cell_type": "code", - "execution_count": 32, - "id": "51a6ee63-f08c-445b-92b5-4cc725dc91a9", + "execution_count": 257, + "id": "04d3d857-37cb-420e-8426-b1465d94efae", "metadata": {}, "outputs": [], "source": [ - "cwd = Path.cwd()" + "alph_params = dict(\n", + " weight_attr=\"weight\",\n", + " layout_fn=lambda g: nx.nx_agraph.pygraphviz_layout(\n", + " g,\n", + " prog=\"fdp\",\n", + " args='-GK=5'\n", + " ),\n", + " node_args=dict(\n", + " size=alt.Size(\n", + " \"degree_centrality\",\n", + " scale=alt.Scale(domain=[0,1], range=[12**2, 40**2]),\n", + " legend=None\n", + " ),\n", + " #fill=alt.Color(\n", + " # \"degree_centrality\",\n", + " # scale=alt.Scale(domain=companies, range=palette),\n", + " #),\n", + " stroke=\"#333\",\n", + " strokeWidth=alt.Size(\n", + " \"degree_centrality\",\n", + " scale=alt.Scale(domain=[0,1], range=[2, 5]),\n", + " legend=None\n", + " ),\n", + " tooltip_attrs=[\"id\"],\n", + " label_attr=\"id\",\n", + " ),\n", + " edge_args=dict(\n", + " color=\"#000\",\n", + " ),\n", + " width=800,\n", + " height=600,\n", + ")" ] }, { "cell_type": "code", - "execution_count": 39, - "id": "8932d81b-99a4-4deb-87bf-af9de8b0013a", + "execution_count": 258, + "id": "64e6a5c1-e42d-4ad2-8c32-5cf62bc75852", "metadata": {}, "outputs": [], "source": [ - "results_pth = cwd.parent / 'scripts/results/test_20240619'" + "nx.set_node_attributes(tkg, {\n", + " n: {\n", + " \"id\": n,\n", + " } for n in tkg.nodes\n", + "})" ] }, { "cell_type": "code", - "execution_count": 41, - "id": "7051d693-b3ce-4ca8-88bd-6034042efe5d", + "execution_count": 259, + "id": "7e895f70-74a2-433c-91c2-a440303ab81a", + "metadata": {}, + "outputs": [], + "source": [ + "nx.set_node_attributes(tkg, nx.degree_centrality(tkg), \"degree_centrality\")" + ] + }, + { + "cell_type": "code", + "execution_count": 260, + "id": "a13cc710-01d8-4f52-b066-3796b4609118", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "\n", + "
\n", + "" + ], + "text/plain": [ + "alt.LayerChart(...)" + ] + }, + "execution_count": 260, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "alph(tkg, **alph_params).configure_view(strokeWidth=0)" + ] + }, + { + "cell_type": "code", + "execution_count": 261, + "id": "842e01fa-29cd-4028-9461-c7af24e01c33", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "[WindowsPath('A:/Arbeitsaufgaben/lang-main/scripts/results/test_20240619/Pipe-TargetFeature_Step-3_remove_NA.pkl'),\n", - " WindowsPath('A:/Arbeitsaufgaben/lang-main/scripts/results/test_20240619/TIMELINE.pkl'),\n", - " WindowsPath('A:/Arbeitsaufgaben/lang-main/scripts/results/test_20240619/Pipe-TargetFeature_Step-5_analyse_feature.pkl'),\n", - " WindowsPath('A:/Arbeitsaufgaben/lang-main/scripts/results/test_20240619/TOKEN_ANALYSIS.pkl'),\n", - " WindowsPath('A:/Arbeitsaufgaben/lang-main/scripts/results/test_20240619/TK-GRAPH_POSTPROCESSING.pkl'),\n", - " WindowsPath('A:/Arbeitsaufgaben/lang-main/scripts/results/test_20240619/TokenGraph.graphml'),\n", - " WindowsPath('A:/Arbeitsaufgaben/lang-main/scripts/results/test_20240619/TK-GRAPH_ANALYSIS.pkl'),\n", - " WindowsPath('A:/Arbeitsaufgaben/lang-main/scripts/results/test_20240619/TokenGraph-filtered.graphml'),\n", - " WindowsPath('A:/Arbeitsaufgaben/lang-main/scripts/results/test_20240619/Pipe-Timeline_Analysis_Step-1_remove_non_relevant_obj_ids.pkl'),\n", - " WindowsPath('A:/Arbeitsaufgaben/lang-main/scripts/results/test_20240619/TIMELINE_POSTPROCESSING.pkl')]" + "{'id': 'Wartungstätigkeit', 'degree_centrality': 0.04225352112676056}" ] }, - "execution_count": 41, + "execution_count": 261, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "list(results_pth.glob('*'))" - ] - }, - { - "cell_type": "code", - "execution_count": 42, - "id": "ea0a8a4e-cf00-4d1e-ad9a-3bc80863d33b", - "metadata": {}, - "outputs": [], - "source": [ - "target = Path('A:/Arbeitsaufgaben/lang-main/scripts/results/test_20240619/TIMELINE_POSTPROCESSING.pkl')\n", - "assert target.exists()" - ] - }, - { - "cell_type": "code", - "execution_count": 43, - "id": "5a637d0d-ec66-4bd8-b047-e57c68663860", - "metadata": {}, - "outputs": [], - "source": [ - "from lang_main.io import load_pickle" - ] - }, - { - "cell_type": "code", - "execution_count": 44, - "id": "7f4e2797-ec6e-4421-8006-4a218b63ddf0", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "2024-06-19 13:14:03 +0000 | io:INFO | Loaded file successfully.\n" - ] - } - ], - "source": [ - "ret = load_pickle(target)" - ] - }, - { - "cell_type": "code", - "execution_count": 46, - "id": "b3808e74-ba74-4b46-a64e-4f5f9f335868", - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "text/plain": [ - "2" - ] - }, - "execution_count": 46, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "len(ret)" - ] - }, - { - "cell_type": "code", - "execution_count": 47, - "id": "cc0e4dc4-504e-4442-8bb6-e3e604a4f701", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{1: ((8384, 452, 8398, 107864, 32988),\n", - " (780, 49325, 26519),\n", - " (10393, 1933),\n", - " (5438, 2607),\n", - " (12785, 3890, 37541, 7829),\n", - " (13906, 5499),\n", - " (6690, 68315, 115550),\n", - " (121315, 8127),\n", - " (22919, 11751),\n", - " (59632, 11761),\n", - " (90888, 100796, 11887),\n", - " (87480, 13109),\n", - " (14329, 17918),\n", - " (36691, 18532),\n", - " (29616, 76792),\n", - " (84034, 33859),\n", - " (36344, 56857),\n", - " (121760, 95085, 36686, 122066, 47476, 65786, 57563),\n", - " (40546, 65778),\n", - " (49393, 49636),\n", - " (53976, 117139, 55520),\n", - " (79962, 88540)),\n", - " 1654: ((111241,\n", - " 78986,\n", - " 6798,\n", - " 55952,\n", - " 1680,\n", - " 43411,\n", - " 43412,\n", - " 8084,\n", - " 122902,\n", - " 7579,\n", - " 2980,\n", - " 87479,\n", - " 119480,\n", - " 78778,\n", - " 66749,\n", - " 46790,\n", - " 57927,\n", - " 46791,\n", - " 1743,\n", - " 96080,\n", - " 57937,\n", - " 83,\n", - " 2774,\n", - " 98277,\n", - " 32229,\n", - " 67562,\n", - " 100461,\n", - " 4846,\n", - " 55024,\n", - " 117758),\n", - " (7552,\n", - " 8192,\n", - " 119558,\n", - " 647,\n", - " 2310,\n", - " 48781,\n", - " 66323,\n", - " 8214,\n", - " 5405,\n", - " 108961,\n", - " 91173,\n", - " 2985,\n", - " 3881,\n", - " 9917,\n", - " 66751,\n", - " 85442,\n", - " 118602,\n", - " 7243,\n", - " 62416,\n", - " 979,\n", - " 214,\n", - " 103,\n", - " 123111,\n", - " 81133,\n", - " 88558,\n", - " 14319,\n", - " 14834,\n", - " 2424,\n", - " 101497,\n", - " 25341,\n", - " 69375),\n", - " (85369, 1370),\n", - " (76317, 6063),\n", - " (6696, 113620, 50223),\n", - " (10859, 75412),\n", - " (121970, 11303),\n", - " (31352, 31590),\n", - " (34634, 121293),\n", - " (77686, 43639),\n", - " (108202, 48391),\n", - " (78155, 110755),\n", - " (78889, 117391),\n", - " (85960, 78895),\n", - " (87481, 106398),\n", - " (117081, 109158)),\n", - " 7: ((5120,\n", - " 87301,\n", - " 648,\n", - " 119560,\n", - " 74382,\n", - " 66583,\n", - " 7066,\n", - " 80671,\n", - " 122401,\n", - " 97316,\n", - " 120614,\n", - " 47659,\n", - " 46765,\n", - " 71729,\n", - " 49331,\n", - " 8380,\n", - " 54208,\n", - " 8642,\n", - " 80195,\n", - " 2120,\n", - " 122314,\n", - " 3788,\n", - " 87379,\n", - " 30421,\n", - " 121307,\n", - " 122336,\n", - " 123105,\n", - " 86118,\n", - " 81771,\n", - " 75118,\n", - " 4719,\n", - " 116977,\n", - " 5492,\n", - " 9590,\n", - " 9591,\n", - " 3963,\n", - " 9214),\n", - " (1002, 78291),\n", - " (52680, 1642),\n", - " (4633, 109068),\n", - " (5081, 65787, 72943),\n", - " (113995, 6068),\n", - " (100500, 8804),\n", - " (72251, 12548),\n", - " (18152, 123168),\n", - " (22694, 36783),\n", - " (107560, 39036, 107502, 41735),\n", - " (116905, 117242),\n", - " (122082, 122533)),\n", - " 151: ((65508, 61861, 18087, 8, 39858, 4437, 100283),\n", - " (128, 10478),\n", - " (38404,\n", - " 4619,\n", - " 120855,\n", - " 83484,\n", - " 47644,\n", - " 14884,\n", - " 59442,\n", - " 15932,\n", - " 93761,\n", - " 86091,\n", - " 24153,\n", - " 2138,\n", - " 47199,\n", - " 121969,\n", - " 1650,\n", - " 1656,\n", - " 68219,\n", - " 57980,\n", - " 56963,\n", - " 63108,\n", - " 8328,\n", - " 62088,\n", - " 76962,\n", - " 18098,\n", - " 74418,\n", - " 49334,\n", - " 10936,\n", - " 10437,\n", - " 77003,\n", - " 13521,\n", - " 86226,\n", - " 122071,\n", - " 2776,\n", - " 59613,\n", - " 44261,\n", - " 67335,\n", - " 778,\n", - " 59659,\n", - " 25363,\n", - " 74527,\n", - " 13089,\n", - " 19749,\n", - " 77095,\n", - " 79658,\n", - " 50999,\n", - " 1857,\n", - " 14146,\n", - " 15681,\n", - " 24899,\n", - " 15682,\n", - " 94534,\n", - " 11088,\n", - " 8023,\n", - " 53084,\n", - " 10083,\n", - " 114024,\n", - " 5490,\n", - " 100211,\n", - " 89978,\n", - " 60287,\n", - " 30083,\n", - " 75658,\n", - " 18327,\n", - " 34205,\n", - " 91038,\n", - " 96159,\n", - " 46496,\n", - " 100282,\n", - " 18364,\n", - " 8128,\n", - " 84445,\n", - " 97758,\n", - " 62431,\n", - " 121309,\n", - " 9714,\n", - " 8694,\n", - " 8695,\n", - " 8697,\n", - " 79357,\n", - " 66047),\n", - " (1440, 66963, 5069),\n", - " (11346, 2427),\n", - " (9824, 117698, 14331, 109159, 48463, 2964, 8696, 29083),\n", - " (5744, 5571, 15974),\n", - " (9000, 117132),\n", - " (113153, 9157),\n", - " (47877, 11767),\n", - " (14883, 14885),\n", - " (18362, 65854),\n", - " (27568, 115879),\n", - " (121292, 38870),\n", - " (60025, 57890, 44707),\n", - " (81978, 62091),\n", - " (95982, 112287)),\n", - " 140: ((240, 14336),\n", - " (76832,\n", - " 8259,\n", - " 74211,\n", - " 122310,\n", - " 122311,\n", - " 33288,\n", - " 93864,\n", - " 116265,\n", - " 3886,\n", - " 75411,\n", - " 11764,\n", - " 2260,\n", - " 49397,\n", - " 46202,\n", - " 121887),\n", - " (74381, 117909)),\n", - " 20: ((1601, 65811, 113997, 102023),\n", - " (10944, 91868),\n", - " (14841, 11852),\n", - " (44296, 23694),\n", - " (117225, 26212, 24430, 47638),\n", - " (91000, 33710),\n", - " (56816, 39340)),\n", - " 21: ((49608, 15970),\n", - " (122898, 36301),\n", - " (81480, 51043),\n", - " (54844, 119479),\n", - " (119633, 86225, 112289),\n", - " (107323, 114334, 121595)),\n", - " 1652: ((68574, 22),\n", - " (24164,\n", - " 43815,\n", - " 201,\n", - " 1193,\n", - " 81773,\n", - " 36687,\n", - " 82802,\n", - " 116978,\n", - " 8211,\n", - " 62837,\n", - " 122547,\n", - " 5526),\n", - " (83458, 108291, 1901, 95981, 5523, 8212, 46229, 5528, 48857, 63325),\n", - " (5569, 49571, 53358, 78991, 32478),\n", - " (19769, 43237),\n", - " (22939, 25174),\n", - " (49324, 25172),\n", - " (28778, 47549, 65390),\n", - " (113290, 54460)),\n", - " 1656: ((1987, 9334),),\n", - " 138: ((1723, 48780),\n", - " (9953, 47331, 27560, 67560, 94796, 11768, 30558),\n", - " (14592, 14777)),\n", - " 137: ((74900, 84), (27249, 48108), (68795, 77909, 68799)),\n", - " 141: ((68810, 62346), (122308, 122309)),\n", - " 1808: ((4716, 60), (2488, 117713), (13386, 121523), (57088, 17745, 65852)),\n", - " 22: ((121608, 108177, 1013), (4650, 19258), (83425, 7615), (86748, 78175)),\n", - " 1139: ((8661, 1585, 8161, 48182),\n", - " (8656, 8163, 8164),\n", - " (8657, 8658, 8662),\n", - " (47512, 47513),\n", - " (121625, 48171, 48173, 47831),\n", - " (116498, 69796, 116502, 48063),\n", - " (69603, 69779, 69780, 69749, 69781)),\n", - " 144: ((7619, 14718),\n", - " (7817, 66732),\n", - " (10318, 121623),\n", - " (68541, 19798),\n", - " (98410, 96332)),\n", - " 306: ((18530, 121384, 74889, 74890, 4830),\n", - " (6505, 86631),\n", - " (22380, 22381),\n", - " (50033, 56964)),\n", - " 345: ((12776, 75162, 9934, 78167),),\n", - " 346: ((9723, 27084), (121770, 21218)),\n", - " 1662: ((14150,\n", - " 8327,\n", - " 84166,\n", - " 79530,\n", - " 65809,\n", - " 95955,\n", - " 117143,\n", - " 47769,\n", - " 77339,\n", - " 8700,\n", - " 10943),\n", - " (39625, 96202, 51188, 14143),\n", - " (97094, 107724, 76998)),\n", - " 347: ((32330, 60182), (62808, 122944)),\n", - " 1663: ((19684, 51608, 121294, 59154, 17912),\n", - " (43489, 52901, 71654),\n", - " (122897, 62522, 68074),\n", - " (76288, 120024),\n", - " (76571, 122535)),\n", - " 405: ((59658, 97198), (75989, 75991)),\n", - " 337: ((69251,\n", - " 69924,\n", - " 121891,\n", - " 77381,\n", - " 121607,\n", - " 118759,\n", - " 53033,\n", - " 76875,\n", - " 32268,\n", - " 101389,\n", - " 34297,\n", - " 101951,\n", - " 107664,\n", - " 33585,\n", - " 101111,\n", - " 30489,\n", - " 54846,\n", - " 12447),\n", - " (25913, 35380, 59767),\n", - " (67082, 27076)),\n", - " 336: ((1681, 7819), (122875, 6703), (35336, 14145), (63570, 67211, 37247)),\n", - " 69: ((5568, 25747), (10380, 7367), (65875, 118679)),\n", - " 1657: ((462, 463),),\n", - " 65: ((56, 107325), (5504, 116326), (48517, 122502, 39436, 123157, 8381)),\n", - " 73: ((48110, 9998), (62332, 14342), (37235, 18140)),\n", - " 84: ((3330, 94810, 11754), (76674, 96677)),\n", - " 250: ((120681, 756),\n", - " (27908, 104166),\n", - " (28336, 95705),\n", - " (64057, 121380, 84493, 33494)),\n", - " 1809: ((26853, 90158),),\n", - " 79: ((123104, 10049), (113633, 12663), (32481, 118199), (48485, 81686)),\n", - " 325: ((57060, 18001, 75987, 533, 49974, 8701),),\n", - " 90: ((108827, 120790, 679),\n", - " (49323, 12868),\n", - " (76501, 45269, 80006),\n", - " (47752, 68072)),\n", - " 63: ((7584, 32449), (55009, 44970), (59404, 79655)),\n", - " 96: ((8805, 6933), (57977, 7837, 8223), (93856, 92995, 92989, 92990)),\n", - " 326: ((86120, 5079), (5538, 19911)),\n", - " 72: ((14892, 36022), (76539, 116822)),\n", - " 193: ((5065, 49326, 13262, 118431),),\n", - " 315: ((14105, 1082, 121822, 107351),\n", - " (79821, 66746, 13645),\n", - " (32457, 62125, 22686),\n", - " (47634, 47628)),\n", - " 59: ((10470, 122411, 6096, 53974, 107542, 188),\n", - " (8584, 43422),\n", - " (122377, 122371)),\n", - " 136: ((77236, 1687),),\n", - " 67: ((116865, 8996),\n", - " (10373, 111190),\n", - " (22041, 100060),\n", - " (53081, 110209),\n", - " (68257, 94242)),\n", - " 195: ((18537, 13271), (117128, 60213)),\n", - " 91: ((48401, 6706, 79566), (81730, 118223)),\n", - " 74: ((23688, 22052),),\n", - " 51: ((8281, 62333), (10930, 91410), (62348, 73454)),\n", - " 77: ((91514, 47716), (80933, 58157), (67970, 76140)),\n", - " 60: ((14890, 25911), (47898, 31254)),\n", - " 2166: ((6065, 11770, 117244), (29104, 49400, 48395, 107566), (78153, 93855)),\n", - " 186: ((56752, 12793), (47754, 47751), (80609, 62887), (122926, 88686)),\n", - " 76: ((35379, 32255), (88634, 111188)),\n", - " 100: ((35874, 51382), (38866, 56764)),\n", - " 121: ((68817, 6707), (24467, 12981, 101382), (103314, 87483)),\n", - " 78: ((11348, 35527), (22049, 70101)),\n", - " 2165: ((6064, 7622), (47720, 78148), (108234, 69700)),\n", - " 70: ((117080, 107084),),\n", - " 407: ((68655, 108238, 59631), (122520, 77237), (103313, 80724)),\n", - " 66: ((121971, 6540),),\n", - " 109: ((118579, 122383, 10071),),\n", - " 132: ((9411, 9407),),\n", - " 94: ((108872, 49140),),\n", - " 2480: ((70098, 122358),),\n", - " 115: ((23690, 1828), (14844, 14886)),\n", - " 80: ((97974, 96158, 9775),),\n", - " 114: ((61920, 8083), (11819, 49559)),\n", - " 111: ((46185, 26180),),\n", - " 92: ((10816, 27753), (29105, 25916), (39364, 81693), (48570, 110782)),\n", - " 110: ((16578, 16579, 53818, 109071), (121767, 106447)),\n", - " 317: ((1304, 52642, 108227, 67563), (7523, 13524), (122337, 117131)),\n", - " 68: ((6675, 71508),),\n", - " 180: ((9690, 9691),),\n", - " 54: ((79915, 112391),),\n", - " 1126: ((41736,\n", - " 41737,\n", - " 74826,\n", - " 116171,\n", - " 122315,\n", - " 106863,\n", - " 106864,\n", - " 72945,\n", - " 79356,\n", - " 116413),),\n", - " 318: ((4240, 57381), (68788, 35509)),\n", - " 108: ((97248, 80260, 49558, 8399), (121376, 121386, 107527)),\n", - " 58: ((1025, 80194, 9671), (17755, 10053), (83954, 83980)),\n", - " 107: ((14314, 14316),),\n", - " 47: ((46192, 92986),),\n", - " 98: ((8708, 19669),),\n", - " 113: ((3787, 2487), (28228, 89317), (91459, 91460)),\n", - " 81: ((1353, 47948),),\n", - " 181: ((7590, 7558, 3789, 98621, 48925), (118193, 91866), (122878, 113622)),\n", - " 119: ((13539, 9677, 14320, 1685, 13342),),\n", - " 309: ((54520, 106318),),\n", - " 127: ((5416, 5417, 9344),),\n", - " 53: ((7571, 9646),),\n", - " 75: ((10335, 9999),),\n", - " 95: ((32450, 32451, 33374),),\n", - " 218: ((111609, 6677),),\n", - " 120: ((108132, 6097, 62652), (94042, 108829, 118677)),\n", - " 149: ((57963, 9710),),\n", - " 123: ((7435, 49607),),\n", - " 183: ((118195, 140, 90998), (89451, 33012)),\n", - " 135: ((92984, 94489), (123392, 108873)),\n", - " 116: ((4656, 94895),),\n", - " 255: ((57065, 43995),),\n", - " 152: ((3517, 94663), (78882, 93595, 10085)),\n", - " 57: ((27083, 9685),),\n", - " 388: ((7060, 829), (96161, 55060)),\n", - " 319: ((14344, 14343),),\n", - " 44: ((40092, 40093, 678), (6919, 6503)),\n", - " 148: ((77001, 9330), (10030, 107015), (73497, 108083)),\n", - " 316: ((10381, 52399),),\n", - " 89: ((27457, 321, 65784), (48464, 55188)),\n", - " 625: ((61634, 49291, 68773), (86638, 86079)),\n", - " 220: ((81465, 83663),),\n", - " 311: ((66839, 13295),),\n", - " 64: ((8641, 7347),),\n", - " 338: ((76177, 4636), (9817, 67083)),\n", - " 145: ((34424, 68772),),\n", - " 175: ((17756, 14893, 75918, 33239),),\n", - " 698: ((12665, 49141), (59760, 67421)),\n", - " 52: ((6691, 6207),),\n", - " 129: ((13264, 9909),),\n", - " 241: ((7585, 6510, 8799),),\n", - " 182: ((122069, 82695),),\n", - " 895: ((68753, 53322),),\n", - " 122: ((88640, 56996),),\n", - " 41: ((122317, 5406),),\n", - " 259: ((3880, 65892),),\n", - " 404: ((65386, 65774),),\n", - " 214: ((114641, 6511), (25396, 32646)),\n", - " 167: ((18841, 56813),),\n", - " 153: ((22040, 7572),),\n", - " 2562: ((356, 2006),),\n", - " 1348: ((114, 71916),),\n", - " 223: ((33858, 114335),),\n", - " 894: ((48524, 33375),),\n", - " 168: ((102208, 97309),),\n", - " 112: ((29491, 113284),),\n", - " 256: ((50031, 48455),),\n", - " 312: ((75414, 3534),),\n", - " 423: ((4829, 86637), (34304, 86632)),\n", - " 157: ((78881, 81774),),\n", - " 126: ((34909, 122503),),\n", - " 213: ((113650, 120933),),\n", - " 1659: ((4241, 44251),),\n", - " 184: ((86956, 27085),),\n", - " 432: ((54666, 108092),),\n", - " 216: ((108024, 7226),),\n", - " 281: ((106445, 106454),),\n", - " 170: ((1385, 15683), (112720, 96679)),\n", - " 1705: ((83868, 55951),),\n", - " 232: ((31648, 47707),),\n", - " 171: ((102032, 121896),),\n", - " 279: ((7816, 93859),),\n", - " 632: ((76176, 75917),),\n", - " 626: ((12448, 67212),),\n", - " 1124: ((93825, 49364),),\n", - " 1152: ((98472, 37234),)}" - ] - }, - "execution_count": 47, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "ret[0]" - ] - }, - { - "cell_type": "code", - "execution_count": 48, - "id": "987e5afb-bdbd-4762-8941-4a3c52c21910", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{244: '285 C, Webmaschine, SG 220 EMS',\n", - " 257: '107, Webmaschine, OM 220 EOS',\n", - " 138: '00138, Schärmaschine 9',\n", - " 241: '294 C, Webmaschine, SG 240 EMS',\n", - " 151: '00151, Bandschneidmaschine 4 / Kitamura',\n", - " 52: '506 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 75: '442 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 1: '00001, Ausrüstungsanlage 1',\n", - " 325: 'B41, Niederhubwagen',\n", - " 213: 'A009, Webmaschine, DL 280 EMS Breite 280',\n", - " 59: '514 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 22: '00022, Lasercutter 4',\n", - " 1652: '01652, Vorwerk allgemein',\n", - " 98: '476 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 515: 'B52, Elektro-Kettbaumhubwagen',\n", - " 233: '292 C, Webmaschine, SG 240 EMS',\n", - " 307: 'B05, Deichselstapler mit Dorn',\n", - " 232: '291 C, Webmaschine, SG 240 EMS',\n", - " 132: '411 C , Webmaschine, DL 240 EMS',\n", - " 403: '00403, Schärmaschine 10 - Matthys',\n", - " 219: 'A006, Webmaschine, DL 280 EMS Breite 280',\n", - " 195: 'B36, Niederhubwagen',\n", - " 337: '00337, Bändchenablängmaschine 1',\n", - " 65: '434 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 1808: '01809, Labor allgemein',\n", - " 253: '103, Webmaschine, OM 220 EOS',\n", - " 1654: 'WEBEREI ALLGEMEIN, Weberei allgemein',\n", - " 64: '435 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 131: '412 C , Webmaschine, DL 240 EMS',\n", - " 1705: 'EINZIEHEREI ALLGEMEIN, EINZIEHEREI ALLGEMEIN',\n", - " 121: '217 C , Webmaschine, DL 280 EMS Breite 280',\n", - " 63: '517 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 141: '00141, Schlichtmaschine 5 - Sucker',\n", - " 137: '00137, Schärmaschine 7 - Matthys',\n", - " 174: 'A031 , Webmaschine, DL 280 EMS Breite 280',\n", - " 217: 'A005, Webmaschine, DL 280 EMS Breite 280',\n", - " 130: '201 C , Webmaschine, DL 320 EMS',\n", - " 212: 'A007, Webmaschine, DL 280 EMS Breite 280',\n", - " 344: '00347, Warenschautisch 3',\n", - " 1344: '01344, Inline Scanner',\n", - " 82: '453 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 1348: '01348, Filteranlage für Lasercutter 2',\n", - " 248: '277, Webmaschine, SG 220 EMS',\n", - " 66: '433 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 79: '456 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 242: '295 C, Webmaschine, SG 240 EMS',\n", - " 133: '413 C , Webmaschine, DL 240 EMS',\n", - " 7: '00007, Ausrüstung 2',\n", - " 69: '448 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 140: '00140, Schlichtmaschine 4 - Sucker',\n", - " 222: '274 C, Webmaschine, DL 280 EMS Breite 280',\n", - " 183: '223 C, Webmaschine, DL 280 EMS Breite 280',\n", - " 256: '106, Webmaschine, OM 220 EOS',\n", - " 193: 'B18, Hochhubwagen',\n", - " 144: '00144, Zettelmaschine 1',\n", - " 352: '00352, Ultraschallschweißanlage 1',\n", - " 427: '00428, Nähmaschine Tisch 6',\n", - " 324: 'B42, Hochhubwagen',\n", - " 179: '206 S SI , Webmaschine, DL 280 EMS Breite 220',\n", - " 318: 'B45, Niederhubwagen',\n", - " 58: '513 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 20: '00020, Lasercutter 2',\n", - " 311: 'B12 (A), Regalbediengerät',\n", - " 1656: 'GRUNDSTÜCK UND GEBÄUDE, Grundstück und Gebäude',\n", - " 92: '468 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 125: '622 C , Webmaschine, DL 280 EMS Breite 280',\n", - " 2473: 'A056, Webmaschine Jacquard',\n", - " 96: '474 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 21: '00021, Lasercutter 3',\n", - " 89: '465 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 2562: 'TECHNISCHE ENTWICKLUNG ALLGEMEIN, TECHNISCHE ENTWICKLUNG ALLGEMEIN',\n", - " 346: '00349, Warenschautisch 5',\n", - " 319: 'B47, Niederhubwagen',\n", - " 347: '00350, Warenschautisch 6',\n", - " 1660: '01660, Laser 4 allgemein',\n", - " 100: '478 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 71: '446 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 1657: 'WARENSCHAU ALLGEMEIN, Warenschau allgemein',\n", - " 289: 'B16, Niederhubwagen',\n", - " 338: '00338, Bändchenablängmaschine 2',\n", - " 252: '102, Webmaschine, OM 220 EOS',\n", - " 345: '00348, Warenschautisch 4',\n", - " 145: '00145, Zettelmaschine 2 - Mayer',\n", - " 633: 'R18, Schnelllauftor',\n", - " 625: 'R08 , Schnelllauftor',\n", - " 255: '105, Webmaschine, OM 220 EOS',\n", - " 943: '01723, Klimaanlage Saal 4',\n", - " 115: '415 C , Webmaschine, DL 280 EMS Breite 280',\n", - " 171: 'A028 , Webmaschine, DL 280 EMS Breite 280',\n", - " 97: '475 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 220: '271 C, Webmaschine, DL 280 EMS Breite 280',\n", - " 114: '427 C , Webmaschine, DL 280 EMS Breite 280',\n", - " 68: '431 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 225: '261 S M, Webmaschine, DG 220 SMS',\n", - " 328: 'B43, Niederhubwagen',\n", - " 44: '605 , Webmaschine, DL 190 SOS',\n", - " 90: '466 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 894: 'U22, Kippgerät (Versand)',\n", - " 166: 'A023 , Webmaschine, DL 280 EMS Breite 280',\n", - " 180: '207 C S SI, Webmaschine, DL 280 EMS Breite 220',\n", - " 250: '141C, Webmaschine, OM280SOS',\n", - " 72: '445 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 333: 'B27, Kettbaum- und Dockentransportwagen',\n", - " 2318: 'A067, Webmaschine, DL 280 EMS Breite 280',\n", - " 388: 'H31.1, Deckenlaufkran',\n", - " 288: 'B10, Ketteinlegewagen',\n", - " 1655: 'VERSAND ALLGEMEIN, Versand allgemein',\n", - " 117: '213 C , Webmaschine, DL 280 EMS Breite 280',\n", - " 56: '511 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 422: '00422, Knotex 1',\n", - " 315: 'B15, Niederhubwagen',\n", - " 245: '296 C, Webmaschine, SG 240 EMS',\n", - " 426: '00427, Nähmaschine Tisch 4',\n", - " 343: '00344, Warenschautisch 2',\n", - " 43: '604 , Webmaschine, DL 190 SOS',\n", - " 45: '606 , Webmaschine, DL 190 SOS',\n", - " 76: '441 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 197: 'B39, Niederhubwagen',\n", - " 19: '00018, Lasercutter 1',\n", - " 106: '436 C , Webmaschine, DL 280 EMS Breite 280',\n", - " 186: '245 J, Webmaschine Jacquard',\n", - " 119: '215 C , Webmaschine, DL 280 EMS Breite 280',\n", - " 107: '437 C , Webmaschine, DL 280 EMS Breite 280',\n", - " 2551: 'ERSTE-HILFE 7-1, Erste-Hilfe-Koffer 7',\n", - " 164: 'A021 , Webmaschine, DL 280 EMS Breite 280',\n", - " 2165: 'A060, Webmaschine Jacquard',\n", - " 91: '467 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 110: '423 C , Webmaschine, DL 280 EMS Breite 280',\n", - " 317: 'B35, Niederhubwagen',\n", - " 326: 'B38, Niederhubwagen',\n", - " 81: '454 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 109: '422 C , Webmaschine, DL 280 EMS Breite 280',\n", - " 122: '610 C , Webmaschine, DL 280 EMS Breite 280',\n", - " 1244: '251 C, Webmaschine, DL 280 EMS Breite 280',\n", - " 335: 'B23 (A), Niederhubwagen',\n", - " 170: 'A027 , Webmaschine, DL 280 EMS Breite 280',\n", - " 1179: 'KOMPRESSORSTATION 2, Allgemein',\n", - " 229: '266 C S N, Webmaschine, DG 260 EMS',\n", - " 148: '00148, Bandschneidmaschine 1',\n", - " 182: '222 C, Webmaschine, DL 280 EMS Breite 280',\n", - " 240: '293 C, Webmaschine, SG 240 EMS',\n", - " 1139: '01139, Ausrüstung 2 / Spannrahmen',\n", - " 405: '00405, Assembliermaschine 8',\n", - " 73: '444 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 85: '461 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 1698: '01698, Kesselhaus',\n", - " 407: '00407, Einziehmaschine Delta 110',\n", - " 336: 'B22, Ketteinlegewagen',\n", - " 80: '455 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 136: '00136, Schärmaschine 3 - Benninger',\n", - " 127: '624 C , Webmaschine, DL 280 EMS Breite 280',\n", - " 60: '515 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 1794: 'A058, Webmaschine Jacquard',\n", - " 624: 'R07 , Schnelllauftor',\n", - " 455: 'I.1.5.5, Brandschutzschiebetor',\n", - " 1151: '01151, Ausrüstung 2 / Dosier- und Mischanlage',\n", - " 2316: 'A065, Webmaschine, DL 280 EMS Breite 280',\n", - " 123: '620 C , Webmaschine, DL 280 EMS Breite 280',\n", - " 1663: '01663, Bandschneiderei allgemein',\n", - " 2654: '202, Webmaschine',\n", - " 2480: '00352, Ultraschallschweißanlage 1',\n", - " 214: 'A010, Webmaschine, DL 280 EMS Breite 280',\n", - " 1795: 'A054.S, Jacquardmaschine',\n", - " 1695: 'GRUNDSTÜCK UND GEBÄUDE ERWEITERUNG NORD, Grundstück und Gebäude Erweiterung Nord',\n", - " 46: '607 , Webmaschine, DL 190 SOS',\n", - " 70: '447 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 178: '205 C S SI, Webmaschine, DL 280 EMS Breite 220',\n", - " 224: '276 C, Webmaschine, DL 280 EMS Breite 280',\n", - " 86: '462 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 51: '507 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 629: 'R12 , Schnelllauftor',\n", - " 99: '477 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 113: '426 C , Webmaschine, DL 280 EMS Breite 280',\n", - " 1809: 'LASER ALLGEMEIN, Laser allgemein',\n", - " 351: 'B40, Stückauslegewagen',\n", - " 112: '425 C , Webmaschine, DL 280 EMS Breite 280',\n", - " 111: '424 C , Webmaschine, DL 280 EMS Breite 280',\n", - " 108: '421 C , Webmaschine, DL 280 EMS Breite 280',\n", - " 162: 'A020 , Webmaschine, DL 280 EMS Breite 280',\n", - " 135: '408 C, Webmaschine, DL 240 EMS',\n", - " 129: '626 C , Webmaschine, DL 280 EMS Breite 280',\n", - " 116: '212 C , Webmaschine, DL 280 EMS Breite 280',\n", - " 181: '221 C, Webmaschine, DL 280 EMS Breite 280',\n", - " 84: '451 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 53: '505 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 128: '211 C , Webmaschine, DL 280 EMS Breite 280',\n", - " 152: 'A001, Webmaschine, DL 280 EMS Breite 280',\n", - " 312: 'B12, Regalbediengerät',\n", - " 157: 'A015 , Webmaschine, DL 280 EMS Breite 280',\n", - " 640: 'R35, Schnelllauftor',\n", - " 259: '109, Webmaschine, OM 220 EOS',\n", - " 176: 'A033 , Webmaschine, DL 280 EMS Breite 280',\n", - " 277: 'A046, Webmaschine, DL 280 EMS Breite 280',\n", - " 1126: '01126, Ausrüstung 2 / 0900-Streichmaschine',\n", - " 83: '452 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 74: '443 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 1659: '01659, Laser 3 allgemein',\n", - " 1662: 'AUSRÜSTUNG 2 ALLGEMEIN, Ausrüstung 2 allgemein',\n", - " 274: 'A035, Webmaschine, DL 280 EMS Breite 280',\n", - " 423: '00423, Knotex 2',\n", - " 306: 'B04, Ketteinlegewagen',\n", - " 698: 'R13, Sektionaltor',\n", - " 94: '472 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 167: 'A024 , Webmaschine, DL 280 EMS Breite 280',\n", - " 54: '504 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 258: '108, Webmaschine, OM 220 EOS',\n", - " 2313: 'A062, Webmaschine, DL 280 EMS Breite 280',\n", - " 95: '473 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 41: '602, Webmaschine, DL 190 SOS',\n", - " 17: '601, Webmaschine, DL 190 SOS',\n", - " 961: 'A054, Webmaschine Jacquard',\n", - " 47: '608 , Webmaschine, DL 190 SOS',\n", - " 168: 'A025 , Webmaschine, DL 280 EMS Breite 280',\n", - " 87: '463 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 154: 'A003 , Webmaschine, DL 280 EMS Breite 280',\n", - " 1352: 'GESCHÄFTSLEITUNG, WC - Geschäftsleitung',\n", - " 93: '471 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 281: 'A051, Webmaschine, DL 280 EMS Breite 280',\n", - " 2166: 'A061, Webmaschine Jacquard',\n", - " 230: '255 C, Webmaschine, DG 250 EMS',\n", - " 118: '214 C , Webmaschine, DL 280 EMS Breite 280',\n", - " 77: '458 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 120: '216 C , Webmaschine, DL 280 EMS Breite 280',\n", - " 67: '432 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 424: '00425, Knotex 3',\n", - " 42: '603 , Webmaschine, DL 190 SOS',\n", - " 2315: 'A064, Webmaschine, DL 280 EMS Breite 280',\n", - " 2560: 'VETRIEB/VERKAUF ALLGEMEIN, VETRIEB/VERKAUF ALLGEMEIN',\n", - " 55: '503 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 309: 'B08, Niederhubwagen',\n", - " 153: 'A002 , Webmaschine, DL 280 EMS Breite 280',\n", - " 218: 'A004, Webmaschine, DL 280 EMS Breite 280',\n", - " 1799: 'A059.S, Jacquardmaschine',\n", - " 175: 'A032 , Webmaschine, DL 280 EMS Breite 280',\n", - " 280: 'A050, Webmaschine, DL 280 EMS Breite 280',\n", - " 2559: 'A070, Webmaschine Jacquard',\n", - " 348: 'B19, Schubmaststapler',\n", - " 273: 'A036, Webmaschine, DL 280 EMS Breite 280',\n", - " 78: '457 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 160: 'A018 , Webmaschine, DL 280 EMS Breite 280',\n", - " 216: 'A012, Webmaschine, DL 280 EMS Breite 280',\n", - " 404: '00404, Assembliermaschine 6',\n", - " 268: 'A041, Webmaschine, DL 280 EMS Breite 280',\n", - " 211: 'A008, Webmaschine, DL 280 EMS Breite 280',\n", - " 275: 'A048, Webmaschine, DL 280 EMS Breite 280',\n", - " 149: '00149, Bandschneidmaschine 2',\n", - " 626: 'R09 , Schnelllauftor',\n", - " 511: 'B29, Nassschrubbautomat',\n", - " 189: '246.S, Jacquardmaschine',\n", - " 683: 'R02, Sektionaltor',\n", - " 134: '414 C , Webmaschine, DL 240 EMS',\n", - " 184: '224 C, Webmaschine, DL 280 EMS Breite 280',\n", - " 279: 'A049, Webmaschine, DL 280 EMS Breite 280',\n", - " 172: 'A029 , Webmaschine, DL 280 EMS Breite 280',\n", - " 227: '262 S SI, Webmaschine, DG 220 SMS',\n", - " 349: 'B21, Hochhubwagen',\n", - " 251: '101, Webmaschine, OM 220 EOS',\n", - " 394: 'H15.2, Einschienenbahn',\n", - " 576: 'D76, Thermalölanlage',\n", - " 962: 'A055, Webmaschine Jaquard',\n", - " 61: '516 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 126: '623 C , Webmaschine, DL 280 EMS Breite 280',\n", - " 940: 'SAAL 7 - NORD, Klimaanlage - Saal 7',\n", - " 1350: '01350, Filteranlage für Lasercutter 4',\n", - " 266: 'A043, Webmaschine, DL 280 EMS Breite 280',\n", - " 432: 'B02 (ALT), Gabelstapler',\n", - " 223: '275 C, Webmaschine, DL 280 EMS Breite 280',\n", - " 231: '256 C, Webmaschine, DG 250 EMS',\n", - " 350: 'B34 (A), Niederhubwagen',\n", - " 278: 'A045, Webmaschine, DL 280 EMS Breite 280',\n", - " 1792: 'A057, Webmaschine Jacquard',\n", - " 254: '104, Webmaschine, OM 220 EOS',\n", - " 57: '512 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 191: 'B37, Niederhubwagen',\n", - " 895: 'U25, Ballenpresse',\n", - " 635: 'R30, Schnelllauftor',\n", - " 88: '464 C , Webmaschine, DL 280 EMS Breite 280 Bj. 04-07',\n", - " 156: 'A014 , Webmaschine, DL 280 EMS Breite 280',\n", - " 1149: 'R50, 2flg. Schwenktor',\n", - " 215: 'A011, Webmaschine, DL 280 EMS Breite 280',\n", - " 1653: '01653, Campen Anlage',\n", - " 838: 'H31.2, Deckenlaufkran',\n", - " 316: 'B34, Niederhubwagen',\n", - " 177: '204 S SI , Webmaschine, DL 280 EMS Breite 220',\n", - " 169: 'A026 , Webmaschine, DL 280 EMS Breite 280',\n", - " 898: 'U24, Abfallpresscontainer',\n", - " 308: 'B07, Gabelstapler',\n", - " 298: 'B11, Gabelstapler',\n", - " 1793: 'A057, Webmaschine Jacquard',\n", - " 249: '203 C S SI, Webmaschine, DL 280 EMS Breite 220',\n", - " 329: 'B30, Hubarbeitsbühne',\n", - " 158: 'A016 , Webmaschine, DL 280 EMS Breite 280',\n", - " 2029: '03033, Brandmeldeanlage mit Rauch u. Handmelder',\n", - " 159: 'A017 , Webmaschine, DL 280 EMS Breite 280',\n", - " 398: 'H21, Säulenschwenkkran',\n", - " 685: 'R04, Sektionaltor',\n", - " 342: '00346, Warenschautisch 1',\n", - " 1119: '01119, Ausrüstung 2 / 0200-Abwicklung',\n", - " 271: 'A038, Webmaschine, DL 280 EMS Breite 280',\n", - " 941: '01727, Klimaanlage Saal 7 - Süd',\n", - " 434: 'H36, Einschienenbahn',\n", - " 297: 'B06, Gabelstapler',\n", - " 287: 'B02, Gabelstapler',\n", - " 320: 'B23, Hochhubwagen',\n", - " 247: '287 C, Webmaschine, SG 220 EMS',\n", - " 1694: 'KOMPRESSOREN ALLGEMEIN, Kompressoren allgemein',\n", - " 124: '621 C , Webmaschine, DL 280 EMS Breite 280',\n", - " 1759: '01759, Klimaanlagen Allgemein',\n", - " 155: 'A013 , Webmaschine, DL 280 EMS Breite 280',\n", - " 1697: 'SCHLOSSEREI ALLGEMEIN, Schlosserei allgemein',\n", - " 327: 'B44, Niederhubwagen',\n", - " 305: 'B03, Gabelstapler',\n", - " 1178: 'KOMPRESSORSTATION 1, Allgemein',\n", - " 1665: '01665, Jacquard-Webmaschinen allgemein',\n", - " 425: '00426, Nähmaschine Tisch 5',\n", - " 2170: 'A061.S , Jacquardmaschine',\n", - " 415: 'H07, Einschienenbahn',\n", - " 1135: '01135, Ausrüstung 2 / 2800-Aufwicklung',\n", - " 323: 'B25, Hubarbeitsbühne',\n", - " 1696: 'ELEKTROWERKSTATT ALLGEMEIN, Elektrowerkstatt allgemein',\n", - " 1703: '01703, Wasserversorgung allgemein',\n", - " 1658: '01658, Laser 2 allgemein',\n", - " 2317: 'A066, Webmaschine, DL 280 EMS Breite 280',\n", - " 1760: '01780, Kantine',\n", - " 1349: '01349, Filteranlage für Lasercutter 3',\n", - " 2561: 'GESCHÄFTSLEITUNG ALLGEMEIN, Geschäftsleitung Allgemein',\n", - " 270: 'A039, Webmaschine, DL 280 EMS Breite 280',\n", - " 1661: 'AUSRÜSTUNG 1 ALLGEMEIN, Ausrüstung 1 allgemein',\n", - " 283: 'A053, Webmaschine, DL 280 EMS Breite 280',\n", - " 243: '297 C, Webmaschine, SG 240 EMS',\n", - " 632: 'R17 , Schnelllauftor',\n", - " 1152: '01152, Ausrüstung 2 / Strukturdetektor SD 1C Serie 210',\n", - " 282: 'A052, Webmaschine, DL 280 EMS Breite 280',\n", - " 221: '272 C, Webmaschine, DL 280 EMS Breite 280',\n", - " 1545: '01545, Fangleisten-Schärmaschine 2',\n", - " 272: 'A037, Webmaschine, DL 280 EMS Breite 280',\n", - " 260: '110, Webmaschine, OM 220 EOS',\n", - " 173: 'A030 , Webmaschine, DL 280 EMS Breite 280',\n", - " 264: 'A034, Webmaschine, DL 280 EMS Breite 280',\n", - " 414: 'H30.2, Einschienenbahn',\n", - " 461: 'I.1.9.3, Brandschutzschiebetor',\n", - " 1114: '01114, Ausrüstung 2 / 1300-2-Stellen-Abwicklung',\n", - " 1361: '01877, Klimaanlage - Laborraum',\n", - " 1123: '01123, Ausrüstung 2 / 0600-Vorheizaggregat',\n", - " 2319: 'A068, Webmaschine, DL 280 EMS Breite 280',\n", - " 187: '246, Webmaschine Jacquard',\n", - " 1796: 'A055.S, Jacquardmaschine',\n", - " 1124: '01124, Ausrüstung 2 / 0700-Kühlaggregat',\n", - " 942: 'SAAL 6 , Klimaanlage',\n", - " 269: 'A040, Webmaschine, DL 280 EMS Breite 280',\n", - " 265: 'A044, Webmaschine, DL 280 EMS Breite 280',\n", - " 920: 'W5, Hochdruckreiniger',\n", - " 1047: 'KÜHLKREISLAUF, Kompressorhaus alt - offener Kreis',\n", - " 228: '265 C S SI, Webmaschine, DG 260 EMS',\n", - " 2169: 'A060.S, Jacquardmaschine',\n", - " 1131: '01131, Ausrüstung 2 / 2400-Auslaufspeicher',\n", - " 2320: 'A069, Webmaschine',\n", - " 514: 'B51, Elektro-Kettbaumhubwagen',\n", - " 1127: '01127, Ausrüstung 2 / 2000-Umlufttrockner 1',\n", - " 1116: '01116, Ausrüstung 2 / 1500-Thermokalander',\n", - " 161: 'A019 , Webmaschine, DL 280 EMS Breite 280',\n", - " 2658: 'PM 0235, Berstdruckprüfgerät 1',\n", - " 276: 'A047, Webmaschine, DL 280 EMS Breite 280',\n", - " 2048: '03064, Kühlgeräte Kantine',\n", - " 165: 'A022 , Webmaschine, DL 280 EMS Breite 280',\n", - " 2749: 'PM 0044, Zugfadenspannungsmesser'}" - ] - }, - "execution_count": 48, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "ret[1]" + "tkg.nodes['Wartungstätigkeit']" ] }, { "cell_type": "code", "execution_count": null, - "id": "dbb7f717-42a0-4fed-aaf0-41e52115da8e", + "id": "8d36d22e-73fd-44fe-ab08-98f8186bc6b2", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7f6d1b73-7378-4c98-aeed-b72bf27a942e", "metadata": {}, "outputs": [], "source": []