From 38177b64a9c83d210d3dd41c211f8c1796edc695 Mon Sep 17 00:00:00 2001 From: Thomas Sundvoll Date: Mon, 3 Jun 2024 21:59:21 +0200 Subject: [PATCH] Add requirements.txt with instructions in README for how to generate it using pip-compile --- README.md | 17 +++- pyproject.toml | 1 + requirements.txt | 244 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 261 insertions(+), 1 deletion(-) create mode 100644 requirements.txt diff --git a/README.md b/README.md index 87c43607..d949657e 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ pre-commit uninstall ### Robot integration To connect the state machine to a robot in a separate repository, it is required that the separate repository implements -the [robot interface](https://github.com/equinor/isar/blob/main/src/robot_interface/robot_interface.py). +the [robot interface](https://github.com/equinor/isar/blob/main/src/robot_interface/robot_interface.py). The separate repository should also have a settings.env file in a config folder where `CAPABILITIES` and `ROBOT_MODEL` are set. A mocked robot can be found in [this repository](https://github.com/equinor/isar-robot). Install the repo, i.e: @@ -364,6 +364,7 @@ If not specified the password will default to an empty string. ## Running several ISAR instances locally To run several ISAR instances in parallel locally: + 1. Generate a guid: https://www.guidgenerator.com/ 2. Open a new terminal in the isar folder 3. Run the following command before running main.py: @@ -372,6 +373,20 @@ To run several ISAR instances in parallel locally: export ISAR_API_PORT=port_name_higher_than_1024 ISAR_ISAR_ID=guid ISAR_ROBOT_NAME=random_robot_name ``` +# Dependencies + +The dependencies used for this package are listed in `pyproject.toml` and pinned in `requirements.txt`. This ensures our builds are predictable and deterministic. This project uses `pip-compile` (from [`pip-tools`](https://github.com/jazzband/pip-tools)) for this: + +``` +pip-compile --output-file=requirements.txt pyproject.toml +``` + +To update the requirements to the latest versions, run the same command with the `--upgrade` flag: + +``` +pip-compile --output-file=requirements.txt pyproject.toml --upgrade +``` + # Contributions Equinor welcomes all kinds of contributions, including code, bug reports, issues, feature requests, and documentation diff --git a/pyproject.toml b/pyproject.toml index b0667fb3..37334f85 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,6 +58,7 @@ dev = [ "flake8", "mypy", "myst-parser", + "pip-tools", "pre-commit", "pytest-dotenv", "pytest-mock", diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..4b44653c --- /dev/null +++ b/requirements.txt @@ -0,0 +1,244 @@ +# +# This file is autogenerated by pip-compile with Python 3.12 +# by the following command: +# +# pip-compile --output-file=requirements.txt pyproject.toml +# +alitra==1.1.3 + # via isar (pyproject.toml) +annotated-types==0.7.0 + # via pydantic +anyio==4.4.0 + # via + # httpx + # starlette + # watchfiles +azure-core==1.30.1 + # via + # azure-identity + # azure-keyvault-secrets + # azure-storage-blob + # opencensus-ext-azure +azure-identity==1.16.0 + # via + # isar (pyproject.toml) + # opencensus-ext-azure +azure-keyvault-secrets==4.8.0 + # via isar (pyproject.toml) +azure-storage-blob==12.20.0 + # via isar (pyproject.toml) +backoff==2.2.1 + # via isar (pyproject.toml) +cachetools==5.3.3 + # via google-auth +certifi==2024.6.2 + # via + # httpcore + # httpx + # requests +cffi==1.16.0 + # via cryptography +charset-normalizer==3.3.2 + # via requests +click==8.1.7 + # via + # isar (pyproject.toml) + # typer + # uvicorn +cryptography==42.0.7 + # via + # azure-identity + # azure-storage-blob + # fastapi-azure-auth + # msal + # pyjwt +dacite==1.8.1 + # via + # alitra + # isar (pyproject.toml) +dnspython==2.6.1 + # via email-validator +email-validator==2.1.1 + # via fastapi +fastapi==0.111.0 + # via + # fastapi-azure-auth + # isar (pyproject.toml) +fastapi-azure-auth==4.4.0 + # via isar (pyproject.toml) +fastapi-cli==0.0.4 + # via fastapi +google-api-core==2.19.0 + # via opencensus +google-auth==2.29.0 + # via google-api-core +googleapis-common-protos==1.63.1 + # via google-api-core +h11==0.14.0 + # via + # httpcore + # uvicorn +httpcore==1.0.5 + # via httpx +httptools==0.6.1 + # via uvicorn +httpx==0.27.0 + # via + # fastapi + # fastapi-azure-auth +idna==3.7 + # via + # anyio + # email-validator + # httpx + # requests +injector==0.21.0 + # via isar (pyproject.toml) +isodate==0.6.1 + # via + # azure-keyvault-secrets + # azure-storage-blob +jinja2==3.1.4 + # via fastapi +markdown-it-py==3.0.0 + # via rich +markupsafe==2.1.5 + # via jinja2 +mdurl==0.1.2 + # via markdown-it-py +msal==1.28.0 + # via + # azure-identity + # msal-extensions +msal-extensions==1.1.0 + # via azure-identity +numpy==1.26.4 + # via + # alitra + # isar (pyproject.toml) + # scipy +opencensus==0.11.4 + # via + # opencensus-ext-azure + # opencensus-ext-logging + # opencensus-ext-requests +opencensus-context==0.1.3 + # via opencensus +opencensus-ext-azure==1.1.13 + # via isar (pyproject.toml) +opencensus-ext-logging==0.1.1 + # via isar (pyproject.toml) +opencensus-ext-requests==0.8.0 + # via isar (pyproject.toml) +orjson==3.10.3 + # via fastapi +packaging==24.0 + # via msal-extensions +paho-mqtt==2.1.0 + # via isar (pyproject.toml) +portalocker==2.8.2 + # via msal-extensions +proto-plus==1.23.0 + # via google-api-core +protobuf==4.25.3 + # via + # google-api-core + # googleapis-common-protos + # proto-plus +psutil==5.9.8 + # via opencensus-ext-azure +pyasn1==0.6.0 + # via + # pyasn1-modules + # rsa +pyasn1-modules==0.4.0 + # via google-auth +pycparser==2.22 + # via cffi +pydantic==2.7.3 + # via + # fastapi + # isar (pyproject.toml) + # pydantic-settings +pydantic-core==2.18.4 + # via pydantic +pydantic-settings==2.3.0 + # via isar (pyproject.toml) +pygments==2.18.0 + # via rich +pyjwt[crypto]==2.8.0 + # via + # fastapi-azure-auth + # isar (pyproject.toml) + # msal +python-dotenv==1.0.1 + # via + # isar (pyproject.toml) + # pydantic-settings + # uvicorn +python-multipart==0.0.9 + # via fastapi +pyyaml==6.0.1 + # via + # isar (pyproject.toml) + # uvicorn +requests==2.32.3 + # via + # azure-core + # google-api-core + # isar (pyproject.toml) + # msal + # opencensus-ext-azure + # opencensus-ext-requests + # requests-toolbelt +requests-toolbelt==1.0.0 + # via isar (pyproject.toml) +rich==13.7.1 + # via typer +rsa==4.9 + # via google-auth +scipy==1.13.1 + # via alitra +shellingham==1.5.4 + # via typer +six==1.16.0 + # via + # azure-core + # isodate + # opencensus + # transitions +sniffio==1.3.1 + # via + # anyio + # httpx +starlette==0.37.2 + # via fastapi +transitions==0.9.1 + # via isar (pyproject.toml) +typer==0.12.3 + # via fastapi-cli +typing-extensions==4.12.1 + # via + # azure-core + # azure-keyvault-secrets + # azure-storage-blob + # fastapi + # pydantic + # pydantic-core + # typer +ujson==5.10.0 + # via fastapi +urllib3==2.2.1 + # via requests +uvicorn[standard]==0.30.1 + # via + # fastapi + # isar (pyproject.toml) +uvloop==0.19.0 + # via uvicorn +watchfiles==0.22.0 + # via uvicorn +websockets==12.0 + # via uvicorn +wrapt==1.16.0 + # via opencensus-ext-requests