Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add requirements.txt #563

Merged
merged 2 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/compile_requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Compile Requirements

on:
push:
branches:
- main

schedule:
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows
# In a public repository, scheduled workflows are automatically disabled when no
# repository activity has occurred in 60 days
- cron: "5 6 * * 1-5" # At 06:05 on every day-of-week from Monday through Friday

jobs:
compile-requirements:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.deploy_key }}

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install pip-tools
run: |
python -m pip install --upgrade pip
pip install pip-tools

- name: Upgrade dependencies and compile requirements file
run: |
pip-compile --output-file=requirements.txt pyproject.toml --upgrade

- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
commit-message: "GHA: Update dependencies"
title: Update dependencies
body: |
- Dependency updates

Auto-generated by [create-pull-request][1]

[1]: https://github.com/peter-evans/create-pull-request
branch: update-dependencies
labels: automated-pr
delete-branch: true
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ dev = [
"flake8",
"mypy",
"myst-parser",
"pip-tools",
"pre-commit",
"pytest-dotenv",
"pytest-mock",
Expand Down
244 changes: 244 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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