diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index f793a32..307d19b 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -13,8 +13,7 @@ jobs: - uses: docker://ghcr.io/fluidattacks/makes/amd64:latest name: /api/deploy with: - set-safe-directory: /github/workspace - args: m . /api/deploy dev + args: sh -c "chown -R root:root /github/workspace && m . /api/deploy dev" env: STACKHERO_SERVICE_ID: ${{ secrets.STACKHERO_SERVICE_ID }} STACKHERO_PASSWORD: ${{ secrets.STACKHERO_PASSWORD }} @@ -28,8 +27,7 @@ jobs: - uses: docker://ghcr.io/fluidattacks/makes/amd64:latest name: /formatBash with: - set-safe-directory: /github/workspace - args: m . /formatBash + args: sh -c "chown -R root:root /github/workspace && m . /formatBash" formatMarkdown: runs-on: ubuntu-latest @@ -38,8 +36,7 @@ jobs: - uses: docker://ghcr.io/fluidattacks/makes/amd64:latest name: /formatMarkdown with: - set-safe-directory: /github/workspace - args: m . /formatMarkdown + args: sh -c "chown -R root:root /github/workspace && m . /formatMarkdown" formatNix: runs-on: ubuntu-latest @@ -48,8 +45,7 @@ jobs: - uses: docker://ghcr.io/fluidattacks/makes/amd64:latest name: /formatNix with: - set-safe-directory: /github/workspace - args: m . /formatNix + args: sh -c "chown -R root:root /github/workspace && m . /formatNix" formatPython_default: runs-on: ubuntu-latest @@ -58,8 +54,7 @@ jobs: - uses: docker://ghcr.io/fluidattacks/makes/amd64:latest name: /formatPython/default with: - set-safe-directory: /github/workspace - args: m . /formatPython/default + args: sh -c "chown -R root:root /github/workspace && m . /formatPython/default" lintBash: runs-on: ubuntu-latest @@ -70,8 +65,7 @@ jobs: - uses: docker://ghcr.io/fluidattacks/makes/amd64:latest name: /lintBash with: - set-safe-directory: /github/workspace - args: m . /lintBash + args: sh -c "chown -R root:root /github/workspace && m . /lintBash" lintGitCommitMsg: runs-on: ubuntu-latest @@ -82,8 +76,7 @@ jobs: - uses: docker://ghcr.io/fluidattacks/makes/amd64:latest name: /lintGitCommitMsg with: - set-safe-directory: /github/workspace - args: m . /lintGitCommitMsg + args: sh -c "chown -R root:root /github/workspace && m . /lintGitCommitMsg" lintGitMailMap: runs-on: ubuntu-latest @@ -94,8 +87,7 @@ jobs: - uses: docker://ghcr.io/fluidattacks/makes/amd64:latest name: /lintGitMailMap with: - set-safe-directory: /github/workspace - args: m . /lintGitMailMap + args: sh -c "chown -R root:root /github/workspace && m . /lintGitMailMap" lintMarkdown_readme: runs-on: ubuntu-latest @@ -104,8 +96,7 @@ jobs: - uses: docker://ghcr.io/fluidattacks/makes/amd64:latest name: /lintMarkdown/readme with: - set-safe-directory: /github/workspace - args: m . /lintMarkdown/readme + args: sh -c "chown -R root:root /github/workspace && m . /lintMarkdown/readme" lintNix: runs-on: ubuntu-latest @@ -114,8 +105,7 @@ jobs: - uses: docker://ghcr.io/fluidattacks/makes/amd64:latest name: /lintNix with: - set-safe-directory: /github/workspace - args: m . /lintNix + args: sh -c "chown -R root:root /github/workspace && m . /lintNix" lintPython_module_api: runs-on: ubuntu-latest @@ -124,8 +114,7 @@ jobs: - uses: docker://ghcr.io/fluidattacks/makes/amd64:latest name: /lintPython/module/api with: - set-safe-directory: /github/workspace - args: m . /lintPython/module/api + args: sh -c "chown -R root:root /github/workspace && m . /lintPython/module/api" lintWithLizard_api: runs-on: ubuntu-latest @@ -134,8 +123,7 @@ jobs: - uses: docker://ghcr.io/fluidattacks/makes/amd64:latest name: /lintWithLizard/api with: - set-safe-directory: /github/workspace - args: m . /lintWithLizard/api + args: sh -c "chown -R root:root /github/workspace && m . /lintWithLizard/api" securePythonWithBandit_api: runs-on: ubuntu-latest @@ -144,8 +132,7 @@ jobs: - uses: docker://ghcr.io/fluidattacks/makes/amd64:latest name: /securePythonWithBandit/api with: - set-safe-directory: /github/workspace - args: m . /securePythonWithBandit/api + args: sh -c "chown -R root:root /github/workspace && m . /securePythonWithBandit/api" name: dev on: pull_request: diff --git a/.github/workflows/prod.yml b/.github/workflows/prod.yml index 58ab88e..21aefe7 100644 --- a/.github/workflows/prod.yml +++ b/.github/workflows/prod.yml @@ -13,8 +13,7 @@ jobs: - uses: docker://ghcr.io/fluidattacks/makes/amd64:latest name: /api/deploy with: - set-safe-directory: /github/workspace - args: m . /api/deploy prod + args: sh -c "chown -R root:root /github/workspace && m . /api/deploy prod" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} STACKHERO_SERVICE_ID: ${{ secrets.STACKHERO_SERVICE_ID }} @@ -29,8 +28,7 @@ jobs: - uses: docker://ghcr.io/fluidattacks/makes/amd64:latest name: /formatBash with: - set-safe-directory: /github/workspace - args: m . /formatBash + args: sh -c "chown -R root:root /github/workspace && m . /formatBash" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -41,8 +39,7 @@ jobs: - uses: docker://ghcr.io/fluidattacks/makes/amd64:latest name: /formatMarkdown with: - set-safe-directory: /github/workspace - args: m . /formatMarkdown + args: sh -c "chown -R root:root /github/workspace && m . /formatMarkdown" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -53,8 +50,7 @@ jobs: - uses: docker://ghcr.io/fluidattacks/makes/amd64:latest name: /formatNix with: - set-safe-directory: /github/workspace - args: m . /formatNix + args: sh -c "chown -R root:root /github/workspace && m . /formatNix" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -65,8 +61,7 @@ jobs: - uses: docker://ghcr.io/fluidattacks/makes/amd64:latest name: /formatPython/default with: - set-safe-directory: /github/workspace - args: m . /formatPython/default + args: sh -c "chown -R root:root /github/workspace && m . /formatPython/default" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -79,8 +74,7 @@ jobs: - uses: docker://ghcr.io/fluidattacks/makes/amd64:latest name: /lintBash with: - set-safe-directory: /github/workspace - args: m . /lintBash + args: sh -c "chown -R root:root /github/workspace && m . /lintBash" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -93,8 +87,7 @@ jobs: - uses: docker://ghcr.io/fluidattacks/makes/amd64:latest name: /lintGitCommitMsg with: - set-safe-directory: /github/workspace - args: m . /lintGitCommitMsg + args: sh -c "chown -R root:root /github/workspace && m . /lintGitCommitMsg" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -107,8 +100,7 @@ jobs: - uses: docker://ghcr.io/fluidattacks/makes/amd64:latest name: /lintGitMailMap with: - set-safe-directory: /github/workspace - args: m . /lintGitMailMap + args: sh -c "chown -R root:root /github/workspace && m . /lintGitMailMap" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -119,8 +111,7 @@ jobs: - uses: docker://ghcr.io/fluidattacks/makes/amd64:latest name: /lintMarkdown/readme with: - set-safe-directory: /github/workspace - args: m . /lintMarkdown/readme + args: sh -c "chown -R root:root /github/workspace && m . /lintMarkdown/readme" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -131,8 +122,7 @@ jobs: - uses: docker://ghcr.io/fluidattacks/makes/amd64:latest name: /lintNix with: - set-safe-directory: /github/workspace - args: m . /lintNix + args: sh -c "chown -R root:root /github/workspace && m . /lintNix" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -143,8 +133,7 @@ jobs: - uses: docker://ghcr.io/fluidattacks/makes/amd64:latest name: /lintPython/module/api with: - set-safe-directory: /github/workspace - args: m . /lintPython/module/api + args: sh -c "chown -R root:root /github/workspace && m . /lintPython/module/api" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -155,8 +144,7 @@ jobs: - uses: docker://ghcr.io/fluidattacks/makes/amd64:latest name: /lintWithLizard/api with: - set-safe-directory: /github/workspace - args: m . /lintWithLizard/api + args: sh -c "chown -R root:root /github/workspace && m . /lintWithLizard/api" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} @@ -167,8 +155,7 @@ jobs: - uses: docker://ghcr.io/fluidattacks/makes/amd64:latest name: /securePythonWithBandit/api with: - set-safe-directory: /github/workspace - args: m . /securePythonWithBandit/api + args: sh -c "chown -R root:root /github/workspace && m . /securePythonWithBandit/api" env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} name: prod diff --git a/.mailmap b/.mailmap index 42fc78d..1028500 100644 --- a/.mailmap +++ b/.mailmap @@ -3,3 +3,4 @@ Daniel Salazar Daniel Salazar Daniel Salazar Github Octocat GitHub Jason Chavarria Jason Chavarria +Robin Quintero Robin Quintero diff --git a/api/env/main.nix b/api/env/main.nix index bac4668..7af43d9 100644 --- a/api/env/main.nix +++ b/api/env/main.nix @@ -1,5 +1,5 @@ -{makePythonPypiEnvironment, ...}: -makePythonPypiEnvironment { - name = "api-env"; - sourcesYaml = ./pypi-sources.yaml; +{makePythonEnvironment, ...}: +makePythonEnvironment { + pythonProjectDir = ./.; + pythonVersion = "3.11"; } diff --git a/api/env/poetry.lock b/api/env/poetry.lock new file mode 100644 index 0000000..65ca59d --- /dev/null +++ b/api/env/poetry.lock @@ -0,0 +1,203 @@ +# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. + +[[package]] +name = "anyio" +version = "4.2.0" +description = "High level compatibility layer for multiple asynchronous event loop implementations" +optional = false +python-versions = ">=3.8" +files = [ + {file = "anyio-4.2.0-py3-none-any.whl", hash = "sha256:745843b39e829e108e518c489b31dc757de7d2131d53fac32bd8df268227bfee"}, + {file = "anyio-4.2.0.tar.gz", hash = "sha256:e1875bb4b4e2de1669f4bc7869b6d3f54231cdced71605e6e64c9be77e3be50f"}, +] + +[package.dependencies] +idna = ">=2.8" +sniffio = ">=1.1" + +[package.extras] +doc = ["Sphinx (>=7)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] +test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"] +trio = ["trio (>=0.23)"] + +[[package]] +name = "click" +version = "8.1.7" +description = "Composable command line interface toolkit" +optional = false +python-versions = ">=3.7" +files = [ + {file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"}, + {file = "click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"}, +] + +[package.dependencies] +colorama = {version = "*", markers = "platform_system == \"Windows\""} + +[[package]] +name = "colorama" +version = "0.4.6" +description = "Cross-platform colored terminal text." +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +files = [ + {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, + {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, +] + +[[package]] +name = "fastapi" +version = "0.78.0" +description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" +optional = false +python-versions = ">=3.6.1" +files = [ + {file = "fastapi-0.78.0-py3-none-any.whl", hash = "sha256:15fcabd5c78c266fa7ae7d8de9b384bfc2375ee0503463a6febbe3bab69d6f65"}, + {file = "fastapi-0.78.0.tar.gz", hash = "sha256:3233d4a789ba018578658e2af1a4bb5e38bdd122ff722b313666a9b2c6786a83"}, +] + +[package.dependencies] +pydantic = ">=1.6.2,<1.7 || >1.7,<1.7.1 || >1.7.1,<1.7.2 || >1.7.2,<1.7.3 || >1.7.3,<1.8 || >1.8,<1.8.1 || >1.8.1,<2.0.0" +starlette = "0.19.1" + +[package.extras] +all = ["email_validator (>=1.1.1,<2.0.0)", "itsdangerous (>=1.1.0,<3.0.0)", "jinja2 (>=2.11.2,<4.0.0)", "orjson (>=3.2.1,<4.0.0)", "python-multipart (>=0.0.5,<0.0.6)", "pyyaml (>=5.3.1,<7.0.0)", "requests (>=2.24.0,<3.0.0)", "ujson (>=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0,<6.0.0)", "uvicorn[standard] (>=0.12.0,<0.18.0)"] +dev = ["autoflake (>=1.4.0,<2.0.0)", "flake8 (>=3.8.3,<4.0.0)", "passlib[bcrypt] (>=1.7.2,<2.0.0)", "pre-commit (>=2.17.0,<3.0.0)", "python-jose[cryptography] (>=3.3.0,<4.0.0)", "uvicorn[standard] (>=0.12.0,<0.18.0)"] +doc = ["mdx-include (>=1.4.1,<2.0.0)", "mkdocs (>=1.1.2,<2.0.0)", "mkdocs-markdownextradata-plugin (>=0.1.7,<0.3.0)", "mkdocs-material (>=8.1.4,<9.0.0)", "pyyaml (>=5.3.1,<7.0.0)", "typer (>=0.4.1,<0.5.0)"] +test = ["anyio[trio] (>=3.2.1,<4.0.0)", "black (==22.3.0)", "databases[sqlite] (>=0.3.2,<0.6.0)", "email_validator (>=1.1.1,<2.0.0)", "flake8 (>=3.8.3,<4.0.0)", "flask (>=1.1.2,<3.0.0)", "httpx (>=0.14.0,<0.19.0)", "isort (>=5.0.6,<6.0.0)", "mypy (==0.910)", "orjson (>=3.2.1,<4.0.0)", "peewee (>=3.13.3,<4.0.0)", "pytest (>=6.2.4,<7.0.0)", "pytest-cov (>=2.12.0,<4.0.0)", "python-multipart (>=0.0.5,<0.0.6)", "requests (>=2.24.0,<3.0.0)", "sqlalchemy (>=1.3.18,<1.5.0)", "types-dataclasses (==0.6.5)", "types-orjson (==3.6.2)", "types-ujson (==4.2.1)", "ujson (>=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0,<6.0.0)"] + +[[package]] +name = "h11" +version = "0.14.0" +description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" +optional = false +python-versions = ">=3.7" +files = [ + {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"}, + {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, +] + +[[package]] +name = "idna" +version = "3.6" +description = "Internationalized Domain Names in Applications (IDNA)" +optional = false +python-versions = ">=3.5" +files = [ + {file = "idna-3.6-py3-none-any.whl", hash = "sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f"}, + {file = "idna-3.6.tar.gz", hash = "sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca"}, +] + +[[package]] +name = "pydantic" +version = "1.10.14" +description = "Data validation and settings management using python type hints" +optional = false +python-versions = ">=3.7" +files = [ + {file = "pydantic-1.10.14-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7f4fcec873f90537c382840f330b90f4715eebc2bc9925f04cb92de593eae054"}, + {file = "pydantic-1.10.14-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8e3a76f571970fcd3c43ad982daf936ae39b3e90b8a2e96c04113a369869dc87"}, + {file = "pydantic-1.10.14-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:82d886bd3c3fbeaa963692ef6b643159ccb4b4cefaf7ff1617720cbead04fd1d"}, + {file = "pydantic-1.10.14-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:798a3d05ee3b71967844a1164fd5bdb8c22c6d674f26274e78b9f29d81770c4e"}, + {file = "pydantic-1.10.14-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:23d47a4b57a38e8652bcab15a658fdb13c785b9ce217cc3a729504ab4e1d6bc9"}, + {file = "pydantic-1.10.14-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:f9f674b5c3bebc2eba401de64f29948ae1e646ba2735f884d1594c5f675d6f2a"}, + {file = "pydantic-1.10.14-cp310-cp310-win_amd64.whl", hash = "sha256:24a7679fab2e0eeedb5a8924fc4a694b3bcaac7d305aeeac72dd7d4e05ecbebf"}, + {file = "pydantic-1.10.14-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:9d578ac4bf7fdf10ce14caba6f734c178379bd35c486c6deb6f49006e1ba78a7"}, + {file = "pydantic-1.10.14-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:fa7790e94c60f809c95602a26d906eba01a0abee9cc24150e4ce2189352deb1b"}, + {file = "pydantic-1.10.14-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aad4e10efa5474ed1a611b6d7f0d130f4aafadceb73c11d9e72823e8f508e663"}, + {file = "pydantic-1.10.14-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1245f4f61f467cb3dfeced2b119afef3db386aec3d24a22a1de08c65038b255f"}, + {file = "pydantic-1.10.14-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:21efacc678a11114c765eb52ec0db62edffa89e9a562a94cbf8fa10b5db5c046"}, + {file = "pydantic-1.10.14-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:412ab4a3f6dbd2bf18aefa9f79c7cca23744846b31f1d6555c2ee2b05a2e14ca"}, + {file = "pydantic-1.10.14-cp311-cp311-win_amd64.whl", hash = "sha256:e897c9f35281f7889873a3e6d6b69aa1447ceb024e8495a5f0d02ecd17742a7f"}, + {file = "pydantic-1.10.14-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:d604be0f0b44d473e54fdcb12302495fe0467c56509a2f80483476f3ba92b33c"}, + {file = "pydantic-1.10.14-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a42c7d17706911199798d4c464b352e640cab4351efe69c2267823d619a937e5"}, + {file = "pydantic-1.10.14-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:596f12a1085e38dbda5cbb874d0973303e34227b400b6414782bf205cc14940c"}, + {file = "pydantic-1.10.14-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:bfb113860e9288d0886e3b9e49d9cf4a9d48b441f52ded7d96db7819028514cc"}, + {file = "pydantic-1.10.14-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:bc3ed06ab13660b565eed80887fcfbc0070f0aa0691fbb351657041d3e874efe"}, + {file = "pydantic-1.10.14-cp37-cp37m-win_amd64.whl", hash = "sha256:ad8c2bc677ae5f6dbd3cf92f2c7dc613507eafe8f71719727cbc0a7dec9a8c01"}, + {file = "pydantic-1.10.14-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:c37c28449752bb1f47975d22ef2882d70513c546f8f37201e0fec3a97b816eee"}, + {file = "pydantic-1.10.14-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:49a46a0994dd551ec051986806122767cf144b9702e31d47f6d493c336462597"}, + {file = "pydantic-1.10.14-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:53e3819bd20a42470d6dd0fe7fc1c121c92247bca104ce608e609b59bc7a77ee"}, + {file = "pydantic-1.10.14-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0fbb503bbbbab0c588ed3cd21975a1d0d4163b87e360fec17a792f7d8c4ff29f"}, + {file = "pydantic-1.10.14-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:336709883c15c050b9c55a63d6c7ff09be883dbc17805d2b063395dd9d9d0022"}, + {file = "pydantic-1.10.14-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:4ae57b4d8e3312d486e2498d42aed3ece7b51848336964e43abbf9671584e67f"}, + {file = "pydantic-1.10.14-cp38-cp38-win_amd64.whl", hash = "sha256:dba49d52500c35cfec0b28aa8b3ea5c37c9df183ffc7210b10ff2a415c125c4a"}, + {file = "pydantic-1.10.14-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c66609e138c31cba607d8e2a7b6a5dc38979a06c900815495b2d90ce6ded35b4"}, + {file = "pydantic-1.10.14-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:d986e115e0b39604b9eee3507987368ff8148222da213cd38c359f6f57b3b347"}, + {file = "pydantic-1.10.14-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:646b2b12df4295b4c3148850c85bff29ef6d0d9621a8d091e98094871a62e5c7"}, + {file = "pydantic-1.10.14-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:282613a5969c47c83a8710cc8bfd1e70c9223feb76566f74683af889faadc0ea"}, + {file = "pydantic-1.10.14-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:466669501d08ad8eb3c4fecd991c5e793c4e0bbd62299d05111d4f827cded64f"}, + {file = "pydantic-1.10.14-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:13e86a19dca96373dcf3190fcb8797d40a6f12f154a244a8d1e8e03b8f280593"}, + {file = "pydantic-1.10.14-cp39-cp39-win_amd64.whl", hash = "sha256:08b6ec0917c30861e3fe71a93be1648a2aa4f62f866142ba21670b24444d7fd8"}, + {file = "pydantic-1.10.14-py3-none-any.whl", hash = "sha256:8ee853cd12ac2ddbf0ecbac1c289f95882b2d4482258048079d13be700aa114c"}, + {file = "pydantic-1.10.14.tar.gz", hash = "sha256:46f17b832fe27de7850896f3afee50ea682220dd218f7e9c88d436788419dca6"}, +] + +[package.dependencies] +typing-extensions = ">=4.2.0" + +[package.extras] +dotenv = ["python-dotenv (>=0.10.4)"] +email = ["email-validator (>=1.0.3)"] + +[[package]] +name = "sniffio" +version = "1.3.0" +description = "Sniff out which async library your code is running under" +optional = false +python-versions = ">=3.7" +files = [ + {file = "sniffio-1.3.0-py3-none-any.whl", hash = "sha256:eecefdce1e5bbfb7ad2eeaabf7c1eeb404d7757c379bd1f7e5cce9d8bf425384"}, + {file = "sniffio-1.3.0.tar.gz", hash = "sha256:e60305c5e5d314f5389259b7f22aaa33d8f7dee49763119234af3755c55b9101"}, +] + +[[package]] +name = "starlette" +version = "0.19.1" +description = "The little ASGI library that shines." +optional = false +python-versions = ">=3.6" +files = [ + {file = "starlette-0.19.1-py3-none-any.whl", hash = "sha256:5a60c5c2d051f3a8eb546136aa0c9399773a689595e099e0877704d5888279bf"}, + {file = "starlette-0.19.1.tar.gz", hash = "sha256:c6d21096774ecb9639acad41b86b7706e52ba3bf1dc13ea4ed9ad593d47e24c7"}, +] + +[package.dependencies] +anyio = ">=3.4.0,<5" + +[package.extras] +full = ["itsdangerous", "jinja2", "python-multipart", "pyyaml", "requests"] + +[[package]] +name = "typing-extensions" +version = "4.9.0" +description = "Backported and Experimental Type Hints for Python 3.8+" +optional = false +python-versions = ">=3.8" +files = [ + {file = "typing_extensions-4.9.0-py3-none-any.whl", hash = "sha256:af72aea155e91adfc61c3ae9e0e342dbc0cba726d6cba4b6c72c1f34e47291cd"}, + {file = "typing_extensions-4.9.0.tar.gz", hash = "sha256:23478f88c37f27d76ac8aee6c905017a143b0b1b886c3c9f66bc2fd94f9f5783"}, +] + +[[package]] +name = "uvicorn" +version = "0.18.2" +description = "The lightning-fast ASGI server." +optional = false +python-versions = ">=3.7" +files = [ + {file = "uvicorn-0.18.2-py3-none-any.whl", hash = "sha256:c19a057deb1c5bb060946e2e5c262fc01590c6529c0af2c3d9ce941e89bc30e0"}, + {file = "uvicorn-0.18.2.tar.gz", hash = "sha256:cade07c403c397f9fe275492a48c1b869efd175d5d8a692df649e6e7e2ed8f4e"}, +] + +[package.dependencies] +click = ">=7.0" +h11 = ">=0.8" + +[package.extras] +standard = ["PyYAML (>=5.1)", "colorama (>=0.4)", "httptools (>=0.4.0)", "python-dotenv (>=0.13)", "uvloop (>=0.14.0,!=0.15.0,!=0.15.1)", "watchfiles (>=0.13)", "websockets (>=10.0)"] + +[metadata] +lock-version = "2.0" +python-versions = "^3.11" +content-hash = "c5620dab533409e2f6c6e60a4fc81a32f17b74d87193b5594e5989cd1689e178" diff --git a/api/env/pypi-deps.yaml b/api/env/pypi-deps.yaml deleted file mode 100644 index d8c8f4f..0000000 --- a/api/env/pypi-deps.yaml +++ /dev/null @@ -1,2 +0,0 @@ -fastapi: 0.78.0 -uvicorn: 0.18.2 diff --git a/api/env/pypi-sources.yaml b/api/env/pypi-sources.yaml deleted file mode 100644 index 3f97167..0000000 --- a/api/env/pypi-sources.yaml +++ /dev/null @@ -1,98 +0,0 @@ -closure: - anyio: 3.6.1 - click: 8.1.3 - colorama: 0.4.5 - fastapi: 0.78.0 - h11: 0.13.0 - idna: '3.3' - pydantic: 1.9.1 - sniffio: 1.2.0 - starlette: 0.19.1 - typing-extensions: 4.3.0 - uvicorn: 0.18.2 -links: - - name: anyio-3.6.1-py3-none-any.whl - sha256: 1gm7r70cdmyh8i9rjz9d619nji0k2xchk8w7iyd6ll100v3vjafb - url: https://files.pythonhosted.org/packages/c3/22/4cba7e1b4f45ffbefd2ca817a6800ba1c671c26f288d7705f20289872012/anyio-3.6.1-py3-none-any.whl - - name: anyio-3.6.1.tar.gz - sha256: 02yx5yczk50q133543salrjsg9ds8gpg69d9mr1f91iqz6axyfj1 - url: https://files.pythonhosted.org/packages/67/c4/fd50bbb2fb72532a4b778562e28ba581da15067cfb2537dbd3a2e64689c1/anyio-3.6.1.tar.gz - - name: click-8.1.3-py3-none-any.whl - sha256: 0j6vn6ayxq1bqs1v64r90sarg05hj6rxj4w29vs0k9hmrcrq2kdv - url: https://files.pythonhosted.org/packages/c2/f1/df59e28c642d583f7dacffb1e0965d0e00b218e0186d7858ac5233dce840/click-8.1.3-py3-none-any.whl - - name: click-8.1.3.tar.gz - sha256: 13kvp8visj5xh9d43brnda6q0kc1s40flxa5cw0p0a9hzf5dr0kn - url: https://files.pythonhosted.org/packages/59/87/84326af34517fca8c58418d148f2403df25303e02736832403587318e9e8/click-8.1.3.tar.gz - - name: colorama-0.4.5-py2.py3-none-any.whl - sha256: 1nlriqsqjsilvxg6pm3086z2xkjviplw3gz79a1gadryjd2g8jw5 - url: https://files.pythonhosted.org/packages/77/8b/7550e87b2d308a1b711725dfaddc19c695f8c5fa413c640b2be01662f4e6/colorama-0.4.5-py2.py3-none-any.whl - - name: colorama-0.4.5.tar.gz - sha256: 195pcxlhp4qz8pq496kvw6k7vdd056j8mffr76k8h2f59wrv9ip6 - url: https://files.pythonhosted.org/packages/2b/65/24d033a9325ce42ccbfa3ca2d0866c7e89cc68e5b9d92ecaba9feef631df/colorama-0.4.5.tar.gz - - name: fastapi-0.78.0-py3-none-any.whl - sha256: 0rbgknvbmqxvzsk66d2hw1g3ghmzhjryk3bxmskny9lcqzaspz0m - url: https://files.pythonhosted.org/packages/61/0f/427f0af121b226e62237e430f5bf4485e0ae1565b3f5b782613b59f30abc/fastapi-0.78.0-py3-none-any.whl - - name: fastapi-0.78.0.tar.gz - sha256: 10vag33b5ab66qqjnwpz4b8vsf2ypfjg2alfcmw8a0dsi6kx8crj - url: https://files.pythonhosted.org/packages/b7/2a/4676736c3b1864ca483265db43cad9710b83a95c2530aa6bfe671b83fd46/fastapi-0.78.0.tar.gz - - name: h11-0.13.0-py3-none-any.whl - sha256: 0hklkqvhmrvcnkzvwa0qjdwkqzgj1bn43kf88r9sag337db7ipcd - url: https://files.pythonhosted.org/packages/19/d2/32a15a4955be1b8114a1c570999eefd31279c7f9aa2d2a43d492a79b53c5/h11-0.13.0-py3-none-any.whl - - name: h11-0.13.0.tar.gz - sha256: 01pzawwhr537ypm966hli0hspzw104d0xk1q9n528yh86l8kr0bh - url: https://files.pythonhosted.org/packages/fa/a6/450568b2d62dd633be53f69890332bb0ce78183ffbe1e514c2b3102efff5/h11-0.13.0.tar.gz - - name: idna-3.3-py3-none-any.whl - sha256: 1zrm4xnjas13byafi11ma2q8h5rr1fmjwvi41xp5k07sgw2dvnc4 - url: https://files.pythonhosted.org/packages/04/a2/d918dcd22354d8958fe113e1a3630137e0fc8b44859ade3063982eacd2a4/idna-3.3-py3-none-any.whl - - name: idna-3.3.tar.gz - sha256: 0v8f6qjfi5i7qc5icsbv2pi24qy6k6m8wjqjvdf2sxjvlpq3yr4x - url: https://files.pythonhosted.org/packages/62/08/e3fc7c8161090f742f504f40b1bccbfc544d4a4e09eb774bf40aafce5436/idna-3.3.tar.gz - - name: pydantic-1.9.1-cp39-cp39-macosx_10_9_x86_64.whl - sha256: 1mnhv3209vh1r2gvb20kraka7bkibs37dvafkncgl7f9bf1a6fxq - url: https://files.pythonhosted.org/packages/9a/a2/585b1a747b7bbb22392fe9c875b8adfaaee9a7be506fbb66a749157f9099/pydantic-1.9.1-cp39-cp39-macosx_10_9_x86_64.whl - - name: pydantic-1.9.1-cp39-cp39-macosx_11_0_arm64.whl - sha256: 047q054nc1aiqsjv1mcnl7l26i61zk98hrm40jfxi302mp5zxn0x - url: https://files.pythonhosted.org/packages/ed/30/cc6081090e0653b8bfeac45b5973027771050813c4ac167a277f4f355242/pydantic-1.9.1-cp39-cp39-macosx_11_0_arm64.whl - - name: pydantic-1.9.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl - sha256: 07q9g85iv1y1d757pnhnhshrmb0nk6755nzl7wd732r6hxqgvvh2 - url: https://files.pythonhosted.org/packages/5f/76/11635fe2d808c0062f4f23a6ac6453e6110d3446fb196e3b6dfc1d15f979/pydantic-1.9.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl - - name: pydantic-1.9.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl - sha256: 1vmc5583gyywcbjk6sfsmmcwa2nqjcw3gwiarjvc1fi916lppdby - url: https://files.pythonhosted.org/packages/c4/d2/6118efdb9fdaf3d4dfecc0276d4d47a1ef9aaf9903fa49f1ece765d917cb/pydantic-1.9.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl - - name: pydantic-1.9.1-cp39-cp39-musllinux_1_1_i686.whl - sha256: 0q871774ah6jg9iay6jmq612d00jjvpdc0rvxi5k8v7lj6gaxsac - url: https://files.pythonhosted.org/packages/81/48/b3c8cb4eb7106b612bbfc263d557b75e27d2720a0cf2c442ea67950d6d43/pydantic-1.9.1-cp39-cp39-musllinux_1_1_i686.whl - - name: pydantic-1.9.1-cp39-cp39-musllinux_1_1_x86_64.whl - sha256: 1z81nxcsxicspzx0frsjxm9akvnrhdvc642cq1zvk6hcpwcb7k3j - url: https://files.pythonhosted.org/packages/2e/6b/7ae3031fc86b974296ef3a91221aec46fdf66a8dd6ba1d300151a812c5b3/pydantic-1.9.1-cp39-cp39-musllinux_1_1_x86_64.whl - - name: pydantic-1.9.1-py3-none-any.whl - sha256: 0n5xyfb37s6g511fhpfw9bl6qr2lknf5cbzysbfskgs27kqw1229 - url: https://files.pythonhosted.org/packages/f3/88/78666bfe38d3a8aee75fbd2410ac6e26dfdd64585323c07648f387817c76/pydantic-1.9.1-py3-none-any.whl - - name: pydantic-1.9.1.tar.gz - sha256: 06k9n0nkybg236hqk67gwam11lvshzma78ryikyzgzr9zz1qgn8y - url: https://files.pythonhosted.org/packages/d0/a5/e4a25a0becf35530a3d90459a88855743e942f2e502da49ca5b10aa78568/pydantic-1.9.1.tar.gz - - name: sniffio-1.2.0-py3-none-any.whl - sha256: 0qznm5f0zg3n6vnkwjm54968397ln8mpbqhclh92275cirlp26s7 - url: https://files.pythonhosted.org/packages/52/b0/7b2e028b63d092804b6794595871f936aafa5e9322dcaaad50ebf67445b3/sniffio-1.2.0-py3-none-any.whl - - name: sniffio-1.2.0.tar.gz - sha256: 1pnkvi6wvn4qd37y69n1ls6n8l63gfmn3pvb1jb50gqxxkn6wrn4 - url: https://files.pythonhosted.org/packages/a6/ae/44ed7978bcb1f6337a3e2bef19c941de750d73243fc9389140d62853b686/sniffio-1.2.0.tar.gz - - name: starlette-0.19.1-py3-none-any.whl - sha256: 1gvrha4da13phzh9kq4mjml3lxwrjc6aldk1akmsiwsis31caq2s - url: https://files.pythonhosted.org/packages/f1/9d/1fa96008b302dd3e398f89f3fc5afb19fb0b0f341fefa05c65b3a38d64cf/starlette-0.19.1-py3-none-any.whl - - name: starlette-0.19.1.tar.gz - sha256: 1ir4gva97mcsxnj3xh8xpyijpr86fxmvhhddmhwrdjsffyb11ln6 - url: https://files.pythonhosted.org/packages/2b/18/405f4fb59119b8efa203c10a04a32a927976b5450cf649c8b4c9d079d21e/starlette-0.19.1.tar.gz - - name: typing_extensions-4.3.0-py3-none-any.whl - sha256: 00napxpwhjn40q2hxh3z8rfpwvg0n5mdvp4ylid0m4j9c2ajqr15 - url: https://files.pythonhosted.org/packages/ed/d6/2afc375a8d55b8be879d6b4986d4f69f01115e795e36827fd3a40166028b/typing_extensions-4.3.0-py3-none-any.whl - - name: typing_extensions-4.3.0.tar.gz - sha256: 19n4l57qazwrbvxjrbxw2vvfyd0zbk8ivnwm4zmwfzzl69x6glp6 - url: https://files.pythonhosted.org/packages/9e/1d/d128169ff58c501059330f1ad96ed62b79114a2eb30b8238af63a2e27f70/typing_extensions-4.3.0.tar.gz - - name: uvicorn-0.18.2-py3-none-any.whl - sha256: 1q1hpj4ix56fv71z42lwab3905f05wk5qbkfjihb0nqwxdyhb6n1 - url: https://files.pythonhosted.org/packages/12/d0/d998e0b558fd5808a4fdb48e906e6f57a4fda2177fa11ba2a9d16248ce92/uvicorn-0.18.2-py3-none-any.whl - - name: uvicorn-0.18.2.tar.gz - sha256: 0klgxpifgrj9yqnnk2jxblbzv7l63f6a94jl4zzgk5y30g20gpna - url: https://files.pythonhosted.org/packages/c1/ec/23abd850aa173e35b0436f46a3385585b131ee0e70a55c408d89cade30a1/uvicorn-0.18.2.tar.gz -python: '3.9' diff --git a/api/env/pyproject.toml b/api/env/pyproject.toml new file mode 100644 index 0000000..125f34c --- /dev/null +++ b/api/env/pyproject.toml @@ -0,0 +1,15 @@ +[tool.poetry] +name = "api-env" +version = "0.1.0" +description = "" +authors = ["Your Name "] +readme = "README.md" + +[tool.poetry.dependencies] +python = "^3.11" +fastapi = "0.78.0" +uvicorn = "0.18.2" + +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" diff --git a/api/main.nix b/api/main.nix index ccd8e43..c5a9711 100644 --- a/api/main.nix +++ b/api/main.nix @@ -10,9 +10,6 @@ makeScript { __argApiSrc__ = projectPath "/api/src"; }; name = "api"; - searchPaths = { - bin = [inputs.nixpkgs.python39]; - source = [outputs."/api/env"]; - }; + searchPaths.source = [outputs."/api/env"]; entrypoint = ./entrypoint.sh; } diff --git a/api/makes.nix b/api/makes.nix index cb62b44..6025b80 100644 --- a/api/makes.nix +++ b/api/makes.nix @@ -1,9 +1,14 @@ -{outputs, ...}: { +{ + inputs, + outputs, + makePythonPyprojectPackage, + projectPath, + ... +}: { lintPython = { modules = { api = { searchPaths.source = [outputs."/api/env"]; - python = "3.9"; src = "/api/src"; }; }; @@ -12,9 +17,6 @@ api = ["/api/src"]; }; securePythonWithBandit = { - api = { - python = "3.9"; - target = "/api/src"; - }; + api.target = "/api/src"; }; } diff --git a/makes.nix b/makes.nix index 189870e..42c2d21 100644 --- a/makes.nix +++ b/makes.nix @@ -40,8 +40,8 @@ ]; inputs = { nixpkgs = fetchNixpkgs { - rev = "f88fc7a04249cf230377dd11e04bf125d45e9abe"; - sha256 = "1dkwcsgwyi76s1dqbrxll83a232h9ljwn4cps88w9fam68rf8qv3"; + rev = "32c00dc37042934c79041116383e27f04ad84710"; + sha256 = "sha256-Pe7Wjyzzj+tyxvxlP4JXY1z/vkxIE9i2G4F25+Y0zR0="; }; }; lintBash = {