diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a09c96..2accf65 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,9 +20,9 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.7, 3.8, 3.9] + python-version: [3.9, '3.10', '3.11'] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1 with: @@ -72,10 +72,10 @@ jobs: if: startsWith(github.ref, 'refs/tags') steps: - uses: actions/checkout@v2 - - name: Set up Python 3.8 + - name: Set up Python 3.11 uses: actions/setup-python@v1 with: - python-version: 3.8 + python-version: '3.11' - name: Create a source distribution run: python setup.py sdist - name: Publish package to PyPI @@ -93,10 +93,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Log in to the Container registry - uses: docker/login-action@v2.1.0 + uses: docker/login-action@v3 if: github.event_name != 'pull_request' with: registry: ghcr.io @@ -105,12 +105,12 @@ jobs: - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@v4.1.1 + uses: docker/metadata-action@v5 with: images: ghcr.io/${{ github.repository }} - name: Build and push Docker image - uses: docker/build-push-action@v3.2.0 + uses: docker/build-push-action@v6 with: context: . push: ${{ github.event_name != 'pull_request' }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..4143d58 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,68 @@ +exclude: "^docs/conf.py|^docs/build/" + +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: trailing-whitespace + - id: check-added-large-files + - id: check-ast + - id: check-json + - id: check-merge-conflict + - id: check-xml + - id: check-yaml + exclude: ^mkdocs\.yml$ + - id: debug-statements + - id: end-of-file-fixer + - id: requirements-txt-fixer + - id: mixed-line-ending + args: ["--fix=auto"] # replace 'auto' with 'lf' to enforce Linux/Mac line endings or 'crlf' for Windows + + # - repo: https://github.com/astral-sh/ruff-pre-commit + # rev: "v0.0.270" + # hooks: + # - id: ruff + + # - repo: https://github.com/pycqa/isort + # rev: 5.13.2 + # hooks: + # - id: isort + # name: isort (python) + + - repo: https://github.com/psf/black + rev: 23.3.0 + hooks: + - id: black + language_version: python3 + + # - repo: https://github.com/PyCQA/bandit + # rev: 1.7.5 + # hooks: + # - id: bandit + # args: ["-c", "pyproject.toml"] + # additional_dependencies: ["bandit[toml]"] +# - repo: https://github.com/asottile/blacken-docs +# rev: v1.12.0 +# hooks: +# - id: blacken-docs +# additional_dependencies: [black] + +# - repo: https://github.com/pre-commit/mirrors-mypy +# rev: 'v1.0.1' +# hooks: +# - id: mypy +# additional_dependencies: [pydantic~=1.10] + +# Checks for missing docstrings +# - repo: https://github.com/econchick/interrogate +# rev: 1.5.0 +# hooks: +# - id: interrogate +# exclude: ^(docs/conf.py|setup.py|tests) +# args: [--config=pyproject.toml] + +# finds dead python code +# - repo: https://github.com/jendrikseipp/vulture +# rev: 'v2.7' +# hooks: +# - id: vulture diff --git a/Dockerfile b/Dockerfile index 2c80a70..e735f3c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.9-slim-buster +FROM python:3.11 WORKDIR /root/synapseformation COPY . ./ diff --git a/Pipfile.lock b/Pipfile.lock index 56275ba..36309b1 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -14,196 +14,141 @@ ] }, "default": { + "anyio": { + "hashes": [ + "sha256:137b4559cbb034c477165047febb6ff83f390fc3b20bf181c1fc0a728cb8beeb", + "sha256:c7d2e9d63e31599eeb636c8c5c03a7e108d73b345f064f1c19fdc87b79036a9a" + ], + "markers": "python_version >= '3.9'", + "version": "==4.6.0" + }, + "async-lru": { + "hashes": [ + "sha256:b8a59a5df60805ff63220b2a0c5b5393da5521b113cd5465a44eb037d81a5627", + "sha256:ff02944ce3c288c5be660c42dbcca0742b32c3b279d6dceda655190240b99224" + ], + "markers": "python_version >= '3.8'", + "version": "==2.0.4" + }, + "asyncio-atexit": { + "hashes": [ + "sha256:1d0c71544b8ee2c484d322844ee72c0875dde6f250c0ed5b6993592ab9f7d436", + "sha256:d93d5f7d5633a534abd521ce2896ed0fbe8de170bb1e65ec871d1c20eac9d376" + ], + "markers": "python_version >= '3.6'", + "version": "==1.0.1" + }, "certifi": { "hashes": [ - "sha256:0f0d56dc5a6ad56fd4ba36484d6cc34451e1c6548c61daad8c320169f91eddc7", - "sha256:c6c2e98f5c7869efca1f8916fed228dd91539f9f1b444c314c06eef02980c716" + "sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8", + "sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9" ], "markers": "python_version >= '3.6'", - "version": "==2023.5.7" - }, - "cffi": { - "hashes": [ - "sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5", - "sha256:03425bdae262c76aad70202debd780501fabeaca237cdfddc008987c0e0f59ef", - "sha256:04ed324bda3cda42b9b695d51bb7d54b680b9719cfab04227cdd1e04e5de3104", - "sha256:0e2642fe3142e4cc4af0799748233ad6da94c62a8bec3a6648bf8ee68b1c7426", - "sha256:173379135477dc8cac4bc58f45db08ab45d228b3363adb7af79436135d028405", - "sha256:198caafb44239b60e252492445da556afafc7d1e3ab7a1fb3f0584ef6d742375", - "sha256:1e74c6b51a9ed6589199c787bf5f9875612ca4a8a0785fb2d4a84429badaf22a", - "sha256:2012c72d854c2d03e45d06ae57f40d78e5770d252f195b93f581acf3ba44496e", - "sha256:21157295583fe8943475029ed5abdcf71eb3911894724e360acff1d61c1d54bc", - "sha256:2470043b93ff09bf8fb1d46d1cb756ce6132c54826661a32d4e4d132e1977adf", - "sha256:285d29981935eb726a4399badae8f0ffdff4f5050eaa6d0cfc3f64b857b77185", - "sha256:30d78fbc8ebf9c92c9b7823ee18eb92f2e6ef79b45ac84db507f52fbe3ec4497", - "sha256:320dab6e7cb2eacdf0e658569d2575c4dad258c0fcc794f46215e1e39f90f2c3", - "sha256:33ab79603146aace82c2427da5ca6e58f2b3f2fb5da893ceac0c42218a40be35", - "sha256:3548db281cd7d2561c9ad9984681c95f7b0e38881201e157833a2342c30d5e8c", - "sha256:3799aecf2e17cf585d977b780ce79ff0dc9b78d799fc694221ce814c2c19db83", - "sha256:39d39875251ca8f612b6f33e6b1195af86d1b3e60086068be9cc053aa4376e21", - "sha256:3b926aa83d1edb5aa5b427b4053dc420ec295a08e40911296b9eb1b6170f6cca", - "sha256:3bcde07039e586f91b45c88f8583ea7cf7a0770df3a1649627bf598332cb6984", - "sha256:3d08afd128ddaa624a48cf2b859afef385b720bb4b43df214f85616922e6a5ac", - "sha256:3eb6971dcff08619f8d91607cfc726518b6fa2a9eba42856be181c6d0d9515fd", - "sha256:40f4774f5a9d4f5e344f31a32b5096977b5d48560c5592e2f3d2c4374bd543ee", - "sha256:4289fc34b2f5316fbb762d75362931e351941fa95fa18789191b33fc4cf9504a", - "sha256:470c103ae716238bbe698d67ad020e1db9d9dba34fa5a899b5e21577e6d52ed2", - "sha256:4f2c9f67e9821cad2e5f480bc8d83b8742896f1242dba247911072d4fa94c192", - "sha256:50a74364d85fd319352182ef59c5c790484a336f6db772c1a9231f1c3ed0cbd7", - "sha256:54a2db7b78338edd780e7ef7f9f6c442500fb0d41a5a4ea24fff1c929d5af585", - "sha256:5635bd9cb9731e6d4a1132a498dd34f764034a8ce60cef4f5319c0541159392f", - "sha256:59c0b02d0a6c384d453fece7566d1c7e6b7bae4fc5874ef2ef46d56776d61c9e", - "sha256:5d598b938678ebf3c67377cdd45e09d431369c3b1a5b331058c338e201f12b27", - "sha256:5df2768244d19ab7f60546d0c7c63ce1581f7af8b5de3eb3004b9b6fc8a9f84b", - "sha256:5ef34d190326c3b1f822a5b7a45f6c4535e2f47ed06fec77d3d799c450b2651e", - "sha256:6975a3fac6bc83c4a65c9f9fcab9e47019a11d3d2cf7f3c0d03431bf145a941e", - "sha256:6c9a799e985904922a4d207a94eae35c78ebae90e128f0c4e521ce339396be9d", - "sha256:70df4e3b545a17496c9b3f41f5115e69a4f2e77e94e1d2a8e1070bc0c38c8a3c", - "sha256:7473e861101c9e72452f9bf8acb984947aa1661a7704553a9f6e4baa5ba64415", - "sha256:8102eaf27e1e448db915d08afa8b41d6c7ca7a04b7d73af6514df10a3e74bd82", - "sha256:87c450779d0914f2861b8526e035c5e6da0a3199d8f1add1a665e1cbc6fc6d02", - "sha256:8b7ee99e510d7b66cdb6c593f21c043c248537a32e0bedf02e01e9553a172314", - "sha256:91fc98adde3d7881af9b59ed0294046f3806221863722ba7d8d120c575314325", - "sha256:94411f22c3985acaec6f83c6df553f2dbe17b698cc7f8ae751ff2237d96b9e3c", - "sha256:98d85c6a2bef81588d9227dde12db8a7f47f639f4a17c9ae08e773aa9c697bf3", - "sha256:9ad5db27f9cabae298d151c85cf2bad1d359a1b9c686a275df03385758e2f914", - "sha256:a0b71b1b8fbf2b96e41c4d990244165e2c9be83d54962a9a1d118fd8657d2045", - "sha256:a0f100c8912c114ff53e1202d0078b425bee3649ae34d7b070e9697f93c5d52d", - "sha256:a591fe9e525846e4d154205572a029f653ada1a78b93697f3b5a8f1f2bc055b9", - "sha256:a5c84c68147988265e60416b57fc83425a78058853509c1b0629c180094904a5", - "sha256:a66d3508133af6e8548451b25058d5812812ec3798c886bf38ed24a98216fab2", - "sha256:a8c4917bd7ad33e8eb21e9a5bbba979b49d9a97acb3a803092cbc1133e20343c", - "sha256:b3bbeb01c2b273cca1e1e0c5df57f12dce9a4dd331b4fa1635b8bec26350bde3", - "sha256:cba9d6b9a7d64d4bd46167096fc9d2f835e25d7e4c121fb2ddfc6528fb0413b2", - "sha256:cc4d65aeeaa04136a12677d3dd0b1c0c94dc43abac5860ab33cceb42b801c1e8", - "sha256:ce4bcc037df4fc5e3d184794f27bdaab018943698f4ca31630bc7f84a7b69c6d", - "sha256:cec7d9412a9102bdc577382c3929b337320c4c4c4849f2c5cdd14d7368c5562d", - "sha256:d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9", - "sha256:d61f4695e6c866a23a21acab0509af1cdfd2c013cf256bbf5b6b5e2695827162", - "sha256:db0fbb9c62743ce59a9ff687eb5f4afbe77e5e8403d6697f7446e5f609976f76", - "sha256:dd86c085fae2efd48ac91dd7ccffcfc0571387fe1193d33b6394db7ef31fe2a4", - "sha256:e00b098126fd45523dd056d2efba6c5a63b71ffe9f2bbe1a4fe1716e1d0c331e", - "sha256:e229a521186c75c8ad9490854fd8bbdd9a0c9aa3a524326b55be83b54d4e0ad9", - "sha256:e263d77ee3dd201c3a142934a086a4450861778baaeeb45db4591ef65550b0a6", - "sha256:ed9cb427ba5504c1dc15ede7d516b84757c3e3d7868ccc85121d9310d27eed0b", - "sha256:fa6693661a4c91757f4412306191b6dc88c1703f780c8234035eac011922bc01", - "sha256:fcd131dd944808b5bdb38e6f5b53013c5aa4f334c5cad0c72742f6eba4b73db0" - ], - "version": "==1.15.1" + "version": "==2024.8.30" }, "charset-normalizer": { "hashes": [ - "sha256:04afa6387e2b282cf78ff3dbce20f0cc071c12dc8f685bd40960cc68644cfea6", - "sha256:04eefcee095f58eaabe6dc3cc2262f3bcd776d2c67005880894f447b3f2cb9c1", - "sha256:0be65ccf618c1e7ac9b849c315cc2e8a8751d9cfdaa43027d4f6624bd587ab7e", - "sha256:0c95f12b74681e9ae127728f7e5409cbbef9cd914d5896ef238cc779b8152373", - "sha256:0ca564606d2caafb0abe6d1b5311c2649e8071eb241b2d64e75a0d0065107e62", - "sha256:10c93628d7497c81686e8e5e557aafa78f230cd9e77dd0c40032ef90c18f2230", - "sha256:11d117e6c63e8f495412d37e7dc2e2fff09c34b2d09dbe2bee3c6229577818be", - "sha256:11d3bcb7be35e7b1bba2c23beedac81ee893ac9871d0ba79effc7fc01167db6c", - "sha256:12a2b561af122e3d94cdb97fe6fb2bb2b82cef0cdca131646fdb940a1eda04f0", - "sha256:12d1a39aa6b8c6f6248bb54550efcc1c38ce0d8096a146638fd4738e42284448", - "sha256:1435ae15108b1cb6fffbcea2af3d468683b7afed0169ad718451f8db5d1aff6f", - "sha256:1c60b9c202d00052183c9be85e5eaf18a4ada0a47d188a83c8f5c5b23252f649", - "sha256:1e8fcdd8f672a1c4fc8d0bd3a2b576b152d2a349782d1eb0f6b8e52e9954731d", - "sha256:20064ead0717cf9a73a6d1e779b23d149b53daf971169289ed2ed43a71e8d3b0", - "sha256:21fa558996782fc226b529fdd2ed7866c2c6ec91cee82735c98a197fae39f706", - "sha256:22908891a380d50738e1f978667536f6c6b526a2064156203d418f4856d6e86a", - "sha256:3160a0fd9754aab7d47f95a6b63ab355388d890163eb03b2d2b87ab0a30cfa59", - "sha256:322102cdf1ab682ecc7d9b1c5eed4ec59657a65e1c146a0da342b78f4112db23", - "sha256:34e0a2f9c370eb95597aae63bf85eb5e96826d81e3dcf88b8886012906f509b5", - "sha256:3573d376454d956553c356df45bb824262c397c6e26ce43e8203c4c540ee0acb", - "sha256:3747443b6a904001473370d7810aa19c3a180ccd52a7157aacc264a5ac79265e", - "sha256:38e812a197bf8e71a59fe55b757a84c1f946d0ac114acafaafaf21667a7e169e", - "sha256:3a06f32c9634a8705f4ca9946d667609f52cf130d5548881401f1eb2c39b1e2c", - "sha256:3a5fc78f9e3f501a1614a98f7c54d3969f3ad9bba8ba3d9b438c3bc5d047dd28", - "sha256:3d9098b479e78c85080c98e1e35ff40b4a31d8953102bb0fd7d1b6f8a2111a3d", - "sha256:3dc5b6a8ecfdc5748a7e429782598e4f17ef378e3e272eeb1340ea57c9109f41", - "sha256:4155b51ae05ed47199dc5b2a4e62abccb274cee6b01da5b895099b61b1982974", - "sha256:49919f8400b5e49e961f320c735388ee686a62327e773fa5b3ce6721f7e785ce", - "sha256:53d0a3fa5f8af98a1e261de6a3943ca631c526635eb5817a87a59d9a57ebf48f", - "sha256:5f008525e02908b20e04707a4f704cd286d94718f48bb33edddc7d7b584dddc1", - "sha256:628c985afb2c7d27a4800bfb609e03985aaecb42f955049957814e0491d4006d", - "sha256:65ed923f84a6844de5fd29726b888e58c62820e0769b76565480e1fdc3d062f8", - "sha256:6734e606355834f13445b6adc38b53c0fd45f1a56a9ba06c2058f86893ae8017", - "sha256:6baf0baf0d5d265fa7944feb9f7451cc316bfe30e8df1a61b1bb08577c554f31", - "sha256:6f4f4668e1831850ebcc2fd0b1cd11721947b6dc7c00bf1c6bd3c929ae14f2c7", - "sha256:6f5c2e7bc8a4bf7c426599765b1bd33217ec84023033672c1e9a8b35eaeaaaf8", - "sha256:6f6c7a8a57e9405cad7485f4c9d3172ae486cfef1344b5ddd8e5239582d7355e", - "sha256:7381c66e0561c5757ffe616af869b916c8b4e42b367ab29fedc98481d1e74e14", - "sha256:73dc03a6a7e30b7edc5b01b601e53e7fc924b04e1835e8e407c12c037e81adbd", - "sha256:74db0052d985cf37fa111828d0dd230776ac99c740e1a758ad99094be4f1803d", - "sha256:75f2568b4189dda1c567339b48cba4ac7384accb9c2a7ed655cd86b04055c795", - "sha256:78cacd03e79d009d95635e7d6ff12c21eb89b894c354bd2b2ed0b4763373693b", - "sha256:80d1543d58bd3d6c271b66abf454d437a438dff01c3e62fdbcd68f2a11310d4b", - "sha256:830d2948a5ec37c386d3170c483063798d7879037492540f10a475e3fd6f244b", - "sha256:891cf9b48776b5c61c700b55a598621fdb7b1e301a550365571e9624f270c203", - "sha256:8f25e17ab3039b05f762b0a55ae0b3632b2e073d9c8fc88e89aca31a6198e88f", - "sha256:9a3267620866c9d17b959a84dd0bd2d45719b817245e49371ead79ed4f710d19", - "sha256:a04f86f41a8916fe45ac5024ec477f41f886b3c435da2d4e3d2709b22ab02af1", - "sha256:aaf53a6cebad0eae578f062c7d462155eada9c172bd8c4d250b8c1d8eb7f916a", - "sha256:abc1185d79f47c0a7aaf7e2412a0eb2c03b724581139193d2d82b3ad8cbb00ac", - "sha256:ac0aa6cd53ab9a31d397f8303f92c42f534693528fafbdb997c82bae6e477ad9", - "sha256:ac3775e3311661d4adace3697a52ac0bab17edd166087d493b52d4f4f553f9f0", - "sha256:b06f0d3bf045158d2fb8837c5785fe9ff9b8c93358be64461a1089f5da983137", - "sha256:b116502087ce8a6b7a5f1814568ccbd0e9f6cfd99948aa59b0e241dc57cf739f", - "sha256:b82fab78e0b1329e183a65260581de4375f619167478dddab510c6c6fb04d9b6", - "sha256:bd7163182133c0c7701b25e604cf1611c0d87712e56e88e7ee5d72deab3e76b5", - "sha256:c36bcbc0d5174a80d6cccf43a0ecaca44e81d25be4b7f90f0ed7bcfbb5a00909", - "sha256:c3af8e0f07399d3176b179f2e2634c3ce9c1301379a6b8c9c9aeecd481da494f", - "sha256:c84132a54c750fda57729d1e2599bb598f5fa0344085dbde5003ba429a4798c0", - "sha256:cb7b2ab0188829593b9de646545175547a70d9a6e2b63bf2cd87a0a391599324", - "sha256:cca4def576f47a09a943666b8f829606bcb17e2bc2d5911a46c8f8da45f56755", - "sha256:cf6511efa4801b9b38dc5546d7547d5b5c6ef4b081c60b23e4d941d0eba9cbeb", - "sha256:d16fd5252f883eb074ca55cb622bc0bee49b979ae4e8639fff6ca3ff44f9f854", - "sha256:d2686f91611f9e17f4548dbf050e75b079bbc2a82be565832bc8ea9047b61c8c", - "sha256:d7fc3fca01da18fbabe4625d64bb612b533533ed10045a2ac3dd194bfa656b60", - "sha256:dd5653e67b149503c68c4018bf07e42eeed6b4e956b24c00ccdf93ac79cdff84", - "sha256:de5695a6f1d8340b12a5d6d4484290ee74d61e467c39ff03b39e30df62cf83a0", - "sha256:e0ac8959c929593fee38da1c2b64ee9778733cdf03c482c9ff1d508b6b593b2b", - "sha256:e1b25e3ad6c909f398df8921780d6a3d120d8c09466720226fc621605b6f92b1", - "sha256:e633940f28c1e913615fd624fcdd72fdba807bf53ea6925d6a588e84e1151531", - "sha256:e89df2958e5159b811af9ff0f92614dabf4ff617c03a4c1c6ff53bf1c399e0e1", - "sha256:ea9f9c6034ea2d93d9147818f17c2a0860d41b71c38b9ce4d55f21b6f9165a11", - "sha256:f645caaf0008bacf349875a974220f1f1da349c5dbe7c4ec93048cdc785a3326", - "sha256:f8303414c7b03f794347ad062c0516cee0e15f7a612abd0ce1e25caf6ceb47df", - "sha256:fca62a8301b605b954ad2e9c3666f9d97f63872aa4efcae5492baca2056b74ab" + "sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027", + "sha256:06a81e93cd441c56a9b65d8e1d043daeb97a3d0856d177d5c90ba85acb3db087", + "sha256:0a55554a2fa0d408816b3b5cedf0045f4b8e1a6065aec45849de2d6f3f8e9786", + "sha256:0b2b64d2bb6d3fb9112bafa732def486049e63de9618b5843bcdd081d8144cd8", + "sha256:10955842570876604d404661fbccbc9c7e684caf432c09c715ec38fbae45ae09", + "sha256:122c7fa62b130ed55f8f285bfd56d5f4b4a5b503609d181f9ad85e55c89f4185", + "sha256:1ceae2f17a9c33cb48e3263960dc5fc8005351ee19db217e9b1bb15d28c02574", + "sha256:1d3193f4a680c64b4b6a9115943538edb896edc190f0b222e73761716519268e", + "sha256:1f79682fbe303db92bc2b1136016a38a42e835d932bab5b3b1bfcfbf0640e519", + "sha256:2127566c664442652f024c837091890cb1942c30937add288223dc895793f898", + "sha256:22afcb9f253dac0696b5a4be4a1c0f8762f8239e21b99680099abd9b2b1b2269", + "sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3", + "sha256:2e81c7b9c8979ce92ed306c249d46894776a909505d8f5a4ba55b14206e3222f", + "sha256:3287761bc4ee9e33561a7e058c72ac0938c4f57fe49a09eae428fd88aafe7bb6", + "sha256:34d1c8da1e78d2e001f363791c98a272bb734000fcef47a491c1e3b0505657a8", + "sha256:37e55c8e51c236f95b033f6fb391d7d7970ba5fe7ff453dad675e88cf303377a", + "sha256:3d47fa203a7bd9c5b6cee4736ee84ca03b8ef23193c0d1ca99b5089f72645c73", + "sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc", + "sha256:42cb296636fcc8b0644486d15c12376cb9fa75443e00fb25de0b8602e64c1714", + "sha256:45485e01ff4d3630ec0d9617310448a8702f70e9c01906b0d0118bdf9d124cf2", + "sha256:4a78b2b446bd7c934f5dcedc588903fb2f5eec172f3d29e52a9096a43722adfc", + "sha256:4ab2fe47fae9e0f9dee8c04187ce5d09f48eabe611be8259444906793ab7cbce", + "sha256:4d0d1650369165a14e14e1e47b372cfcb31d6ab44e6e33cb2d4e57265290044d", + "sha256:549a3a73da901d5bc3ce8d24e0600d1fa85524c10287f6004fbab87672bf3e1e", + "sha256:55086ee1064215781fff39a1af09518bc9255b50d6333f2e4c74ca09fac6a8f6", + "sha256:572c3763a264ba47b3cf708a44ce965d98555f618ca42c926a9c1616d8f34269", + "sha256:573f6eac48f4769d667c4442081b1794f52919e7edada77495aaed9236d13a96", + "sha256:5b4c145409bef602a690e7cfad0a15a55c13320ff7a3ad7ca59c13bb8ba4d45d", + "sha256:6463effa3186ea09411d50efc7d85360b38d5f09b870c48e4600f63af490e56a", + "sha256:65f6f63034100ead094b8744b3b97965785388f308a64cf8d7c34f2f2e5be0c4", + "sha256:663946639d296df6a2bb2aa51b60a2454ca1cb29835324c640dafb5ff2131a77", + "sha256:6897af51655e3691ff853668779c7bad41579facacf5fd7253b0133308cf000d", + "sha256:68d1f8a9e9e37c1223b656399be5d6b448dea850bed7d0f87a8311f1ff3dabb0", + "sha256:6ac7ffc7ad6d040517be39eb591cac5ff87416c2537df6ba3cba3bae290c0fed", + "sha256:6b3251890fff30ee142c44144871185dbe13b11bab478a88887a639655be1068", + "sha256:6c4caeef8fa63d06bd437cd4bdcf3ffefe6738fb1b25951440d80dc7df8c03ac", + "sha256:6ef1d82a3af9d3eecdba2321dc1b3c238245d890843e040e41e470ffa64c3e25", + "sha256:753f10e867343b4511128c6ed8c82f7bec3bd026875576dfd88483c5c73b2fd8", + "sha256:7cd13a2e3ddeed6913a65e66e94b51d80a041145a026c27e6bb76c31a853c6ab", + "sha256:7ed9e526742851e8d5cc9e6cf41427dfc6068d4f5a3bb03659444b4cabf6bc26", + "sha256:7f04c839ed0b6b98b1a7501a002144b76c18fb1c1850c8b98d458ac269e26ed2", + "sha256:802fe99cca7457642125a8a88a084cef28ff0cf9407060f7b93dca5aa25480db", + "sha256:80402cd6ee291dcb72644d6eac93785fe2c8b9cb30893c1af5b8fdd753b9d40f", + "sha256:8465322196c8b4d7ab6d1e049e4c5cb460d0394da4a27d23cc242fbf0034b6b5", + "sha256:86216b5cee4b06df986d214f664305142d9c76df9b6512be2738aa72a2048f99", + "sha256:87d1351268731db79e0f8e745d92493ee2841c974128ef629dc518b937d9194c", + "sha256:8bdb58ff7ba23002a4c5808d608e4e6c687175724f54a5dade5fa8c67b604e4d", + "sha256:8c622a5fe39a48f78944a87d4fb8a53ee07344641b0562c540d840748571b811", + "sha256:8d756e44e94489e49571086ef83b2bb8ce311e730092d2c34ca8f7d925cb20aa", + "sha256:8f4a014bc36d3c57402e2977dada34f9c12300af536839dc38c0beab8878f38a", + "sha256:9063e24fdb1e498ab71cb7419e24622516c4a04476b17a2dab57e8baa30d6e03", + "sha256:90d558489962fd4918143277a773316e56c72da56ec7aa3dc3dbbe20fdfed15b", + "sha256:923c0c831b7cfcb071580d3f46c4baf50f174be571576556269530f4bbd79d04", + "sha256:95f2a5796329323b8f0512e09dbb7a1860c46a39da62ecb2324f116fa8fdc85c", + "sha256:96b02a3dc4381e5494fad39be677abcb5e6634bf7b4fa83a6dd3112607547001", + "sha256:9f96df6923e21816da7e0ad3fd47dd8f94b2a5ce594e00677c0013018b813458", + "sha256:a10af20b82360ab00827f916a6058451b723b4e65030c5a18577c8b2de5b3389", + "sha256:a50aebfa173e157099939b17f18600f72f84eed3049e743b68ad15bd69b6bf99", + "sha256:a981a536974bbc7a512cf44ed14938cf01030a99e9b3a06dd59578882f06f985", + "sha256:a9a8e9031d613fd2009c182b69c7b2c1ef8239a0efb1df3f7c8da66d5dd3d537", + "sha256:ae5f4161f18c61806f411a13b0310bea87f987c7d2ecdbdaad0e94eb2e404238", + "sha256:aed38f6e4fb3f5d6bf81bfa990a07806be9d83cf7bacef998ab1a9bd660a581f", + "sha256:b01b88d45a6fcb69667cd6d2f7a9aeb4bf53760d7fc536bf679ec94fe9f3ff3d", + "sha256:b261ccdec7821281dade748d088bb6e9b69e6d15b30652b74cbbac25e280b796", + "sha256:b2b0a0c0517616b6869869f8c581d4eb2dd83a4d79e0ebcb7d373ef9956aeb0a", + "sha256:b4a23f61ce87adf89be746c8a8974fe1c823c891d8f86eb218bb957c924bb143", + "sha256:bd8f7df7d12c2db9fab40bdd87a7c09b1530128315d047a086fa3ae3435cb3a8", + "sha256:beb58fe5cdb101e3a055192ac291b7a21e3b7ef4f67fa1d74e331a7f2124341c", + "sha256:c002b4ffc0be611f0d9da932eb0f704fe2602a9a949d1f738e4c34c75b0863d5", + "sha256:c083af607d2515612056a31f0a8d9e0fcb5876b7bfc0abad3ecd275bc4ebc2d5", + "sha256:c180f51afb394e165eafe4ac2936a14bee3eb10debc9d9e4db8958fe36afe711", + "sha256:c235ebd9baae02f1b77bcea61bce332cb4331dc3617d254df3323aa01ab47bd4", + "sha256:cd70574b12bb8a4d2aaa0094515df2463cb429d8536cfb6c7ce983246983e5a6", + "sha256:d0eccceffcb53201b5bfebb52600a5fb483a20b61da9dbc885f8b103cbe7598c", + "sha256:d965bba47ddeec8cd560687584e88cf699fd28f192ceb452d1d7ee807c5597b7", + "sha256:db364eca23f876da6f9e16c9da0df51aa4f104a972735574842618b8c6d999d4", + "sha256:ddbb2551d7e0102e7252db79ba445cdab71b26640817ab1e3e3648dad515003b", + "sha256:deb6be0ac38ece9ba87dea880e438f25ca3eddfac8b002a2ec3d9183a454e8ae", + "sha256:e06ed3eb3218bc64786f7db41917d4e686cc4856944f53d5bdf83a6884432e12", + "sha256:e27ad930a842b4c5eb8ac0016b0a54f5aebbe679340c26101df33424142c143c", + "sha256:e537484df0d8f426ce2afb2d0f8e1c3d0b114b83f8850e5f2fbea0e797bd82ae", + "sha256:eb00ed941194665c332bf8e078baf037d6c35d7c4f3102ea2d4f16ca94a26dc8", + "sha256:eb6904c354526e758fda7167b33005998fb68c46fbc10e013ca97f21ca5c8887", + "sha256:eb8821e09e916165e160797a6c17edda0679379a4be5c716c260e836e122f54b", + "sha256:efcb3f6676480691518c177e3b465bcddf57cea040302f9f4e6e191af91174d4", + "sha256:f27273b60488abe721a075bcca6d7f3964f9f6f067c8c4c605743023d7d3944f", + "sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5", + "sha256:fb69256e180cb6c8a894fee62b3afebae785babc1ee98b81cdf68bbca1987f33", + "sha256:fd1abc0d89e30cc4e02e4064dc67fcc51bd941eb395c502aac3ec19fab46b519", + "sha256:ff8fa367d09b717b2a17a052544193ad76cd49979c805768879cb63d9ca50561" ], - "markers": "python_version >= '3.7'", - "version": "==3.1.0" + "markers": "python_full_version >= '3.7.0'", + "version": "==3.3.2" }, "click": { "hashes": [ - "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e", - "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48" + "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28", + "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" ], "markers": "python_version >= '3.7'", - "version": "==8.1.3" - }, - "cryptography": { - "hashes": [ - "sha256:0ddaee209d1cf1f180f1efa338a68c4621154de0afaef92b89486f5f96047c55", - "sha256:14754bcdae909d66ff24b7b5f166d69340ccc6cb15731670435efd5719294895", - "sha256:344c6de9f8bda3c425b3a41b319522ba3208551b70c2ae00099c205f0d9fd3be", - "sha256:34d405ea69a8b34566ba3dfb0521379b210ea5d560fafedf9f800a9a94a41928", - "sha256:3680248309d340fda9611498a5319b0193a8dbdb73586a1acf8109d06f25b92d", - "sha256:3c5ef25d060c80d6d9f7f9892e1d41bb1c79b78ce74805b8cb4aa373cb7d5ec8", - "sha256:4ab14d567f7bbe7f1cdff1c53d5324ed4d3fc8bd17c481b395db224fb405c237", - "sha256:5c1f7293c31ebc72163a9a0df246f890d65f66b4a40d9ec80081969ba8c78cc9", - "sha256:6b71f64beeea341c9b4f963b48ee3b62d62d57ba93eb120e1196b31dc1025e78", - "sha256:7d92f0248d38faa411d17f4107fc0bce0c42cae0b0ba5415505df72d751bf62d", - "sha256:8362565b3835ceacf4dc8f3b56471a2289cf51ac80946f9087e66dc283a810e0", - "sha256:84a165379cb9d411d58ed739e4af3396e544eac190805a54ba2e0322feb55c46", - "sha256:88ff107f211ea696455ea8d911389f6d2b276aabf3231bf72c8853d22db755c5", - "sha256:9f65e842cb02550fac96536edb1d17f24c0a338fd84eaf582be25926e993dde4", - "sha256:a4fc68d1c5b951cfb72dfd54702afdbbf0fb7acdc9b7dc4301bbf2225a27714d", - "sha256:b7f2f5c525a642cecad24ee8670443ba27ac1fab81bba4cc24c7b6b41f2d0c75", - "sha256:b846d59a8d5a9ba87e2c3d757ca019fa576793e8758174d3868aecb88d6fc8eb", - "sha256:bf8fc66012ca857d62f6a347007e166ed59c0bc150cefa49f28376ebe7d992a2", - "sha256:f5d0bf9b252f30a31664b6f64432b4730bb7038339bd18b1fafe129cfc2be9be" - ], - "index": "pypi", - "version": "==41.0.0" + "version": "==8.1.7" }, "deprecated": { "hashes": [ @@ -213,246 +158,403 @@ "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==1.2.14" }, - "idna": { + "googleapis-common-protos": { "hashes": [ - "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4", - "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2" + "sha256:2972e6c496f435b92590fd54045060867f3fe9be2c82ab148fc8885035479a63", + "sha256:334a29d07cddc3aa01dee4988f9afd9b2916ee2ff49d6b757155dc0d197852c0" ], - "markers": "python_version >= '3.5'", - "version": "==3.4" + "markers": "python_version >= '3.7'", + "version": "==1.65.0" }, - "importlib-metadata": { + "h11": { "hashes": [ - "sha256:8a8a81bcf996e74fee46f0d16bd3eaa382a7eb20fd82445c3ad11f4090334116", - "sha256:dd0173e8f150d6815e098fd354f6414b0f079af4644ddfe90c71e2fc6174346d" + "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d", + "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761" ], "markers": "python_version >= '3.7'", - "version": "==4.13.0" + "version": "==0.14.0" + }, + "httpcore": { + "hashes": [ + "sha256:34a38e2f9291467ee3b44e89dd52615370e152954ba21721378a87b2960f7a61", + "sha256:421f18bac248b25d310f3cacd198d55b8e6125c107797b609ff9b7a6ba7991b5" + ], + "markers": "python_version >= '3.8'", + "version": "==1.0.5" }, - "jeepney": { + "httpx": { "hashes": [ - "sha256:5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806", - "sha256:c0a454ad016ca575060802ee4d590dd912e35c122fa04e70306de3d076cce755" + "sha256:7bb2708e112d8fdd7829cd4243970f0c223274051cb35ee80c03301ee29a3df0", + "sha256:f7c2be1d2f3c3c3160d441802406b206c2b76f5947b11115e6df10c6c65e66c2" ], - "markers": "sys_platform == 'linux'", - "version": "==0.8.0" + "markers": "python_version >= '3.8'", + "version": "==0.27.2" }, - "keyring": { + "idna": { "hashes": [ - "sha256:17e49fb0d6883c2b4445359434dba95aad84aabb29bbff044ad0ed7100232eca", - "sha256:89cbd74d4683ed164c8082fb38619341097741323b3786905c6dac04d6915a55" + "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9", + "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3" ], "markers": "python_version >= '3.6'", - "version": "==23.4.1" + "version": "==3.10" + }, + "importlib-metadata": { + "hashes": [ + "sha256:66f342cc6ac9818fc6ff340576acd24d65ba0b3efabb2b4ac08b598965a4a2f1", + "sha256:9a547d3bc3608b025f93d403fdd1aae741c24fbb8314df4b155675742ce303c5" + ], + "markers": "python_version >= '3.8'", + "version": "==8.4.0" + }, + "nest-asyncio": { + "hashes": [ + "sha256:6f172d5449aca15afd6c646851f4e31e02c598d553a667e38cafa997cfec55fe", + "sha256:87af6efd6b5e897c81050477ef65c62e2b2f35d51703cae01aff2905b1852e1c" + ], + "markers": "python_version >= '3.5'", + "version": "==1.6.0" + }, + "opentelemetry-api": { + "hashes": [ + "sha256:953d5871815e7c30c81b56d910c707588000fff7a3ca1c73e6531911d53065e7", + "sha256:ed673583eaa5f81b5ce5e86ef7cdaf622f88ef65f0b9aab40b843dcae5bef342" + ], + "markers": "python_version >= '3.8'", + "version": "==1.27.0" + }, + "opentelemetry-exporter-otlp-proto-common": { + "hashes": [ + "sha256:159d27cf49f359e3798c4c3eb8da6ef4020e292571bd8c5604a2a573231dd5c8", + "sha256:675db7fffcb60946f3a5c43e17d1168a3307a94a930ecf8d2ea1f286f3d4f79a" + ], + "markers": "python_version >= '3.8'", + "version": "==1.27.0" + }, + "opentelemetry-exporter-otlp-proto-http": { + "hashes": [ + "sha256:2103479092d8eb18f61f3fbff084f67cc7f2d4a7d37e75304b8b56c1d09ebef5", + "sha256:688027575c9da42e179a69fe17e2d1eba9b14d81de8d13553a21d3114f3b4d75" + ], + "markers": "python_version >= '3.8'", + "version": "==1.27.0" + }, + "opentelemetry-instrumentation": { + "hashes": [ + "sha256:94929685d906380743a71c3970f76b5f07476eea1834abd5dd9d17abfe23cc35", + "sha256:a69750dc4ba6a5c3eb67986a337185a25b739966d80479befe37b546fc870b44" + ], + "markers": "python_version >= '3.8'", + "version": "==0.48b0" + }, + "opentelemetry-instrumentation-httpx": { + "hashes": [ + "sha256:d94f9d612c82d09fe22944d1904a30a464c19bea2ba76be656c99a28ad8be8e5", + "sha256:ee977479e10398931921fb995ac27ccdeea2e14e392cb27ef012fc549089b60a" + ], + "markers": "python_version >= '3.8'", + "version": "==0.48b0" + }, + "opentelemetry-instrumentation-requests": { + "hashes": [ + "sha256:67ab9bd877a0352ee0db4616c8b4ae59736ddd700c598ed907482d44f4c9a2b3", + "sha256:d4f01852121d0bd4c22f14f429654a735611d4f7bf3cf93f244bdf1489b2233d" + ], + "markers": "python_version >= '3.8'", + "version": "==0.48b0" }, - "keyrings.alt": { + "opentelemetry-instrumentation-threading": { "hashes": [ - "sha256:6a00fa799baf1385cf9620bd01bcc815aa56e6970342a567bcfea0c4d21abe5f", - "sha256:b59c86b67b9027a86e841a49efc41025bcc3b1b0308629617b66b7011e52db5a" + "sha256:daef8a6fd06aa8b35594582d96ffb30954c4a9ae1ffdace7b00d0904fd650d2e", + "sha256:e81cb3a5342bbbc3f40b4c3f5180629905d504e2f364dc436ecb1123491f4080" ], - "markers": "sys_platform == 'linux'", - "version": "==3.1" + "markers": "python_version >= '3.8'", + "version": "==0.48b0" }, - "pycparser": { + "opentelemetry-instrumentation-urllib": { "hashes": [ - "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9", - "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206" + "sha256:8115399fc786f5a46f30b158ab32a9cc77a248d421dcb0d411da657250388915", + "sha256:a9db839b4248efc9b01628dc8aa886c1269a81cec84bc375d344239037823d48" ], - "version": "==2.21" + "markers": "python_version >= '3.8'", + "version": "==0.48b0" + }, + "opentelemetry-proto": { + "hashes": [ + "sha256:33c9345d91dafd8a74fc3d7576c5a38f18b7fdf8d02983ac67485386132aedd6", + "sha256:b133873de5581a50063e1e4b29cdcf0c5e253a8c2d8dc1229add20a4c3830ace" + ], + "markers": "python_version >= '3.8'", + "version": "==1.27.0" + }, + "opentelemetry-sdk": { + "hashes": [ + "sha256:365f5e32f920faf0fd9e14fdfd92c086e317eaa5f860edba9cdc17a380d9197d", + "sha256:d525017dea0ccce9ba4e0245100ec46ecdc043f2d7b8315d56b19aff0904fa6f" + ], + "markers": "python_version >= '3.8'", + "version": "==1.27.0" + }, + "opentelemetry-semantic-conventions": { + "hashes": [ + "sha256:12d74983783b6878162208be57c9effcb89dc88691c64992d70bb89dc00daa1a", + "sha256:a0de9f45c413a8669788a38569c7e0a11ce6ce97861a628cca785deecdc32a1f" + ], + "markers": "python_version >= '3.8'", + "version": "==0.48b0" + }, + "opentelemetry-util-http": { + "hashes": [ + "sha256:60312015153580cc20f322e5cdc3d3ecad80a71743235bdb77716e742814623c", + "sha256:76f598af93aab50328d2a69c786beaedc8b6a7770f7a818cc307eb353debfffb" + ], + "markers": "python_version >= '3.8'", + "version": "==0.48b0" + }, + "protobuf": { + "hashes": [ + "sha256:0aebecb809cae990f8129ada5ca273d9d670b76d9bfc9b1809f0a9c02b7dbf41", + "sha256:4be0571adcbe712b282a330c6e89eae24281344429ae95c6d85e79e84780f5ea", + "sha256:5e61fd921603f58d2f5acb2806a929b4675f8874ff5f330b7d6f7e2e784bbcd8", + "sha256:7a183f592dc80aa7c8da7ad9e55091c4ffc9497b3054452d629bb85fa27c2a45", + "sha256:7f8249476b4a9473645db7f8ab42b02fe1488cbe5fb72fddd445e0665afd8584", + "sha256:919ad92d9b0310070f8356c24b855c98df2b8bd207ebc1c0c6fcc9ab1e007f3d", + "sha256:98d8d8aa50de6a2747efd9cceba361c9034050ecce3e09136f90de37ddba66e1", + "sha256:abe32aad8561aa7cc94fc7ba4fdef646e576983edb94a73381b03c53728a626f", + "sha256:b0234dd5a03049e4ddd94b93400b67803c823cfc405689688f59b34e0742381a", + "sha256:b2fde3d805354df675ea4c7c6338c1aecd254dfc9925e88c6d31a2bcb97eb173", + "sha256:fe14e16c22be926d3abfcb500e60cab068baf10b542b8c858fa27e098123e331" + ], + "markers": "python_version >= '3.8'", + "version": "==4.25.5" + }, + "psutil": { + "hashes": [ + "sha256:02615ed8c5ea222323408ceba16c60e99c3f91639b07da6373fb7e6539abc56d", + "sha256:05806de88103b25903dff19bb6692bd2e714ccf9e668d050d144012055cbca73", + "sha256:26bd09967ae00920df88e0352a91cff1a78f8d69b3ecabbfe733610c0af486c8", + "sha256:27cc40c3493bb10de1be4b3f07cae4c010ce715290a5be22b98493509c6299e2", + "sha256:36f435891adb138ed3c9e58c6af3e2e6ca9ac2f365efe1f9cfef2794e6c93b4e", + "sha256:50187900d73c1381ba1454cf40308c2bf6f34268518b3f36a9b663ca87e65e36", + "sha256:611052c4bc70432ec770d5d54f64206aa7203a101ec273a0cd82418c86503bb7", + "sha256:6be126e3225486dff286a8fb9a06246a5253f4c7c53b475ea5f5ac934e64194c", + "sha256:7d79560ad97af658a0f6adfef8b834b53f64746d45b403f225b85c5c2c140eee", + "sha256:8cb6403ce6d8e047495a701dc7c5bd788add903f8986d523e3e20b98b733e421", + "sha256:8db4c1b57507eef143a15a6884ca10f7c73876cdf5d51e713151c1236a0e68cf", + "sha256:aee678c8720623dc456fa20659af736241f575d79429a0e5e9cf88ae0605cc81", + "sha256:bc56c2a1b0d15aa3eaa5a60c9f3f8e3e565303b465dbf57a1b730e7a2b9844e0", + "sha256:bd1184ceb3f87651a67b2708d4c3338e9b10c5df903f2e3776b62303b26cb631", + "sha256:d06016f7f8625a1825ba3732081d77c94589dca78b7a3fc072194851e88461a4", + "sha256:d16bbddf0693323b8c6123dd804100241da461e41d6e332fb0ba6058f630f8c8" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'", + "version": "==5.9.8" }, "pyyaml": { "hashes": [ - "sha256:01b45c0191e6d66c470b6cf1b9531a771a83c1c4208272ead47a3ae4f2f603bf", - "sha256:0283c35a6a9fbf047493e3a0ce8d79ef5030852c51e9d911a27badfde0605293", - "sha256:055d937d65826939cb044fc8c9b08889e8c743fdc6a32b33e2390f66013e449b", - "sha256:07751360502caac1c067a8132d150cf3d61339af5691fe9e87803040dbc5db57", - "sha256:0b4624f379dab24d3725ffde76559cff63d9ec94e1736b556dacdfebe5ab6d4b", - "sha256:0ce82d761c532fe4ec3f87fc45688bdd3a4c1dc5e0b4a19814b9009a29baefd4", - "sha256:1e4747bc279b4f613a09eb64bba2ba602d8a6664c6ce6396a4d0cd413a50ce07", - "sha256:213c60cd50106436cc818accf5baa1aba61c0189ff610f64f4a3e8c6726218ba", - "sha256:231710d57adfd809ef5d34183b8ed1eeae3f76459c18fb4a0b373ad56bedcdd9", - "sha256:277a0ef2981ca40581a47093e9e2d13b3f1fbbeffae064c1d21bfceba2030287", - "sha256:2cd5df3de48857ed0544b34e2d40e9fac445930039f3cfe4bcc592a1f836d513", - "sha256:40527857252b61eacd1d9af500c3337ba8deb8fc298940291486c465c8b46ec0", - "sha256:432557aa2c09802be39460360ddffd48156e30721f5e8d917f01d31694216782", - "sha256:473f9edb243cb1935ab5a084eb238d842fb8f404ed2193a915d1784b5a6b5fc0", - "sha256:48c346915c114f5fdb3ead70312bd042a953a8ce5c7106d5bfb1a5254e47da92", - "sha256:50602afada6d6cbfad699b0c7bb50d5ccffa7e46a3d738092afddc1f9758427f", - "sha256:68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2", - "sha256:77f396e6ef4c73fdc33a9157446466f1cff553d979bd00ecb64385760c6babdc", - "sha256:81957921f441d50af23654aa6c5e5eaf9b06aba7f0a19c18a538dc7ef291c5a1", - "sha256:819b3830a1543db06c4d4b865e70ded25be52a2e0631ccd2f6a47a2822f2fd7c", - "sha256:897b80890765f037df3403d22bab41627ca8811ae55e9a722fd0392850ec4d86", - "sha256:98c4d36e99714e55cfbaaee6dd5badbc9a1ec339ebfc3b1f52e293aee6bb71a4", - "sha256:9df7ed3b3d2e0ecfe09e14741b857df43adb5a3ddadc919a2d94fbdf78fea53c", - "sha256:9fa600030013c4de8165339db93d182b9431076eb98eb40ee068700c9c813e34", - "sha256:a80a78046a72361de73f8f395f1f1e49f956c6be882eed58505a15f3e430962b", - "sha256:afa17f5bc4d1b10afd4466fd3a44dc0e245382deca5b3c353d8b757f9e3ecb8d", - "sha256:b3d267842bf12586ba6c734f89d1f5b871df0273157918b0ccefa29deb05c21c", - "sha256:b5b9eccad747aabaaffbc6064800670f0c297e52c12754eb1d976c57e4f74dcb", - "sha256:bfaef573a63ba8923503d27530362590ff4f576c626d86a9fed95822a8255fd7", - "sha256:c5687b8d43cf58545ade1fe3e055f70eac7a5a1a0bf42824308d868289a95737", - "sha256:cba8c411ef271aa037d7357a2bc8f9ee8b58b9965831d9e51baf703280dc73d3", - "sha256:d15a181d1ecd0d4270dc32edb46f7cb7733c7c508857278d3d378d14d606db2d", - "sha256:d4b0ba9512519522b118090257be113b9468d804b19d63c71dbcf4a48fa32358", - "sha256:d4db7c7aef085872ef65a8fd7d6d09a14ae91f691dec3e87ee5ee0539d516f53", - "sha256:d4eccecf9adf6fbcc6861a38015c2a64f38b9d94838ac1810a9023a0609e1b78", - "sha256:d67d839ede4ed1b28a4e8909735fc992a923cdb84e618544973d7dfc71540803", - "sha256:daf496c58a8c52083df09b80c860005194014c3698698d1a57cbcfa182142a3a", - "sha256:dbad0e9d368bb989f4515da330b88a057617d16b6a8245084f1b05400f24609f", - "sha256:e61ceaab6f49fb8bdfaa0f92c4b57bcfbea54c09277b1b4f7ac376bfb7a7c174", - "sha256:f84fbc98b019fef2ee9a1cb3ce93e3187a6df0b2538a651bfb890254ba9f90b5" + "sha256:01179a4a8559ab5de078078f37e5c1a30d76bb88519906844fd7bdea1b7729ff", + "sha256:0833f8694549e586547b576dcfaba4a6b55b9e96098b36cdc7ebefe667dfed48", + "sha256:0a9a2848a5b7feac301353437eb7d5957887edbf81d56e903999a75a3d743086", + "sha256:0b69e4ce7a131fe56b7e4d770c67429700908fc0752af059838b1cfb41960e4e", + "sha256:0ffe8360bab4910ef1b9e87fb812d8bc0a308b0d0eef8c8f44e0254ab3b07133", + "sha256:11d8f3dd2b9c1207dcaf2ee0bbbfd5991f571186ec9cc78427ba5bd32afae4b5", + "sha256:17e311b6c678207928d649faa7cb0d7b4c26a0ba73d41e99c4fff6b6c3276484", + "sha256:1e2120ef853f59c7419231f3bf4e7021f1b936f6ebd222406c3b60212205d2ee", + "sha256:1f71ea527786de97d1a0cc0eacd1defc0985dcf6b3f17bb77dcfc8c34bec4dc5", + "sha256:23502f431948090f597378482b4812b0caae32c22213aecf3b55325e049a6c68", + "sha256:24471b829b3bf607e04e88d79542a9d48bb037c2267d7927a874e6c205ca7e9a", + "sha256:29717114e51c84ddfba879543fb232a6ed60086602313ca38cce623c1d62cfbf", + "sha256:2e99c6826ffa974fe6e27cdb5ed0021786b03fc98e5ee3c5bfe1fd5015f42b99", + "sha256:39693e1f8320ae4f43943590b49779ffb98acb81f788220ea932a6b6c51004d8", + "sha256:3ad2a3decf9aaba3d29c8f537ac4b243e36bef957511b4766cb0057d32b0be85", + "sha256:3b1fdb9dc17f5a7677423d508ab4f243a726dea51fa5e70992e59a7411c89d19", + "sha256:41e4e3953a79407c794916fa277a82531dd93aad34e29c2a514c2c0c5fe971cc", + "sha256:43fa96a3ca0d6b1812e01ced1044a003533c47f6ee8aca31724f78e93ccc089a", + "sha256:50187695423ffe49e2deacb8cd10510bc361faac997de9efef88badc3bb9e2d1", + "sha256:5ac9328ec4831237bec75defaf839f7d4564be1e6b25ac710bd1a96321cc8317", + "sha256:5d225db5a45f21e78dd9358e58a98702a0302f2659a3c6cd320564b75b86f47c", + "sha256:6395c297d42274772abc367baaa79683958044e5d3835486c16da75d2a694631", + "sha256:688ba32a1cffef67fd2e9398a2efebaea461578b0923624778664cc1c914db5d", + "sha256:68ccc6023a3400877818152ad9a1033e3db8625d899c72eacb5a668902e4d652", + "sha256:70b189594dbe54f75ab3a1acec5f1e3faa7e8cf2f1e08d9b561cb41b845f69d5", + "sha256:797b4f722ffa07cc8d62053e4cff1486fa6dc094105d13fea7b1de7d8bf71c9e", + "sha256:7c36280e6fb8385e520936c3cb3b8042851904eba0e58d277dca80a5cfed590b", + "sha256:7e7401d0de89a9a855c839bc697c079a4af81cf878373abd7dc625847d25cbd8", + "sha256:80bab7bfc629882493af4aa31a4cfa43a4c57c83813253626916b8c7ada83476", + "sha256:82d09873e40955485746739bcb8b4586983670466c23382c19cffecbf1fd8706", + "sha256:8388ee1976c416731879ac16da0aff3f63b286ffdd57cdeb95f3f2e085687563", + "sha256:8824b5a04a04a047e72eea5cec3bc266db09e35de6bdfe34c9436ac5ee27d237", + "sha256:8b9c7197f7cb2738065c481a0461e50ad02f18c78cd75775628afb4d7137fb3b", + "sha256:9056c1ecd25795207ad294bcf39f2db3d845767be0ea6e6a34d856f006006083", + "sha256:936d68689298c36b53b29f23c6dbb74de12b4ac12ca6cfe0e047bedceea56180", + "sha256:9b22676e8097e9e22e36d6b7bda33190d0d400f345f23d4065d48f4ca7ae0425", + "sha256:a4d3091415f010369ae4ed1fc6b79def9416358877534caf6a0fdd2146c87a3e", + "sha256:a8786accb172bd8afb8be14490a16625cbc387036876ab6ba70912730faf8e1f", + "sha256:a9f8c2e67970f13b16084e04f134610fd1d374bf477b17ec1599185cf611d725", + "sha256:bc2fa7c6b47d6bc618dd7fb02ef6fdedb1090ec036abab80d4681424b84c1183", + "sha256:c70c95198c015b85feafc136515252a261a84561b7b1d51e3384e0655ddf25ab", + "sha256:cc1c1159b3d456576af7a3e4d1ba7e6924cb39de8f67111c735f6fc832082774", + "sha256:ce826d6ef20b1bc864f0a68340c8b3287705cae2f8b4b1d932177dcc76721725", + "sha256:d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e", + "sha256:d7fded462629cfa4b685c5416b949ebad6cec74af5e2d42905d41e257e0869f5", + "sha256:d84a1718ee396f54f3a086ea0a66d8e552b2ab2017ef8b420e92edbc841c352d", + "sha256:d8e03406cac8513435335dbab54c0d385e4a49e4945d2909a581c83647ca0290", + "sha256:e10ce637b18caea04431ce14fabcf5c64a1c61ec9c56b071a4b7ca131ca52d44", + "sha256:ec031d5d2feb36d1d1a24380e4db6d43695f3748343d99434e6f5f9156aaa2ed", + "sha256:ef6107725bd54b262d6dedcc2af448a266975032bc85ef0172c5f059da6325b4", + "sha256:efdca5630322a10774e8e98e1af481aad470dd62c3170801852d752aa7a783ba", + "sha256:f753120cb8181e736c57ef7636e83f31b9c0d1722c516f7e86cf15b7aa57ff12", + "sha256:ff3824dc5261f50c9b0dfb3be22b4567a6f938ccce4587b38952d85fd9e9afe4" ], - "markers": "python_version >= '3.6'", - "version": "==6.0" + "markers": "python_version >= '3.8'", + "version": "==6.0.2" }, "requests": { "hashes": [ - "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f", - "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1" + "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760", + "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6" ], - "markers": "python_version >= '3.7'", - "version": "==2.31.0" - }, - "sanitized-package": { - "editable": true, - "path": "." + "markers": "python_version >= '3.8'", + "version": "==2.32.3" }, - "secretstorage": { + "setuptools": { "hashes": [ - "sha256:2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77", - "sha256:f356e6628222568e3af06f2eba8df495efa13b3b63081dafd4f7d9a7b7bc9f99" + "sha256:35ab7fd3bcd95e6b7fd704e4a1539513edad446c097797f2985e0e4b960772f2", + "sha256:d59a21b17a275fb872a9c3dae73963160ae079f1049ed956880cd7c09b120538" ], - "markers": "sys_platform == 'linux'", - "version": "==3.3.3" + "markers": "python_version >= '3.8'", + "version": "==75.1.0" }, - "six": { + "sniffio": { "hashes": [ - "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926", - "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254" + "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2", + "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==1.16.0" + "markers": "python_version >= '3.7'", + "version": "==1.3.1" }, "synapseclient": { "hashes": [ - "sha256:dc5a61f9f495109a0c89aa7d42b641b6ff278280d7961fb450dd5015704fe15b", - "sha256:dd8b1a1b4667d08311bb651469431f43fe2eeab83c0ef1fe5a03c2929aeb26cd" + "sha256:527d06bb1804b797356564056f4be970daafe235b049b790d59cb69496928210", + "sha256:d259eec60de536198851883d2e1232a8219290712eadf88fc85e469b5d1fb35a" ], - "markers": "python_version >= '3.7'", - "version": "==2.7.2" + "markers": "python_version >= '3.8'", + "version": "==4.5.1" }, "synapseformation": { "editable": true, + "markers": "python_version >= '3.6'", "path": "." }, + "tqdm": { + "hashes": [ + "sha256:90279a3770753eafc9194a0364852159802111925aa30eb3f9d85b0e805ac7cd", + "sha256:e1020aef2e5096702d8a025ac7d16b1577279c9d63f8375b63083e9a5f0fcbad" + ], + "markers": "python_version >= '3.7'", + "version": "==4.66.5" + }, + "typing-extensions": { + "hashes": [ + "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d", + "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + ], + "markers": "python_version >= '3.8'", + "version": "==4.12.2" + }, "urllib3": { "hashes": [ - "sha256:8d36afa7616d8ab714608411b4a3b13e58f463aee519024578e062e141dce20f", - "sha256:8f135f6502756bde6b2a9b28989df5fbe87c9970cecaa69041edcce7f0589b14" + "sha256:0ed14ccfbf1c30a9072c7ca157e4319b70d65f623e91e7b32fadb2853431016e", + "sha256:40c2dc0c681e47eb8f90e7e27bf6ff7df2e677421fd46756da1161c39ca70d32" ], "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'", - "version": "==1.26.16" + "version": "==1.26.20" }, "wrapt": { "hashes": [ - "sha256:02fce1852f755f44f95af51f69d22e45080102e9d00258053b79367d07af39c0", - "sha256:077ff0d1f9d9e4ce6476c1a924a3332452c1406e59d90a2cf24aeb29eeac9420", - "sha256:078e2a1a86544e644a68422f881c48b84fef6d18f8c7a957ffd3f2e0a74a0d4a", - "sha256:0970ddb69bba00670e58955f8019bec4a42d1785db3faa043c33d81de2bf843c", - "sha256:1286eb30261894e4c70d124d44b7fd07825340869945c79d05bda53a40caa079", - "sha256:21f6d9a0d5b3a207cdf7acf8e58d7d13d463e639f0c7e01d82cdb671e6cb7923", - "sha256:230ae493696a371f1dbffaad3dafbb742a4d27a0afd2b1aecebe52b740167e7f", - "sha256:26458da5653aa5b3d8dc8b24192f574a58984c749401f98fff994d41d3f08da1", - "sha256:2cf56d0e237280baed46f0b5316661da892565ff58309d4d2ed7dba763d984b8", - "sha256:2e51de54d4fb8fb50d6ee8327f9828306a959ae394d3e01a1ba8b2f937747d86", - "sha256:2fbfbca668dd15b744418265a9607baa970c347eefd0db6a518aaf0cfbd153c0", - "sha256:38adf7198f8f154502883242f9fe7333ab05a5b02de7d83aa2d88ea621f13364", - "sha256:3a8564f283394634a7a7054b7983e47dbf39c07712d7b177b37e03f2467a024e", - "sha256:3abbe948c3cbde2689370a262a8d04e32ec2dd4f27103669a45c6929bcdbfe7c", - "sha256:3bbe623731d03b186b3d6b0d6f51865bf598587c38d6f7b0be2e27414f7f214e", - "sha256:40737a081d7497efea35ab9304b829b857f21558acfc7b3272f908d33b0d9d4c", - "sha256:41d07d029dd4157ae27beab04d22b8e261eddfc6ecd64ff7000b10dc8b3a5727", - "sha256:46ed616d5fb42f98630ed70c3529541408166c22cdfd4540b88d5f21006b0eff", - "sha256:493d389a2b63c88ad56cdc35d0fa5752daac56ca755805b1b0c530f785767d5e", - "sha256:4ff0d20f2e670800d3ed2b220d40984162089a6e2c9646fdb09b85e6f9a8fc29", - "sha256:54accd4b8bc202966bafafd16e69da9d5640ff92389d33d28555c5fd4f25ccb7", - "sha256:56374914b132c702aa9aa9959c550004b8847148f95e1b824772d453ac204a72", - "sha256:578383d740457fa790fdf85e6d346fda1416a40549fe8db08e5e9bd281c6a475", - "sha256:58d7a75d731e8c63614222bcb21dd992b4ab01a399f1f09dd82af17bbfc2368a", - "sha256:5c5aa28df055697d7c37d2099a7bc09f559d5053c3349b1ad0c39000e611d317", - "sha256:5fc8e02f5984a55d2c653f5fea93531e9836abbd84342c1d1e17abc4a15084c2", - "sha256:63424c681923b9f3bfbc5e3205aafe790904053d42ddcc08542181a30a7a51bd", - "sha256:64b1df0f83706b4ef4cfb4fb0e4c2669100fd7ecacfb59e091fad300d4e04640", - "sha256:74934ebd71950e3db69960a7da29204f89624dde411afbfb3b4858c1409b1e98", - "sha256:75669d77bb2c071333417617a235324a1618dba66f82a750362eccbe5b61d248", - "sha256:75760a47c06b5974aa5e01949bf7e66d2af4d08cb8c1d6516af5e39595397f5e", - "sha256:76407ab327158c510f44ded207e2f76b657303e17cb7a572ffe2f5a8a48aa04d", - "sha256:76e9c727a874b4856d11a32fb0b389afc61ce8aaf281ada613713ddeadd1cfec", - "sha256:77d4c1b881076c3ba173484dfa53d3582c1c8ff1f914c6461ab70c8428b796c1", - "sha256:780c82a41dc493b62fc5884fb1d3a3b81106642c5c5c78d6a0d4cbe96d62ba7e", - "sha256:7dc0713bf81287a00516ef43137273b23ee414fe41a3c14be10dd95ed98a2df9", - "sha256:7eebcdbe3677e58dd4c0e03b4f2cfa346ed4049687d839adad68cc38bb559c92", - "sha256:896689fddba4f23ef7c718279e42f8834041a21342d95e56922e1c10c0cc7afb", - "sha256:96177eb5645b1c6985f5c11d03fc2dbda9ad24ec0f3a46dcce91445747e15094", - "sha256:96e25c8603a155559231c19c0349245eeb4ac0096fe3c1d0be5c47e075bd4f46", - "sha256:9d37ac69edc5614b90516807de32d08cb8e7b12260a285ee330955604ed9dd29", - "sha256:9ed6aa0726b9b60911f4aed8ec5b8dd7bf3491476015819f56473ffaef8959bd", - "sha256:a487f72a25904e2b4bbc0817ce7a8de94363bd7e79890510174da9d901c38705", - "sha256:a4cbb9ff5795cd66f0066bdf5947f170f5d63a9274f99bdbca02fd973adcf2a8", - "sha256:a74d56552ddbde46c246b5b89199cb3fd182f9c346c784e1a93e4dc3f5ec9975", - "sha256:a89ce3fd220ff144bd9d54da333ec0de0399b52c9ac3d2ce34b569cf1a5748fb", - "sha256:abd52a09d03adf9c763d706df707c343293d5d106aea53483e0ec8d9e310ad5e", - "sha256:abd8f36c99512755b8456047b7be10372fca271bf1467a1caa88db991e7c421b", - "sha256:af5bd9ccb188f6a5fdda9f1f09d9f4c86cc8a539bd48a0bfdc97723970348418", - "sha256:b02f21c1e2074943312d03d243ac4388319f2456576b2c6023041c4d57cd7019", - "sha256:b06fa97478a5f478fb05e1980980a7cdf2712015493b44d0c87606c1513ed5b1", - "sha256:b0724f05c396b0a4c36a3226c31648385deb6a65d8992644c12a4963c70326ba", - "sha256:b130fe77361d6771ecf5a219d8e0817d61b236b7d8b37cc045172e574ed219e6", - "sha256:b56d5519e470d3f2fe4aa7585f0632b060d532d0696c5bdfb5e8319e1d0f69a2", - "sha256:b67b819628e3b748fd3c2192c15fb951f549d0f47c0449af0764d7647302fda3", - "sha256:ba1711cda2d30634a7e452fc79eabcadaffedf241ff206db2ee93dd2c89a60e7", - "sha256:bbeccb1aa40ab88cd29e6c7d8585582c99548f55f9b2581dfc5ba68c59a85752", - "sha256:bd84395aab8e4d36263cd1b9308cd504f6cf713b7d6d3ce25ea55670baec5416", - "sha256:c99f4309f5145b93eca6e35ac1a988f0dc0a7ccf9ccdcd78d3c0adf57224e62f", - "sha256:ca1cccf838cd28d5a0883b342474c630ac48cac5df0ee6eacc9c7290f76b11c1", - "sha256:cd525e0e52a5ff16653a3fc9e3dd827981917d34996600bbc34c05d048ca35cc", - "sha256:cdb4f085756c96a3af04e6eca7f08b1345e94b53af8921b25c72f096e704e145", - "sha256:ce42618f67741d4697684e501ef02f29e758a123aa2d669e2d964ff734ee00ee", - "sha256:d06730c6aed78cee4126234cf2d071e01b44b915e725a6cb439a879ec9754a3a", - "sha256:d5fe3e099cf07d0fb5a1e23d399e5d4d1ca3e6dfcbe5c8570ccff3e9208274f7", - "sha256:d6bcbfc99f55655c3d93feb7ef3800bd5bbe963a755687cbf1f490a71fb7794b", - "sha256:d787272ed958a05b2c86311d3a4135d3c2aeea4fc655705f074130aa57d71653", - "sha256:e169e957c33576f47e21864cf3fc9ff47c223a4ebca8960079b8bd36cb014fd0", - "sha256:e20076a211cd6f9b44a6be58f7eeafa7ab5720eb796975d0c03f05b47d89eb90", - "sha256:e826aadda3cae59295b95343db8f3d965fb31059da7de01ee8d1c40a60398b29", - "sha256:eef4d64c650f33347c1f9266fa5ae001440b232ad9b98f1f43dfe7a79435c0a6", - "sha256:f2e69b3ed24544b0d3dbe2c5c0ba5153ce50dcebb576fdc4696d52aa22db6034", - "sha256:f87ec75864c37c4c6cb908d282e1969e79763e0d9becdfe9fe5473b7bb1e5f09", - "sha256:fbec11614dba0424ca72f4e8ba3c420dba07b4a7c206c8c8e4e73f2e98f4c559", - "sha256:fd69666217b62fa5d7c6aa88e507493a34dec4fa20c5bd925e4bc12fce586639" - ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", - "version": "==1.15.0" + "sha256:0d2691979e93d06a95a26257adb7bfd0c93818e89b1406f5a28f36e0d8c1e1fc", + "sha256:14d7dc606219cdd7405133c713f2c218d4252f2a469003f8c46bb92d5d095d81", + "sha256:1a5db485fe2de4403f13fafdc231b0dbae5eca4359232d2efc79025527375b09", + "sha256:1acd723ee2a8826f3d53910255643e33673e1d11db84ce5880675954183ec47e", + "sha256:1ca9b6085e4f866bd584fb135a041bfc32cab916e69f714a7d1d397f8c4891ca", + "sha256:1dd50a2696ff89f57bd8847647a1c363b687d3d796dc30d4dd4a9d1689a706f0", + "sha256:2076fad65c6736184e77d7d4729b63a6d1ae0b70da4868adeec40989858eb3fb", + "sha256:2a88e6010048489cda82b1326889ec075a8c856c2e6a256072b28eaee3ccf487", + "sha256:3ebf019be5c09d400cf7b024aa52b1f3aeebeff51550d007e92c3c1c4afc2a40", + "sha256:418abb18146475c310d7a6dc71143d6f7adec5b004ac9ce08dc7a34e2babdc5c", + "sha256:43aa59eadec7890d9958748db829df269f0368521ba6dc68cc172d5d03ed8060", + "sha256:44a2754372e32ab315734c6c73b24351d06e77ffff6ae27d2ecf14cf3d229202", + "sha256:490b0ee15c1a55be9c1bd8609b8cecd60e325f0575fc98f50058eae366e01f41", + "sha256:49aac49dc4782cb04f58986e81ea0b4768e4ff197b57324dcbd7699c5dfb40b9", + "sha256:5eb404d89131ec9b4f748fa5cfb5346802e5ee8836f57d516576e61f304f3b7b", + "sha256:5f15814a33e42b04e3de432e573aa557f9f0f56458745c2074952f564c50e664", + "sha256:5f370f952971e7d17c7d1ead40e49f32345a7f7a5373571ef44d800d06b1899d", + "sha256:66027d667efe95cc4fa945af59f92c5a02c6f5bb6012bff9e60542c74c75c362", + "sha256:66dfbaa7cfa3eb707bbfcd46dab2bc6207b005cbc9caa2199bcbc81d95071a00", + "sha256:685f568fa5e627e93f3b52fda002c7ed2fa1800b50ce51f6ed1d572d8ab3e7fc", + "sha256:6906c4100a8fcbf2fa735f6059214bb13b97f75b1a61777fcf6432121ef12ef1", + "sha256:6a42cd0cfa8ffc1915aef79cb4284f6383d8a3e9dcca70c445dcfdd639d51267", + "sha256:6dcfcffe73710be01d90cae08c3e548d90932d37b39ef83969ae135d36ef3956", + "sha256:6f6eac2360f2d543cc875a0e5efd413b6cbd483cb3ad7ebf888884a6e0d2e966", + "sha256:72554a23c78a8e7aa02abbd699d129eead8b147a23c56e08d08dfc29cfdddca1", + "sha256:73870c364c11f03ed072dda68ff7aea6d2a3a5c3fe250d917a429c7432e15228", + "sha256:73aa7d98215d39b8455f103de64391cb79dfcad601701a3aa0dddacf74911d72", + "sha256:75ea7d0ee2a15733684badb16de6794894ed9c55aa5e9903260922f0482e687d", + "sha256:7bd2d7ff69a2cac767fbf7a2b206add2e9a210e57947dd7ce03e25d03d2de292", + "sha256:807cc8543a477ab7422f1120a217054f958a66ef7314f76dd9e77d3f02cdccd0", + "sha256:8e9723528b9f787dc59168369e42ae1c3b0d3fadb2f1a71de14531d321ee05b0", + "sha256:9090c9e676d5236a6948330e83cb89969f433b1943a558968f659ead07cb3b36", + "sha256:9153ed35fc5e4fa3b2fe97bddaa7cbec0ed22412b85bcdaf54aeba92ea37428c", + "sha256:9159485323798c8dc530a224bd3ffcf76659319ccc7bbd52e01e73bd0241a0c5", + "sha256:941988b89b4fd6b41c3f0bfb20e92bd23746579736b7343283297c4c8cbae68f", + "sha256:94265b00870aa407bd0cbcfd536f17ecde43b94fb8d228560a1e9d3041462d73", + "sha256:98b5e1f498a8ca1858a1cdbffb023bfd954da4e3fa2c0cb5853d40014557248b", + "sha256:9b201ae332c3637a42f02d1045e1d0cccfdc41f1f2f801dafbaa7e9b4797bfc2", + "sha256:a0ea261ce52b5952bf669684a251a66df239ec6d441ccb59ec7afa882265d593", + "sha256:a33a747400b94b6d6b8a165e4480264a64a78c8a4c734b62136062e9a248dd39", + "sha256:a452f9ca3e3267cd4d0fcf2edd0d035b1934ac2bd7e0e57ac91ad6b95c0c6389", + "sha256:a86373cf37cd7764f2201b76496aba58a52e76dedfaa698ef9e9688bfd9e41cf", + "sha256:ac83a914ebaf589b69f7d0a1277602ff494e21f4c2f743313414378f8f50a4cf", + "sha256:aefbc4cb0a54f91af643660a0a150ce2c090d3652cf4052a5397fb2de549cd89", + "sha256:b3646eefa23daeba62643a58aac816945cadc0afaf21800a1421eeba5f6cfb9c", + "sha256:b47cfad9e9bbbed2339081f4e346c93ecd7ab504299403320bf85f7f85c7d46c", + "sha256:b935ae30c6e7400022b50f8d359c03ed233d45b725cfdd299462f41ee5ffba6f", + "sha256:bb2dee3874a500de01c93d5c71415fcaef1d858370d405824783e7a8ef5db440", + "sha256:bc57efac2da352a51cc4658878a68d2b1b67dbe9d33c36cb826ca449d80a8465", + "sha256:bf5703fdeb350e36885f2875d853ce13172ae281c56e509f4e6eca049bdfb136", + "sha256:c31f72b1b6624c9d863fc095da460802f43a7c6868c5dda140f51da24fd47d7b", + "sha256:c5cd603b575ebceca7da5a3a251e69561bec509e0b46e4993e1cac402b7247b8", + "sha256:d2efee35b4b0a347e0d99d28e884dfd82797852d62fcd7ebdeee26f3ceb72cf3", + "sha256:d462f28826f4657968ae51d2181a074dfe03c200d6131690b7d65d55b0f360f8", + "sha256:d5e49454f19ef621089e204f862388d29e6e8d8b162efce05208913dde5b9ad6", + "sha256:da4813f751142436b075ed7aa012a8778aa43a99f7b36afe9b742d3ed8bdc95e", + "sha256:db2e408d983b0e61e238cf579c09ef7020560441906ca990fe8412153e3b291f", + "sha256:db98ad84a55eb09b3c32a96c576476777e87c520a34e2519d3e59c44710c002c", + "sha256:dbed418ba5c3dce92619656802cc5355cb679e58d0d89b50f116e4a9d5a9603e", + "sha256:dcdba5c86e368442528f7060039eda390cc4091bfd1dca41e8046af7c910dda8", + "sha256:decbfa2f618fa8ed81c95ee18a387ff973143c656ef800c9f24fb7e9c16054e2", + "sha256:e4fdb9275308292e880dcbeb12546df7f3e0f96c6b41197e0cf37d2826359020", + "sha256:eb1b046be06b0fce7249f1d025cd359b4b80fc1c3e24ad9eca33e0dcdb2e4a35", + "sha256:eb6e651000a19c96f452c85132811d25e9264d836951022d6e81df2fff38337d", + "sha256:ed867c42c268f876097248e05b6117a65bcd1e63b779e916fe2e33cd6fd0d3c3", + "sha256:edfad1d29c73f9b863ebe7082ae9321374ccb10879eeabc84ba3b69f2579d537", + "sha256:f2058f813d4f2b5e3a9eb2eb3faf8f1d99b81c3e51aeda4b168406443e8ba809", + "sha256:f6b2d0c6703c988d334f297aa5df18c45e97b0af3679bb75059e0e0bd8b1069d", + "sha256:f8212564d49c50eb4565e502814f694e240c55551a5f1bc841d4fcaabb0a9b8a", + "sha256:ffa565331890b90056c01db69c0fe634a776f8019c143a5ae265f9c6bc4bd6d4" + ], + "markers": "python_version >= '3.6'", + "version": "==1.16.0" }, "zipp": { "hashes": [ - "sha256:112929ad649da941c23de50f356a2b5570c954b65150642bccdd66bf194d224b", - "sha256:48904fc76a60e542af151aded95726c1a5c34ed43ab4134b597665c86d7ad556" + "sha256:a817ac80d6cf4b23bf7f2828b7cabf326f15a001bea8b1f9b49631780ba28350", + "sha256:bc9eb26f4506fda01b81bcde0ca78103b6e62f991b381fec825435c836edbc29" ], - "markers": "python_version >= '3.7'", - "version": "==3.15.0" + "markers": "python_version >= '3.8'", + "version": "==3.20.2" } }, "develop": { - "attrs": { - "hashes": [ - "sha256:1f28b4522cdc2fb4256ac1a020c78acf9cba2c6b461ccd2c126f3aa8e8335d04", - "sha256:6279836d581513a26f1bf235f9acd333bc9115683f14f7e8fae46c98fc50e015" - ], - "markers": "python_version >= '3.7'", - "version": "==23.1.0" - }, "iniconfig": { "hashes": [ "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3", @@ -463,27 +565,28 @@ }, "packaging": { "hashes": [ - "sha256:994793af429502c4ea2ebf6bf664629d07c1a9fe974af92966e4b8d2df7edc61", - "sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f" + "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002", + "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124" ], - "markers": "python_version >= '3.7'", - "version": "==23.1" + "markers": "python_version >= '3.8'", + "version": "==24.1" }, "pluggy": { "hashes": [ - "sha256:c2fd55a7d7a3863cba1a013e4e2414658b1d07b6bc57b3919e0c63c9abb99849", - "sha256:d12f0c4b579b15f5e054301bb226ee85eeeba08ffec228092f8defbaa3a4c4b3" + "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1", + "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669" ], - "markers": "python_version >= '3.7'", - "version": "==1.2.0" + "markers": "python_version >= '3.8'", + "version": "==1.5.0" }, "pytest": { "hashes": [ - "sha256:c7c6ca206e93355074ae32f7403e8ea12163b1163c976fee7d4d84027c162be5", - "sha256:d45e0952f3727241918b8fd0f376f5ff6b301cc0777c6f9a556935c92d8a7d42" + "sha256:70b98107bd648308a7952b06e6ca9a50bc660be218d53c257cc1fc94fda10181", + "sha256:a6853c7375b2663155079443d2e45de913a911a11d669df02a50814944db57b2" ], "index": "pypi", - "version": "==7.2.1" + "markers": "python_version >= '3.8'", + "version": "==8.3.3" } } } diff --git a/README.md b/README.md index 09b9c05..f494d06 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,11 @@ # synapseformation -[![Get synapseformation from PyPI](https://img.shields.io/pypi/v/synapseformation.svg?style=for-the-badge&logo=pypi)](https://pypi.python.org/pypi/synapseformation) [![GitHub CI](https://img.shields.io/github/workflow/status/Sage-Bionetworks/synapseformation/build.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/Sage-Bionetworks/synapseformation) -[![Coverage Status](https://img.shields.io/coveralls/github/Sage-Bionetworks/synapseformation.svg?&style=for-the-badge&label=coverage&logo=Coveralls)](https://coveralls.io/github/Sage-Bionetworks/synapseformation) +[![Get synapseformation from PyPI](https://img.shields.io/pypi/v/synapseformation.svg?&logo=pypi)](https://pypi.python.org/pypi/synapseformation) +[![Coverage Status](https://img.shields.io/coveralls/github/Sage-Bionetworks/synapseformation.svg?&label=coverage&logo=Coveralls)](https://coveralls.io/github/Sage-Bionetworks/synapseformation) +[![build](https://github.com/Sage-Bionetworks/synapseformation/actions/workflows/ci.yml/badge.svg)](https://github.com/Sage-Bionetworks/synapseformation/actions/workflows/ci.yml) + +> [!WARNING] +> This package is not actively maintained and is an MVP. The functionality and dependencies may change at any time, but will follow semantic versioning guidelines. Use at your own risk. Client for using [Synapse Formation Templates](templates). Given one of these templates, `synapseformation` will be able to create all the components required in a Synapse Project. Currently the implementation does one of these two scenarios. diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..ef1714e --- /dev/null +++ b/setup.cfg @@ -0,0 +1,44 @@ +[metadata] +name = synapseformation +version = attr: synapseformation.__version__.__version__ +description = Client for using Synapse Formation templates. +long_description = file: README.md +long_description_content_type = text/markdown +url = https://github.com/Sage-Bionetworks/synapseformation +author = Thomas Yu +license = Apache-2.0 +license_files = LICENSE +classifiers = + Development Status :: 5 - Production/Stable + Programming Language :: Python + Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 + Operating System :: MacOS + Operating System :: Microsoft :: Windows + Operating System :: Unix + Operating System :: POSIX :: Linux + Intended Audience :: Developers + Intended Audience :: Science/Research + License :: OSI Approved :: Apache Software License + Topic :: Software Development :: Libraries + Topic :: Scientific/Engineering + Topic :: Scientific/Engineering :: Bio-Informatics + +project_urls = + Documentation = https://github.com/Sage-Bionetworks/synapseformation + Source Code = https://github.com/Sage-Bionetworks/synapseformation + Bug Tracker = https://github.com/Sage-Bionetworks/synapseformation/issues + +[options] +packages = find: +python_requires = >=3.9, <3.12 +zip_safe = False +install_requires = + click + synapseclient>=4.0.0 + pyyaml + +[options.entry_points] +console_scripts = + synapseformation = synapseformation.__main__:cli diff --git a/setup.py b/setup.py index c0af2cf..6068493 100644 --- a/setup.py +++ b/setup.py @@ -1,53 +1,3 @@ -"""Setup""" -import os -from setuptools import setup, find_packages +from setuptools import setup -# figure out the version -about = {} -here = os.path.abspath(os.path.dirname(__file__)) -with open(os.path.join(here, "synapseformation", "__version__.py")) as f: - exec(f.read(), about) - -with open("README.md", "r") as fh: - long_description = fh.read() - -setup( - name='synapseformation', - version=about["__version__"], - description='Client for using Synapse Formation templates.', - url='https://github.com/Sage-Bionetworks/synapseformation', - author='Kenneth Daily,Thomas Yu,Kelsey Montgomery', - license='Apache', - packages=find_packages(), - long_description=long_description, - long_description_content_type="text/markdown", - zip_safe=False, - python_requires='>=3.6', - entry_points={'console_scripts': ['synapseformation = synapseformation.__main__:cli']}, - install_requires=['click', - 'synapseclient>=2.4.0', - 'pyyaml'], - project_urls={ - "Documentation": "https://github.com/Sage-Bionetworks/synapseformation", - "Source Code": "https://github.com/Sage-Bionetworks/synapseformation", - "Bug Tracker": "https://github.com/Sage-Bionetworks/synapseformation/issues", - }, - classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Operating System :: MacOS', - 'Operating System :: Microsoft :: Windows', - 'Operating System :: Unix', - 'Operating System :: POSIX :: Linux', - 'Intended Audience :: Developers', - 'Intended Audience :: Science/Research', - 'License :: OSI Approved :: Apache Software License', - 'Topic :: Software Development :: Libraries', - 'Topic :: Scientific/Engineering', - 'Topic :: Scientific/Engineering :: Bio-Informatics' - ], -) +setup() diff --git a/synapseformation/__main__.py b/synapseformation/__main__.py index 103cc9f..53cd13c 100644 --- a/synapseformation/__main__.py +++ b/synapseformation/__main__.py @@ -1,11 +1,10 @@ """synapseformation command line client""" import click - import synapseclient +from .__version__ import __version__ from .client import create_synapse_resources from .utils import synapse_login -from .__version__ import __version__ def add_version(f): @@ -38,10 +37,15 @@ def cli(): @cli.command() -@click.option('--template_path', help='Template path', type=click.Path()) -@click.option('-c', '--config_path', help='Synapse configuration file', - type=click.Path(), show_default=True, - default=synapseclient.client.CONFIG_FILE) +@click.option("--template_path", help="Template path", type=click.Path()) +@click.option( + "-c", + "--config_path", + help="Synapse configuration file", + type=click.Path(), + show_default=True, + default=synapseclient.client.CONFIG_FILE, +) def create(template_path, config_path): """Creates Synapse Resources given a yaml or json""" syn = synapse_login(synapse_config=config_path) diff --git a/synapseformation/__version__.py b/synapseformation/__version__.py index e344246..27fdca4 100644 --- a/synapseformation/__version__.py +++ b/synapseformation/__version__.py @@ -1 +1 @@ -__version__ = "0.0.3" \ No newline at end of file +__version__ = "0.0.3" diff --git a/synapseformation/client.py b/synapseformation/client.py index 3d21d7e..49b34f2 100644 --- a/synapseformation/client.py +++ b/synapseformation/client.py @@ -4,9 +4,8 @@ import synapseclient from synapseclient import Synapse -from .create import SynapseCreation from . import create, utils - +from .create import SynapseCreation # def expand_config(config: dict) -> dict: # """Expands shortened configuration to the official json format""" @@ -41,9 +40,9 @@ # return config -def _create_synapse_resources(config_list: List[dict], - creation_cls: SynapseCreation, - parentid: str = None): +def _create_synapse_resources( + config_list: List[dict], creation_cls: SynapseCreation, parentid: str = None +): """Recursively steps through template and creates synapse resources Args: @@ -59,13 +58,13 @@ def _create_synapse_resources(config_list: List[dict], # This works because every layer in the json is a list created_entities = [] for config in config_list: - if isinstance(config, dict) and config.get('type') == "Project": - entity = creation_cls.get_or_create_project(name=config['name']) - elif isinstance(config, dict) and config.get('type') == "Folder": + if isinstance(config, dict) and config.get("type") == "Project": + entity = creation_cls.get_or_create_project(name=config["name"]) + elif isinstance(config, dict) and config.get("type") == "Folder": entity = creation_cls.get_or_create_folder( - name=config['name'], parentId=parentid + name=config["name"], parentId=parentid ) - elif isinstance(config, dict) and config.get('type') == "EntityViewSchema": + elif isinstance(config, dict) and config.get("type") == "EntityViewSchema": kwargs = {k: v for k, v in config.items() if k != "type"} entity_type_classes = [] for entity_type in kwargs["includeEntityTypes"]: @@ -83,48 +82,47 @@ def _create_synapse_resources(config_list: List[dict], entity_type_classes.append(synapseclient.EntityViewType.DOCKER) kwargs["includeEntityTypes"] = entity_type_classes entity = creation_cls.get_or_create_view(parent=parentid, **kwargs) - elif isinstance(config, dict) and config.get('type') == "Team": + elif isinstance(config, dict) and config.get("type") == "Team": team = creation_cls.get_or_create_team( - name=config['name'], description=config['description'], - canPublicJoin=config['can_public_join'] + name=config["name"], + description=config["description"], + canPublicJoin=config["can_public_join"], ) - config['id'] = team.id + config["id"] = team.id if config.get("invitations") is not None: - for invite in config['invitations']: - for member in invite['members']: + for invite in config["invitations"]: + for member in invite["members"]: user = member.get("principal_id") email = member.get("email") creation_cls.syn.invite_to_team( - team=team, user=user, inviteeEmail=email, - message=invite['message'] + team=team, + user=user, + inviteeEmail=email, + message=invite["message"], ) - this_entity_obj = { - "name": config["name"], - "entity": team, - "children": []} + this_entity_obj = {"name": config["name"], "entity": team, "children": []} # only entities can have children and ACLs if entity is not None: - this_entity_obj = { - "name": config["name"], - "entity": entity, - "children": []} + this_entity_obj = {"name": config["name"], "entity": entity, "children": []} parent_id = entity.id - config['id'] = parent_id + config["id"] = parent_id # Get ACL if exists - create._set_acl(syn=creation_cls.syn, entity=entity, - acl_config=config.get('acl', [])) - children = config.get('children', None) + create._set_acl( + syn=creation_cls.syn, entity=entity, acl_config=config.get("acl", []) + ) + children = config.get("children", None) # implement this to not run into recursion limit if children is not None: - this_entity_obj["children"] = \ - _create_synapse_resources(config_list=children, - creation_cls=creation_cls, - parentid=parent_id) + this_entity_obj["children"] = _create_synapse_resources( + config_list=children, creation_cls=creation_cls, parentid=parent_id + ) created_entities.append(this_entity_obj) return created_entities -def create_synapse_resources(syn: synapseclient.Synapse, template_path: str, parent_id: str = None): +def create_synapse_resources( + syn: synapseclient.Synapse, template_path: str, parent_id: str = None +): """Creates synapse resources from template""" # Function will attempt to read template as yaml then try to read in json config = utils.read_config(template_path) @@ -135,7 +133,6 @@ def create_synapse_resources(syn: synapseclient.Synapse, template_path: str, par # Recursive function to create resources creation_cls = SynapseCreation(syn) created_entities = _create_synapse_resources( - config_list=config, - creation_cls=creation_cls, - parentid=parent_id) + config_list=config, creation_cls=creation_cls, parentid=parent_id + ) return created_entities diff --git a/synapseformation/create.py b/synapseformation/create.py index 82ebb3d..c6a1bc0 100644 --- a/synapseformation/create.py +++ b/synapseformation/create.py @@ -5,18 +5,28 @@ from typing import Union from urllib.parse import quote -from synapseclient import (Project, Team, Evaluation, File, Folder, Wiki, - EntityViewSchema, Schema, Synapse) +from synapseclient import ( + EntityViewSchema, + Evaluation, + File, + Folder, + Project, + Schema, + Synapse, + Team, + Wiki, +) from synapseclient.core.exceptions import SynapseHTTPError -SynapseCls = Union[Project, Team, Evaluation, File, Folder, Wiki, - EntityViewSchema, Schema] +SynapseCls = Union[ + Project, Team, Evaluation, File, Folder, Wiki, EntityViewSchema, Schema +] class SynapseCreation: """Creates Synapse Features""" - def __init__(self, syn: Synapse, only_get: bool = False, - logger: Logger = None): + + def __init__(self, syn: Synapse, only_get: bool = False, logger: Logger = None): """ Args: syn: Synapse connection @@ -30,8 +40,9 @@ def __init__(self, syn: Synapse, only_get: bool = False, self.logger = logger or logging.getLogger(__name__) self._update_str = "Created" if only_get else "Fetched existing" - def _find_entity_by_name(self, entity_name: str, parentid: str, - concrete_type: str) -> SynapseCls: + def _find_entity_by_name( + self, entity_name: str, parentid: str, concrete_type: str + ) -> SynapseCls: """Find an Entity by its name Args: @@ -47,7 +58,7 @@ def _find_entity_by_name(self, entity_name: str, parentid: str, # trying to find entity_obj = self.syn.findEntityId(entity_name, parent=parentid) # TODO: when entity doesn't exist, don't do this get - new_obj = self.syn.get(entity_obj['id'], downloadFile=False) + new_obj = self.syn.get(entity_obj["id"], downloadFile=False) assert concrete_type == new_obj.properties.concreteType, ( f"Retrieved '{entity_name}' had type " f"'{new_obj.properties.concreteType}' " @@ -71,7 +82,7 @@ def _get_obj(self, obj: SynapseCls) -> SynapseCls: obj = self._find_entity_by_name( entity_name=obj.name, parentid=obj.properties.get("parentId", None), - concrete_type=obj.properties.concreteType + concrete_type=obj.properties.concreteType, ) elif isinstance(obj, Team): obj = self.syn.getTeam(obj.name) @@ -101,8 +112,9 @@ def _find_by_obj_or_create(self, obj: SynapseCls) -> SynapseCls: if err.response.status_code != 409: raise err if not self.only_get: - raise ValueError(f"{str(err)}. To use existing entities, " - "set only_get to True.") + raise ValueError( + f"{str(err)}. To use existing entities, " "set only_get to True." + ) obj = self._get_obj(obj) return obj @@ -118,9 +130,9 @@ def get_or_create_project(self, **kwargs) -> Project: """ project = Project(**kwargs) project = self._find_by_obj_or_create(project) - self.logger.info('{} Project {}({})'.format(self._update_str, - project.name, - project.id)) + self.logger.info( + "{} Project {}({})".format(self._update_str, project.name, project.id) + ) return project def get_or_create_file(self, **kwargs) -> File: @@ -136,9 +148,9 @@ def get_or_create_file(self, **kwargs) -> File: """ file_ent = File(**kwargs) file_ent = self._find_by_obj_or_create(file_ent) - self.logger.info('{} File {} ({})'.format(self._update_str, - file_ent.name, - file_ent.id)) + self.logger.info( + "{} File {} ({})".format(self._update_str, file_ent.name, file_ent.id) + ) return file_ent def get_or_create_folder(self, **kwargs) -> Folder: @@ -154,9 +166,9 @@ def get_or_create_folder(self, **kwargs) -> Folder: """ folder_ent = Folder(**kwargs) folder_ent = self._find_by_obj_or_create(folder_ent) - self.logger.info('{} Folder {} ({})'.format(self._update_str, - folder_ent.name, - folder_ent.id)) + self.logger.info( + "{} Folder {} ({})".format(self._update_str, folder_ent.name, folder_ent.id) + ) return folder_ent def get_or_create_view(self, **kwargs) -> EntityViewSchema: @@ -172,9 +184,7 @@ def get_or_create_view(self, **kwargs) -> EntityViewSchema: """ view = EntityViewSchema(**kwargs) view = self._find_by_obj_or_create(view) - self.logger.info('{} View {} ({})'.format(self._update_str, - view.name, - view.id)) + self.logger.info("{} View {} ({})".format(self._update_str, view.name, view.id)) return view def get_or_create_schema(self, **kwargs) -> Schema: @@ -191,9 +201,9 @@ def get_or_create_schema(self, **kwargs) -> Schema: schema = Schema(**kwargs) schema = self._find_by_obj_or_create(schema) - self.logger.info('{} Schema {} ({})'.format(self._update_str, - schema.name, - schema.id)) + self.logger.info( + "{} Schema {} ({})".format(self._update_str, schema.name, schema.id) + ) return schema def get_or_create_team(self, **kwargs) -> Team: @@ -209,9 +219,7 @@ def get_or_create_team(self, **kwargs) -> Team: team = Team(**kwargs) team = self._find_by_obj_or_create(team) - self.logger.info('{} Team {} ({})'.format(self._update_str, - team.name, - team.id)) + self.logger.info("{} Team {} ({})".format(self._update_str, team.name, team.id)) return team def get_or_create_wiki(self, **kwargs) -> Wiki: @@ -230,8 +238,7 @@ def get_or_create_wiki(self, **kwargs) -> Wiki: wiki = Wiki(**kwargs) wiki = self._find_by_obj_or_create(wiki) - self.logger.info('{} Wiki {}'.format(self._update_str, - wiki.title)) + self.logger.info("{} Wiki {}".format(self._update_str, wiki.title)) return wiki def get_or_create_queue(self, **kwargs) -> Evaluation: @@ -246,8 +253,9 @@ def get_or_create_queue(self, **kwargs) -> Evaluation: """ queue = Evaluation(**kwargs) queue = self._find_by_obj_or_create(queue) - self.logger.info('{} Queue {}({})'.format(self._update_str, - queue.name, queue.id)) + self.logger.info( + "{} Queue {}({})".format(self._update_str, queue.name, queue.id) + ) return queue def _get_challenge(self, projectId: str) -> dict: @@ -267,8 +275,7 @@ def _get_challenge(self, projectId: str) -> dict: challenge = self.syn.restGET(f"/entity/{projectId}/challenge") return challenge - def _create_challenge(self, projectId: str, - participantTeamId: str) -> dict: + def _create_challenge(self, projectId: str, participantTeamId: str) -> dict: """Creates Challenge associated with a Project See the definition of a Challenge object here: @@ -283,10 +290,11 @@ def _create_challenge(self, projectId: str, https://docs.synapse.org/rest/org/sagebionetworks/repo/model/Challenge.html """ - challenge_object = {'participantTeamId': participantTeamId, - 'projectId': projectId} - challenge = self.syn.restPOST('/challenge', - json.dumps(challenge_object)) + challenge_object = { + "participantTeamId": participantTeamId, + "projectId": projectId, + } + challenge = self.syn.restPOST("/challenge", json.dumps(challenge_object)) return challenge def get_or_create_challenge(self, **kwargs) -> dict: @@ -308,16 +316,15 @@ def get_or_create_challenge(self, **kwargs) -> dict: if err.response.status_code != 400: raise err if not self.only_get: - raise ValueError(f"{err}. To use existing entities, " - "set only_get to True.") - challenge = self._get_challenge(kwargs['projectId']) - self.logger.info("{} Challenge ({})".format(self._update_str, - challenge['id'])) + raise ValueError( + f"{err}. To use existing entities, " "set only_get to True." + ) + challenge = self._get_challenge(kwargs["projectId"]) + self.logger.info("{} Challenge ({})".format(self._update_str, challenge["id"])) return challenge -def _set_acl(syn: Synapse, entity: Union[File, Folder, Project], - acl_config: dict): +def _set_acl(syn: Synapse, entity: Union[File, Folder, Project], acl_config: dict): """Sets ACLs to Synapse entity Args: @@ -327,5 +334,8 @@ def _set_acl(syn: Synapse, entity: Union[File, Folder, Project], """ for acl in acl_config: - syn.setPermissions(entity=entity, principalId=acl['principal_id'], - accessType=acl['access_type']) + syn.setPermissions( + entity=entity, + principalId=acl["principal_id"], + accessType=acl["access_type"], + ) diff --git a/synapseformation/utils.py b/synapseformation/utils.py index 63ed1b5..4b2326c 100644 --- a/synapseformation/utils.py +++ b/synapseformation/utils.py @@ -1,10 +1,9 @@ """Utility functions""" -import yaml - import synapseclient +import yaml from synapseclient.core.exceptions import ( - SynapseNoCredentialsError, SynapseAuthenticationError, + SynapseNoCredentialsError, ) @@ -46,4 +45,4 @@ def synapse_login(synapse_config=synapseclient.client.CONFIG_FILE): "as an environmental variable: " "SYNAPSE_AUTH_TOKEN=''" ) - return(syn) + return syn diff --git a/templates/YAML/treat_ad.yaml b/templates/YAML/treat_ad.yaml index 8622656..bddb4ab 100644 --- a/templates/YAML/treat_ad.yaml +++ b/templates/YAML/treat_ad.yaml @@ -15,7 +15,7 @@ Structural_Biology_Core_Folder: &struct_bio_folder - name: Protein - name: Protein_Expression_Methods - name: TEP - + Assay_Core_Folder: &assay_folder name: Assay_Core type: Folder @@ -29,7 +29,7 @@ Assay_Core_Folder: &assay_folder - name: Off_Target_Potency - name: Secondary_Screen_Protocols - name: Secondary_Screen_Result - + MedChem_Core_Folder: &medchem_folder name: MedChem_Core type: Folder @@ -60,4 +60,4 @@ Resources: type: Folder children: *gene_folder - name: Project_Activities - type: Folder \ No newline at end of file + type: Folder diff --git a/templates/long.yaml b/templates/long.yaml index c526358..29a3495 100644 --- a/templates/long.yaml +++ b/templates/long.yaml @@ -48,4 +48,3 @@ members: - principal_id: 3426116 - email: synapseformation-test-user@sagebase.org - diff --git a/tests/test_client.py b/tests/test_client.py index d686c11..caa054f 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -5,10 +5,10 @@ from unittest.mock import patch import synapseclient + from synapseformation import client, create from synapseformation.create import SynapseCreation - # def test_expand_config(): # test_config = { # 'TestRemove': "foo", @@ -61,111 +61,87 @@ # full_config = client.expand_config(test_config) # assert full_config == expected_config -class TestCreateSynapseResources(): +class TestCreateSynapseResources: def setup_method(self): """Setting up for each method""" self.syn = mock.create_autospec(synapseclient.Synapse) self.create_cls = SynapseCreation(self.syn) - self.config = [{ - 'name': 'Test Configuration', - 'type': 'Project', - 'children': [ - { - 'name': 'Genes', - 'type': 'Folder', - 'children': [ - { - 'name': "testing", - 'type': "Folder" - } - ] - } - ] - }] + self.config = [ + { + "name": "Test Configuration", + "type": "Project", + "children": [ + { + "name": "Genes", + "type": "Folder", + "children": [{"name": "testing", "type": "Folder"}], + } + ], + } + ] def test__create_synapse_resources_project(self): """Test project gets created""" - project_name = 'Test Configuration' - project_config = [{ - 'name': project_name, - 'type': 'Project' - }] - expected_config = [{ - 'name': project_name, - 'type': 'Project', - 'id': 'syn12222' - }] + project_name = "Test Configuration" + project_config = [{"name": project_name, "type": "Project"}] + expected_config = [{"name": project_name, "type": "Project", "id": "syn12222"}] project_ent = synapseclient.Project(id="syn12222") - with patch.object(self.create_cls, "get_or_create_project", - return_value=project_ent) as patch_create: - client._create_synapse_resources(config_list=project_config, - creation_cls=self.create_cls) + with patch.object( + self.create_cls, "get_or_create_project", return_value=project_ent + ) as patch_create: + client._create_synapse_resources( + config_list=project_config, creation_cls=self.create_cls + ) patch_create.assert_called_once_with(name=project_name) assert project_config == expected_config def test__create_synapse_resources_folder(self): """Test folders gets created""" folder_config = [ - { - 'name': 'Test 1', - 'type': 'Folder' - }, - { - 'name': 'Test 2', - 'type': 'Folder' - } + {"name": "Test 1", "type": "Folder"}, + {"name": "Test 2", "type": "Folder"}, ] expected_config = [ - { - 'name': 'Test 1', - 'type': 'Folder', - 'id': 'syn33333' - }, - { - 'name': 'Test 2', - 'type': 'Folder', - 'id': 'syn22222' - } + {"name": "Test 1", "type": "Folder", "id": "syn33333"}, + {"name": "Test 2", "type": "Folder", "id": "syn22222"}, ] folder_ent_1 = synapseclient.Folder(id="syn33333", parentId="syn5555") folder_ent_2 = synapseclient.Folder(id="syn22222", parentId="syn5555") call_1 = mock.call(name="Test 1", parentId="syn5555") call_2 = mock.call(name="Test 2", parentId="syn5555") - with patch.object(self.create_cls, "get_or_create_folder", - side_effect=[folder_ent_1, - folder_ent_2]) as patch_create: - client._create_synapse_resources(config_list=folder_config, - creation_cls=self.create_cls, - parentid="syn5555") + with patch.object( + self.create_cls, + "get_or_create_folder", + side_effect=[folder_ent_1, folder_ent_2], + ) as patch_create: + client._create_synapse_resources( + config_list=folder_config, + creation_cls=self.create_cls, + parentid="syn5555", + ) patch_create.assert_has_calls([call_1, call_2]) assert folder_config == expected_config def test__create_synapse_resources_acl(self): """Test ACL gets created""" - project_name = 'Test Configuration' - project_config = [{ - 'name': project_name, - 'type': 'Project', - 'acl': ['fake'] - }] - expected_config = [{ - 'name': project_name, - 'type': 'Project', - 'id': 'syn12222', - 'acl': ['fake'] - }] + project_name = "Test Configuration" + project_config = [{"name": project_name, "type": "Project", "acl": ["fake"]}] + expected_config = [ + {"name": project_name, "type": "Project", "id": "syn12222", "acl": ["fake"]} + ] project_ent = synapseclient.Project(id="syn12222") - with patch.object(self.create_cls, "get_or_create_project", - return_value=project_ent) as patch_create,\ - patch.object(create, "_set_acl") as patch_set: - client._create_synapse_resources(config_list=project_config, - creation_cls=self.create_cls) + with patch.object( + self.create_cls, "get_or_create_project", return_value=project_ent + ) as patch_create, patch.object(create, "_set_acl") as patch_set: + client._create_synapse_resources( + config_list=project_config, creation_cls=self.create_cls + ) patch_create.assert_called_once_with(name=project_name) assert project_config == expected_config patch_set.assert_called_once_with( - syn=self.create_cls.syn, entity=project_ent, - acl_config=['fake']) + syn=self.create_cls.syn, entity=project_ent, acl_config=["fake"] + ) def test__create_synapse_resources_recursive(self): """Test recursive calls are made""" @@ -173,73 +149,90 @@ def test__create_synapse_resources_recursive(self): folder_ent = synapseclient.Folder(id="syn33333", parentId="syn5555") call_1 = mock.call(name="Genes", parentId="syn5555") call_2 = mock.call(name="testing", parentId="syn33333") - with patch.object(self.create_cls, "get_or_create_project", - return_value=project_ent) as patch_create_proj,\ - patch.object(self.create_cls, "get_or_create_folder", - return_value=folder_ent) as patch_create_folder: - client._create_synapse_resources(config_list=self.config, - creation_cls=self.create_cls) - patch_create_proj.assert_called_once_with( - name="Test Configuration" + with patch.object( + self.create_cls, "get_or_create_project", return_value=project_ent + ) as patch_create_proj, patch.object( + self.create_cls, "get_or_create_folder", return_value=folder_ent + ) as patch_create_folder: + client._create_synapse_resources( + config_list=self.config, creation_cls=self.create_cls ) + patch_create_proj.assert_called_once_with(name="Test Configuration") patch_create_folder.assert_has_calls([call_1, call_2]) def test__create_synapse_resources_team(self): """Test team gets created""" - team_config = [{ - 'name': 'Test Configuration', - 'type': 'Team', - 'can_public_join': False, - 'description': 'Test team description' - }] - expected_config = [{ - 'name': 'Test Configuration', - 'type': 'Team', - 'can_public_join': False, - 'description': 'Test team description', - 'id': '11111' - }] + team_config = [ + { + "name": "Test Configuration", + "type": "Team", + "can_public_join": False, + "description": "Test team description", + } + ] + expected_config = [ + { + "name": "Test Configuration", + "type": "Team", + "can_public_join": False, + "description": "Test team description", + "id": "11111", + } + ] team_ent = synapseclient.Team(id="11111") - with patch.object(self.create_cls, "get_or_create_team", - return_value=team_ent) as patch_create: - client._create_synapse_resources(config_list=team_config, - creation_cls=self.create_cls) + with patch.object( + self.create_cls, "get_or_create_team", return_value=team_ent + ) as patch_create: + client._create_synapse_resources( + config_list=team_config, creation_cls=self.create_cls + ) patch_create.assert_called_once_with( - name=team_config[0]['name'], - description=team_config[0]['description'], - canPublicJoin=team_config[0]['can_public_join'] + name=team_config[0]["name"], + description=team_config[0]["description"], + canPublicJoin=team_config[0]["can_public_join"], ) assert team_config == expected_config def test__create_synapse_resources_team_invite(self): """Test team members are invited""" - team_config = [{ - 'name': 'Test Configuration', - 'type': 'Team', - 'can_public_join': False, - 'description': 'Test team description', - 'invitations': [ - { - 'message': 'Welcome to the Test Team!', - 'members': [ - {"principal_id": 3426116}, - {"email": "synapseformation-test-user@sagebase.org"} - ] - } - ] - }] + team_config = [ + { + "name": "Test Configuration", + "type": "Team", + "can_public_join": False, + "description": "Test team description", + "invitations": [ + { + "message": "Welcome to the Test Team!", + "members": [ + {"principal_id": 3426116}, + {"email": "synapseformation-test-user@sagebase.org"}, + ], + } + ], + } + ] team_ent = synapseclient.Team(id="11111") expected_calls = [ - mock.call(team=team_ent, user=3426116, inviteeEmail=None, - message='Welcome to the Test Team!'), - mock.call(team=team_ent, user=None, - inviteeEmail="synapseformation-test-user@sagebase.org", - message='Welcome to the Test Team!') + mock.call( + team=team_ent, + user=3426116, + inviteeEmail=None, + message="Welcome to the Test Team!", + ), + mock.call( + team=team_ent, + user=None, + inviteeEmail="synapseformation-test-user@sagebase.org", + message="Welcome to the Test Team!", + ), ] - with patch.object(self.create_cls, "get_or_create_team", - return_value=team_ent) as patch_create,\ - patch.object(self.create_cls.syn, - "invite_to_team") as patch_invite: - client._create_synapse_resources(config_list=team_config, - creation_cls=self.create_cls) - patch_invite.assert_has_calls(expected_calls) \ No newline at end of file + with patch.object( + self.create_cls, "get_or_create_team", return_value=team_ent + ) as patch_create, patch.object( + self.create_cls.syn, "invite_to_team" + ) as patch_invite: + client._create_synapse_resources( + config_list=team_config, creation_cls=self.create_cls + ) + patch_invite.assert_has_calls(expected_calls) diff --git a/tests/test_create.py b/tests/test_create.py index 89941e6..26f5fe2 100644 --- a/tests/test_create.py +++ b/tests/test_create.py @@ -4,9 +4,9 @@ with what is tested """ import json +import uuid from unittest import mock from unittest.mock import Mock, patch -import uuid import pytest import synapseclient @@ -26,22 +26,22 @@ def test__find_by_obj_or_create__create(): returned = synapseclient.Entity(name=str(uuid.uuid1())) with patch.object(SYN, "store", return_value=returned) as patch_syn_store: created_ent = CREATE_CLS._find_by_obj_or_create(entity) - patch_syn_store.assert_called_once_with(entity, - createOrUpdate=False) + patch_syn_store.assert_called_once_with(entity, createOrUpdate=False) assert created_ent == returned -#@patch.object(SYN, "store") +# @patch.object(SYN, "store") def test__find_by_obj_or_create__onlycreate_raise(): """Tests only create flag raises error when entity exists""" entity = synapseclient.Entity(name=str(uuid.uuid1())) returned = synapseclient.Entity(name=str(uuid.uuid1())) # Mock SynapseHTTPError with 409 response mocked_409 = SynapseHTTPError("foo", response=Mock(status_code=409)) - with patch.object(SYN, "store", - side_effect=mocked_409) as patch_syn_store,\ - pytest.raises(ValueError, match="foo. To use existing entities, " - "set only_get to True."): + with patch.object( + SYN, "store", side_effect=mocked_409 + ) as patch_syn_store, pytest.raises( + ValueError, match="foo. To use existing entities, " "set only_get to True." + ): CREATE_CLS._find_by_obj_or_create(entity) patch_syn_store.assert_called_once_with(entity, createOrUpdate=False) @@ -52,9 +52,9 @@ def test__find_by_obj_or_create__wrongcode_raise(): returned = synapseclient.Entity(name=str(uuid.uuid1())) # Mock SynapseHTTPError with 404 response mocked_404 = SynapseHTTPError("Not Found", response=Mock(status_code=404)) - with patch.object(SYN, "store", - side_effect=mocked_404) as patch_syn_store,\ - pytest.raises(SynapseHTTPError, match="Not Found"): + with patch.object( + SYN, "store", side_effect=mocked_404 + ) as patch_syn_store, pytest.raises(SynapseHTTPError, match="Not Found"): CREATE_CLS._find_by_obj_or_create(entity) patch_syn_store.assert_called_once_with(entity, createOrUpdate=False) @@ -62,19 +62,22 @@ def test__find_by_obj_or_create__wrongcode_raise(): def test__find_by_obj_or_create__get(): """Tests getting of entity""" concretetype = str(uuid.uuid1()) - entity = synapseclient.Entity(name=str(uuid.uuid1()), - parentId=str(uuid.uuid1()), - concreteType=concretetype) - returned = synapseclient.Entity(name=str(uuid.uuid1()), - id=str(uuid.uuid1()), - parentId=str(uuid.uuid1()), - concreteType=concretetype) + entity = synapseclient.Entity( + name=str(uuid.uuid1()), parentId=str(uuid.uuid1()), concreteType=concretetype + ) + returned = synapseclient.Entity( + name=str(uuid.uuid1()), + id=str(uuid.uuid1()), + parentId=str(uuid.uuid1()), + concreteType=concretetype, + ) mocked_409 = SynapseHTTPError("foo", response=Mock(status_code=409)) - with patch.object(SYN, "store", - side_effect=mocked_409) as patch_syn_store,\ - patch.object(GET_CLS, "_get_obj", - return_value=returned) as patch_cls_get: + with patch.object( + SYN, "store", side_effect=mocked_409 + ) as patch_syn_store, patch.object( + GET_CLS, "_get_obj", return_value=returned + ) as patch_cls_get: get_ent = GET_CLS._find_by_obj_or_create(entity) assert get_ent == returned patch_syn_store.assert_called_once() @@ -83,16 +86,15 @@ def test__find_by_obj_or_create__get(): def test__find_entity_by_name__valid(): """Test getting entities by name""" - post_return = {'id': "syn11111"} - obj = synapseclient.File(path="foo.txt", parentId="syn12345", - id="syn11111") - with patch.object(SYN, "findEntityId", - return_value=post_return) as patch_find,\ - patch.object(SYN, "get", return_value=obj) as patch_get: + post_return = {"id": "syn11111"} + obj = synapseclient.File(path="foo.txt", parentId="syn12345", id="syn11111") + with patch.object( + SYN, "findEntityId", return_value=post_return + ) as patch_find, patch.object(SYN, "get", return_value=obj) as patch_get: return_obj = GET_CLS._find_entity_by_name( parentid="syn12345", entity_name="foo.txt", - concrete_type=obj.properties.concreteType + concrete_type=obj.properties.concreteType, ) assert obj == return_obj patch_find.assert_called_once_with("foo.txt", parent="syn12345") @@ -101,44 +103,48 @@ def test__find_entity_by_name__valid(): def test__find_entity_by_name__invalid(): """Test getting entities by name""" - post_return = {'id': "syn11111"} - obj = synapseclient.File(path="foo.txt", parentId="syn12345", - id="syn11111") - with patch.object(SYN, "findEntityId", return_value=post_return),\ - patch.object(SYN, "get", return_value=obj),\ - pytest.raises(AssertionError, - match="Retrieved .* had type .* rather than .*"): + post_return = {"id": "syn11111"} + obj = synapseclient.File(path="foo.txt", parentId="syn12345", id="syn11111") + with patch.object(SYN, "findEntityId", return_value=post_return), patch.object( + SYN, "get", return_value=obj + ), pytest.raises(AssertionError, match="Retrieved .* had type .* rather than .*"): GET_CLS._find_entity_by_name( - parentid="syn12345", - entity_name="foo.txt", - concrete_type="Test" + parentid="syn12345", entity_name="foo.txt", concrete_type="Test" ) @pytest.mark.parametrize( - "obj", [synapseclient.Project(name="foo"), - synapseclient.File(path="foo.txt", parentId="syn12345"), - synapseclient.Folder(name="foo", parentId="syn12345"), - synapseclient.Schema(name="foo", parentId="syn12345")] + "obj", + [ + synapseclient.Project(name="foo"), + synapseclient.File(path="foo.txt", parentId="syn12345"), + synapseclient.Folder(name="foo", parentId="syn12345"), + synapseclient.Schema(name="foo", parentId="syn12345"), + ], ) def test__get_obj__entity(obj): """Test getting of entities""" - with patch.object(GET_CLS, "_find_entity_by_name", - return_value=obj) as patch_get: + with patch.object(GET_CLS, "_find_entity_by_name", return_value=obj) as patch_get: return_obj = GET_CLS._get_obj(obj) patch_get.assert_called_once_with( parentid=obj.properties.get("parentId", None), entity_name=obj.name, - concrete_type=obj.properties.concreteType) + concrete_type=obj.properties.concreteType, + ) assert obj == return_obj -@pytest.mark.parametrize("obj,get_func", - [(synapseclient.Team(name="foo"), "getTeam"), - (synapseclient.Wiki(owner="foo"), "getWiki"), - (synapseclient.Evaluation(name="foo", - contentSource="syn123"), - "getEvaluationByName")]) +@pytest.mark.parametrize( + "obj,get_func", + [ + (synapseclient.Team(name="foo"), "getTeam"), + (synapseclient.Wiki(owner="foo"), "getWiki"), + ( + synapseclient.Evaluation(name="foo", contentSource="syn123"), + "getEvaluationByName", + ), + ], +) def test__get_obj__nonentity(obj, get_func): """Test getting of entities""" with patch.object(SYN, get_func, return_value=obj) as patch_get: @@ -154,11 +160,10 @@ def test_get_or_create_project__call(): """Makes sure correct parameters are called""" project_name = str(uuid.uuid1()) project = synapseclient.Project(name=project_name) - returned = synapseclient.Project(name=project_name, - id=str(uuid.uuid1())) - with patch.object(CREATE_CLS, - "_find_by_obj_or_create", - return_value=returned) as patch_find_or_create: + returned = synapseclient.Project(name=project_name, id=str(uuid.uuid1())) + with patch.object( + CREATE_CLS, "_find_by_obj_or_create", return_value=returned + ) as patch_find_or_create: new_project = CREATE_CLS.get_or_create_project(name=project_name) assert new_project == returned patch_find_or_create.assert_called_once_with(project) @@ -169,19 +174,21 @@ def test_get_or_create_team__call(): team_name = str(uuid.uuid1()) description = str(uuid.uuid1()) public_join = True - team_ent = synapseclient.Team(name=team_name, - description=description, - canPublicJoin=public_join) - returned = synapseclient.Team(name=team_name, - description=description, - id=str(uuid.uuid1()), - canPublicJoin=public_join) - with patch.object(CREATE_CLS, - "_find_by_obj_or_create", - return_value=returned) as patch_find_or_create: - new_team = CREATE_CLS.get_or_create_team(name=team_name, - description=description, - canPublicJoin=public_join) + team_ent = synapseclient.Team( + name=team_name, description=description, canPublicJoin=public_join + ) + returned = synapseclient.Team( + name=team_name, + description=description, + id=str(uuid.uuid1()), + canPublicJoin=public_join, + ) + with patch.object( + CREATE_CLS, "_find_by_obj_or_create", return_value=returned + ) as patch_find_or_create: + new_team = CREATE_CLS.get_or_create_team( + name=team_name, description=description, canPublicJoin=public_join + ) assert new_team == returned patch_find_or_create.assert_called_once_with(team_ent) @@ -190,16 +197,16 @@ def test_get_or_create_folder__call(): """Makes sure correct parameters are called""" folder_name = str(uuid.uuid1()) parentid = str(uuid.uuid1()) - folder = synapseclient.Folder(name=folder_name, - parentId=parentid) - returned = synapseclient.Folder(name=folder_name, - id=str(uuid.uuid1()), - parentId=parentid) - with patch.object(CREATE_CLS, - "_find_by_obj_or_create", - return_value=returned) as patch_find_or_create: - new_folder = CREATE_CLS.get_or_create_folder(name=folder_name, - parentId=parentid) + folder = synapseclient.Folder(name=folder_name, parentId=parentid) + returned = synapseclient.Folder( + name=folder_name, id=str(uuid.uuid1()), parentId=parentid + ) + with patch.object( + CREATE_CLS, "_find_by_obj_or_create", return_value=returned + ) as patch_find_or_create: + new_folder = CREATE_CLS.get_or_create_folder( + name=folder_name, parentId=parentid + ) assert new_folder == returned patch_find_or_create.assert_called_once_with(folder) @@ -208,16 +215,14 @@ def test_get_or_create_file__call(): """Makes sure correct parameters are called""" file_path = str(uuid.uuid1()) parentid = str(uuid.uuid1()) - file_ent = synapseclient.File(path=file_path, - parentId=parentid) - returned = synapseclient.File(path=file_path, - id=str(uuid.uuid1()), - parentId=parentid) - with patch.object(CREATE_CLS, - "_find_by_obj_or_create", - return_value=returned) as patch_find_or_create: - new_file = CREATE_CLS.get_or_create_file(path=file_path, - parentId=parentid) + file_ent = synapseclient.File(path=file_path, parentId=parentid) + returned = synapseclient.File( + path=file_path, id=str(uuid.uuid1()), parentId=parentid + ) + with patch.object( + CREATE_CLS, "_find_by_obj_or_create", return_value=returned + ) as patch_find_or_create: + new_file = CREATE_CLS.get_or_create_file(path=file_path, parentId=parentid) assert new_file == returned patch_find_or_create.assert_called_once_with(file_ent) @@ -226,16 +231,14 @@ def test_get_or_create_view__call(): """Makes sure correct parameters are called""" view_name = str(uuid.uuid1()) parentid = str(uuid.uuid1()) - view_ent = synapseclient.EntityViewSchema(name=view_name, - parentId=parentid) - returned = synapseclient.EntityViewSchema(name=view_name, - id=str(uuid.uuid1()), - parentId=parentid) - with patch.object(CREATE_CLS, - "_find_by_obj_or_create", - return_value=returned) as patch_find_or_create: - new_view = CREATE_CLS.get_or_create_view(name=view_name, - parentId=parentid) + view_ent = synapseclient.EntityViewSchema(name=view_name, parentId=parentid) + returned = synapseclient.EntityViewSchema( + name=view_name, id=str(uuid.uuid1()), parentId=parentid + ) + with patch.object( + CREATE_CLS, "_find_by_obj_or_create", return_value=returned + ) as patch_find_or_create: + new_view = CREATE_CLS.get_or_create_view(name=view_name, parentId=parentid) assert new_view == returned patch_find_or_create.assert_called_once_with(view_ent) @@ -244,16 +247,16 @@ def test_get_or_create_schema__call(): """Makes sure correct parameters are called""" schema_name = str(uuid.uuid1()) parentid = str(uuid.uuid1()) - schema_ent = synapseclient.Schema(name=schema_name, - parentId=parentid) - returned = synapseclient.Schema(name=schema_name, - id=str(uuid.uuid1()), - parentId=parentid) - with patch.object(CREATE_CLS, - "_find_by_obj_or_create", - return_value=returned) as patch_find_or_create: - new_schema = CREATE_CLS.get_or_create_schema(name=schema_name, - parentId=parentid) + schema_ent = synapseclient.Schema(name=schema_name, parentId=parentid) + returned = synapseclient.Schema( + name=schema_name, id=str(uuid.uuid1()), parentId=parentid + ) + with patch.object( + CREATE_CLS, "_find_by_obj_or_create", return_value=returned + ) as patch_find_or_create: + new_schema = CREATE_CLS.get_or_create_schema( + name=schema_name, parentId=parentid + ) assert new_schema == returned patch_find_or_create.assert_called_once_with(schema_ent) @@ -263,19 +266,16 @@ def test_get_or_create_wiki__call(): wiki_title = str(uuid.uuid1()) markdown = str(uuid.uuid1()) owner = str(uuid.uuid1()) - wiki_ent = synapseclient.Wiki(title=wiki_title, - markdown=markdown, - owner=owner) - returned = synapseclient.Wiki(title=wiki_title, - markdown=markdown, - id=str(uuid.uuid1()), - owner=owner) - with patch.object(CREATE_CLS, - "_find_by_obj_or_create", - return_value=returned) as patch_find_or_create: - new_wiki = CREATE_CLS.get_or_create_wiki(owner=owner, - title=wiki_title, - markdown=markdown) + wiki_ent = synapseclient.Wiki(title=wiki_title, markdown=markdown, owner=owner) + returned = synapseclient.Wiki( + title=wiki_title, markdown=markdown, id=str(uuid.uuid1()), owner=owner + ) + with patch.object( + CREATE_CLS, "_find_by_obj_or_create", return_value=returned + ) as patch_find_or_create: + new_wiki = CREATE_CLS.get_or_create_wiki( + owner=owner, title=wiki_title, markdown=markdown + ) assert new_wiki == returned patch_find_or_create.assert_called_once_with(wiki_ent) @@ -285,22 +285,22 @@ def test_get_or_create_queue__call(): queue_name = str(uuid.uuid1()) parentid = "syn" + str(uuid.uuid1()) description = str(uuid.uuid1()) - queue = synapseclient.Evaluation(name=queue_name, - contentSource=parentid, - description=description, - quota={}) - returned = synapseclient.Evaluation(name=queue_name, - contentSource=parentid, - id=str(uuid.uuid1()), - description=description, - quota={}) - with patch.object(CREATE_CLS, - "_find_by_obj_or_create", - return_value=returned) as patch_find_or_create: - new_queue = CREATE_CLS.get_or_create_queue(name=queue_name, - contentSource=parentid, - description=description, - quota={}) + queue = synapseclient.Evaluation( + name=queue_name, contentSource=parentid, description=description, quota={} + ) + returned = synapseclient.Evaluation( + name=queue_name, + contentSource=parentid, + id=str(uuid.uuid1()), + description=description, + quota={}, + ) + with patch.object( + CREATE_CLS, "_find_by_obj_or_create", return_value=returned + ) as patch_find_or_create: + new_queue = CREATE_CLS.get_or_create_queue( + name=queue_name, contentSource=parentid, description=description, quota={} + ) assert new_queue == returned patch_find_or_create.assert_called_once_with(queue) @@ -311,12 +311,13 @@ def test__get_challenge__call(): chalid = str(uuid.uuid1()) etag = str(uuid.uuid1()) participant_teamid = str(uuid.uuid1()) - rest_return = {'id': chalid, - 'projectId': projectid, - 'etag': etag, - 'participantTeamId': participant_teamid} - with patch.object(SYN, "restGET", - return_value=rest_return) as patch_rest_get: + rest_return = { + "id": chalid, + "projectId": projectid, + "etag": etag, + "participantTeamId": participant_teamid, + } + with patch.object(SYN, "restGET", return_value=rest_return) as patch_rest_get: chal = CREATE_CLS._get_challenge(projectid) patch_rest_get.assert_called_once_with(f"/entity/{projectid}/challenge") assert chal == rest_return @@ -328,18 +329,18 @@ def test__create_challenge__call(): chalid = str(uuid.uuid1()) etag = str(uuid.uuid1()) teamid = str(uuid.uuid1()) - rest_return = {'id': chalid, - 'projectId': projectid, - 'etag': etag, - 'participantTeamId': teamid} - input_dict = {'participantTeamId': teamid, - 'projectId': projectid} - with patch.object(SYN, "restPOST", - return_value=rest_return) as patch_rest_post: - chal = CREATE_CLS._create_challenge(participantTeamId=teamid, - projectId=projectid) - patch_rest_post.assert_called_once_with('/challenge', - json.dumps(input_dict)) + rest_return = { + "id": chalid, + "projectId": projectid, + "etag": etag, + "participantTeamId": teamid, + } + input_dict = {"participantTeamId": teamid, "projectId": projectid} + with patch.object(SYN, "restPOST", return_value=rest_return) as patch_rest_post: + chal = CREATE_CLS._create_challenge( + participantTeamId=teamid, projectId=projectid + ) + patch_rest_post.assert_called_once_with("/challenge", json.dumps(input_dict)) assert chal == rest_return @@ -347,28 +348,31 @@ def test_get_or_create_challenge__create(): """Tests creation of challenge""" projectid = str(uuid.uuid1()) teamid = str(uuid.uuid1()) - returned = {'id': str(uuid.uuid1())} - with patch.object(CREATE_CLS, "_create_challenge", - return_value=returned) as patch_create: - new_chal = CREATE_CLS.get_or_create_challenge(participantTeamId=teamid, - projectId=projectid) + returned = {"id": str(uuid.uuid1())} + with patch.object( + CREATE_CLS, "_create_challenge", return_value=returned + ) as patch_create: + new_chal = CREATE_CLS.get_or_create_challenge( + participantTeamId=teamid, projectId=projectid + ) assert new_chal == returned - patch_create.assert_called_once_with(projectId=projectid, - participantTeamId=teamid) + patch_create.assert_called_once_with( + projectId=projectid, participantTeamId=teamid + ) def test_get_or_create_challenge__get(): """Tests getting of challenge""" projectid = str(uuid.uuid1()) teamid = str(uuid.uuid1()) - returned = {'id': str(uuid.uuid1())} + returned = {"id": str(uuid.uuid1())} mocked_400 = SynapseHTTPError("foo", response=Mock(status_code=400)) - with patch.object(GET_CLS, "_create_challenge", - side_effect=mocked_400),\ - patch.object(GET_CLS, "_get_challenge", - return_value=returned) as patch_get: - new_chal = GET_CLS.get_or_create_challenge(participantTeamId=teamid, - projectId=projectid) + with patch.object( + GET_CLS, "_create_challenge", side_effect=mocked_400 + ), patch.object(GET_CLS, "_get_challenge", return_value=returned) as patch_get: + new_chal = GET_CLS.get_or_create_challenge( + participantTeamId=teamid, projectId=projectid + ) patch_get.assert_called_once_with(projectid) assert new_chal == returned @@ -378,12 +382,14 @@ def test_get_or_create_challenge__get_raise(): projectid = str(uuid.uuid1()) teamid = str(uuid.uuid1()) mocked_400 = SynapseHTTPError("foo", response=Mock(status_code=400)) - with patch.object(CREATE_CLS, "_create_challenge", - side_effect=mocked_400),\ - pytest.raises(ValueError, match="foo. To use existing entities, " - "set only_get to True."): - CREATE_CLS.get_or_create_challenge(participantTeamId=teamid, - projectId=projectid) + with patch.object( + CREATE_CLS, "_create_challenge", side_effect=mocked_400 + ), pytest.raises( + ValueError, match="foo. To use existing entities, " "set only_get to True." + ): + CREATE_CLS.get_or_create_challenge( + participantTeamId=teamid, projectId=projectid + ) def test_get_or_create_challenge__get_raise_404(): @@ -391,19 +397,20 @@ def test_get_or_create_challenge__get_raise_404(): projectid = str(uuid.uuid1()) teamid = str(uuid.uuid1()) mocked_404 = SynapseHTTPError("Not Found", response=Mock(status_code=404)) - with patch.object(CREATE_CLS, "_create_challenge", - side_effect=mocked_404),\ - pytest.raises(SynapseHTTPError, match="Not Found"): - CREATE_CLS.get_or_create_challenge(participantTeamId=teamid, - projectId=projectid) + with patch.object( + CREATE_CLS, "_create_challenge", side_effect=mocked_404 + ), pytest.raises(SynapseHTTPError, match="Not Found"): + CREATE_CLS.get_or_create_challenge( + participantTeamId=teamid, projectId=projectid + ) def test_get_or_create_challenge__get_raise_missing_param(): """Tests that a missing parameter will raise an error""" teamid = str(uuid.uuid1()) - with pytest.raises(TypeError, - match=".*missing 1 required positional argument: " - "'projectId'"): + with pytest.raises( + TypeError, match=".*missing 1 required positional argument: " "'projectId'" + ): CREATE_CLS.get_or_create_challenge(participantTeamId=teamid) @@ -411,18 +418,19 @@ def test__set_acl(): syn = Mock() entity = Mock() acl_config = [ - {"principal_id": "1111111", - "access_type": ["READ", "DOWNLOAD"]}, - {"principal_id": "2222222", - "access_type": ["READ", "DOWNLOAD", "UPDATE"]} + {"principal_id": "1111111", "access_type": ["READ", "DOWNLOAD"]}, + {"principal_id": "2222222", "access_type": ["READ", "DOWNLOAD", "UPDATE"]}, ] expected_calls = [ - mock.call(entity=entity, principalId="1111111", - accessType=["READ", "DOWNLOAD"]), - mock.call(entity=entity, principalId="2222222", - accessType=["READ", "DOWNLOAD", "UPDATE"]) + mock.call( + entity=entity, principalId="1111111", accessType=["READ", "DOWNLOAD"] + ), + mock.call( + entity=entity, + principalId="2222222", + accessType=["READ", "DOWNLOAD", "UPDATE"], + ), ] with patch.object(syn, "setPermissions") as patch_set: - create._set_acl(syn=syn, entity=entity, - acl_config=acl_config) + create._set_acl(syn=syn, entity=entity, acl_config=acl_config) patch_set.assert_has_calls(expected_calls) diff --git a/tests/test_utils.py b/tests/test_utils.py index e70f408..9e5953a 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -2,7 +2,7 @@ import json import tempfile from unittest import mock -from unittest.mock import patch, Mock +from unittest.mock import Mock, patch import pytest import synapseclient @@ -17,28 +17,28 @@ def test_read_config_yaml(): """Test reading in yaml configuration""" test_yaml = "Test:\n name: foo\n test: bar" - expected = {'Test': {'name': 'foo', 'test': 'bar'}} + expected = {"Test": {"name": "foo", "test": "bar"}} mock_open = mock.mock_open(read_data=test_yaml) with mock.patch("builtins.open", mock_open): - yaml_dict = utils.read_config('file') + yaml_dict = utils.read_config("file") assert yaml_dict == expected def test_read_config_json(): """Test JSON config can be read with yaml.safe_load""" - expected = {'Test': {'name': 'foo', 'test': 'bar'}} + expected = {"Test": {"name": "foo", "test": "bar"}} mock_open = mock.mock_open(read_data=json.dumps(expected)) with mock.patch("builtins.open", mock_open): - json_dict = utils.read_config('file') + json_dict = utils.read_config("file") assert json_dict == expected def test_synapse_login_default(): """Test default synapse login config path""" syn = Mock() - with patch.object(synapseclient, "Synapse", - return_value=syn) as patch_synapse,\ - patch.object(syn, "login") as patch_login: + with patch.object( + synapseclient, "Synapse", return_value=syn + ) as patch_synapse, patch.object(syn, "login") as patch_login: syn_conn = utils.synapse_login() assert syn_conn == syn patch_synapse.assert_called_once_with( @@ -51,23 +51,20 @@ def test_synapse_login_specify(): """Test default synapse login config path""" syn = Mock() temp_config = tempfile.NamedTemporaryFile() - with patch.object(synapseclient, "Synapse", - return_value=syn) as patch_synapse: + with patch.object(synapseclient, "Synapse", return_value=syn) as patch_synapse: syn_conn = utils.synapse_login(synapse_config=temp_config.name) assert syn_conn == syn - patch_synapse.assert_called_once_with( - configPath=temp_config.name - ) + patch_synapse.assert_called_once_with(configPath=temp_config.name) temp_config.close() -@pytest.mark.parametrize("error", [SynapseAuthenticationError, - SynapseNoCredentialsError]) +@pytest.mark.parametrize( + "error", [SynapseAuthenticationError, SynapseNoCredentialsError] +) def test_synapse_login_error(error): """Test default synapse login config path""" syn = Mock() - with patch.object(synapseclient, "Synapse", return_value=syn),\ - patch.object(syn, "login", side_effect=error),\ - pytest.raises(ValueError, - match=r"Login error: please make sure you .*"): + with patch.object(synapseclient, "Synapse", return_value=syn), patch.object( + syn, "login", side_effect=error + ), pytest.raises(ValueError, match=r"Login error: please make sure you .*"): utils.synapse_login()