diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0bb0e56..6d8acef 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,6 +15,8 @@ jobs: with: # Turn prevent once policy is verified # prevent: true + client-id: ${{ secrets.CIMON_CLIENT_ID }} + secret: ${{ secrets.CIMON_SECRET }} fail-on-error: true - name: Checkout @@ -38,6 +40,8 @@ jobs: with: # Turn prevent once policy is verified # prevent: true + client-id: ${{ secrets.CIMON_CLIENT_ID }} + secret: ${{ secrets.CIMON_SECRET }} fail-on-error: true - name: Checkout diff --git a/.github/workflows/test_pr.yml b/.github/workflows/test_pr.yml index 1d116df..e1fb831 100644 --- a/.github/workflows/test_pr.yml +++ b/.github/workflows/test_pr.yml @@ -13,6 +13,8 @@ jobs: - uses: cycodelabs/cimon-action@v0 with: prevent: true + client-id: ${{ secrets.CIMON_CLIENT_ID }} + secret: ${{ secrets.CIMON_SECRET }} fail-on-error: true allowed-hosts: > files.pythonhosted.org @@ -36,7 +38,12 @@ jobs: with: # Turn prevent once cimon docker compose bug is fixed # prevent: true + client-id: ${{ secrets.CIMON_CLIENT_ID }} + secret: ${{ secrets.CIMON_SECRET }} fail-on-error: true + allowed-hosts: > + auth.docker.io + pypi.org - name: Checkout uses: actions/checkout@v4 @@ -61,7 +68,13 @@ jobs: with: # Turn prevent once cimon docker compose bug is fixed # prevent: true + client-id: ${{ secrets.CIMON_CLIENT_ID }} + secret: ${{ secrets.CIMON_SECRET }} fail-on-error: true + allowed-hosts: > + raw.githubusercontent.com + files.pythonhosted.org + pypi.org - name: Checkout uses: actions/checkout@v4 @@ -72,7 +85,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Build Package - run: python -m pip install . + run: python -m pip install -r dev-requirements.txt . - name: Setup environment run: make setup diff --git a/deployment/docker-compose.yml b/deployment/docker-compose.yml index 8bbdcf0..e60c6cd 100644 --- a/deployment/docker-compose.yml +++ b/deployment/docker-compose.yml @@ -2,7 +2,7 @@ version: "3" services: neo4j: - image: neo4j:5.12 + image: neo4j:5.26.2 container_name: raven-neo4j environment: NEO4J_AUTH: neo4j/123456789 # Change 'password' to your desired Neo4j password @@ -18,7 +18,7 @@ services: - raven-neo4j:/data redis: - image: redis:7.2.1 + image: redis:7.4.2 container_name: raven-redis depends_on: neo4j: diff --git a/deployment/test.docker-compose.yml b/deployment/test.docker-compose.yml index 53bbf64..8ad26ee 100644 --- a/deployment/test.docker-compose.yml +++ b/deployment/test.docker-compose.yml @@ -2,7 +2,7 @@ version: "3" services: neo4j-test: - image: neo4j:5.12 + image: neo4j:5.26.2 container_name: raven-neo4j-test environment: NEO4J_AUTH: neo4j/123456789 # Change 'password' to your desired Neo4j password @@ -16,7 +16,7 @@ services: retries: 3 redis-test: - image: redis:7.2.1 + image: redis:7.4.2 container_name: raven-redis-test ports: - "6379:6379" diff --git a/deployment/test.dockerfile b/deployment/test.dockerfile index bb1e469..a9c606d 100644 --- a/deployment/test.dockerfile +++ b/deployment/test.dockerfile @@ -1,4 +1,4 @@ -FROM python:3.9.18 +FROM python:3.9.21 # Set the working directory RUN mkdir -p /raven @@ -7,13 +7,13 @@ RUN mkdir -p /raven/tests # Copy the current directory contents into the container at /raven WORKDIR /raven -COPY Makefile requirements.txt /raven/ +COPY Makefile dev-requirements.txt /raven/ COPY src /raven/src COPY library /raven/library COPY tests /raven/tests # Install any needed packages specified in requirements.txt -RUN pip3 install -r requirements.txt +RUN pip3 install -r dev-requirements.txt # Run RAVEN tests CMD ["make", "test-run"] \ No newline at end of file diff --git a/dev-requirements.in b/dev-requirements.in new file mode 100644 index 0000000..d9cb060 --- /dev/null +++ b/dev-requirements.in @@ -0,0 +1,2 @@ +-r requirements.in +pytest \ No newline at end of file diff --git a/dev-requirements.txt b/dev-requirements.txt new file mode 100644 index 0000000..8b63680 --- /dev/null +++ b/dev-requirements.txt @@ -0,0 +1,60 @@ +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile --output-file=dev-requirements.txt dev-requirements.in +# +certifi==2025.1.31 + # via + # py2neo + # requests +charset-normalizer==3.4.1 + # via requests +colorama==0.4.6 + # via -r /Users/elad.pticha/Documents/GitHub/Raven/requirements.in +idna==3.10 + # via requests +iniconfig==2.0.0 + # via pytest +interchange==2021.0.4 + # via py2neo +loguru==0.7.3 + # via -r /Users/elad.pticha/Documents/GitHub/Raven/requirements.in +monotonic==1.6 + # via py2neo +packaging==24.2 + # via + # py2neo + # pytest +pansi==2024.11.0 + # via py2neo +pillow==11.1.0 + # via pansi +pluggy==1.5.0 + # via pytest +py2neo==2021.2.4 + # via -r /Users/elad.pticha/Documents/GitHub/Raven/requirements.in +pygments==2.19.1 + # via py2neo +pytest==8.3.4 + # via -r dev-requirements.in +pytz==2025.1 + # via interchange +pyyaml==6.0.2 + # via -r /Users/elad.pticha/Documents/GitHub/Raven/requirements.in +redis==5.2.1 + # via -r /Users/elad.pticha/Documents/GitHub/Raven/requirements.in +requests==2.32.3 + # via -r /Users/elad.pticha/Documents/GitHub/Raven/requirements.in +six==1.17.0 + # via + # interchange + # py2neo +slack-sdk==3.34.0 + # via -r /Users/elad.pticha/Documents/GitHub/Raven/requirements.in +tqdm==4.67.1 + # via -r /Users/elad.pticha/Documents/GitHub/Raven/requirements.in +urllib3==2.3.0 + # via + # py2neo + # requests diff --git a/requirements.in b/requirements.in new file mode 100644 index 0000000..1c44f01 --- /dev/null +++ b/requirements.in @@ -0,0 +1,8 @@ +colorama +loguru +py2neo +PyYAML +redis +requests +slack_sdk +tqdm \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index ef6279f..6cf84e3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,23 +1,52 @@ -certifi==2024.07.04 -charset-normalizer==3.3.2 +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile +# +certifi==2025.1.31 + # via + # py2neo + # requests +charset-normalizer==3.4.1 + # via requests colorama==0.4.6 -idna==3.7 -iniconfig==2.0.0 + # via -r requirements.in +idna==3.10 + # via requests interchange==2021.0.4 -loguru==0.7.2 + # via py2neo +loguru==0.7.3 + # via -r requirements.in monotonic==1.6 -packaging==24.1 -pansi==2020.7.3 -pip-upgrade==0.0.6 -pluggy==1.5.0 + # via py2neo +packaging==24.2 + # via py2neo +pansi==2024.11.0 + # via py2neo +pillow==11.1.0 + # via pansi py2neo==2021.2.4 -Pygments==2.18.0 -pytest==8.2.2 -pytz==2024.1 -PyYAML==6.0.1 -redis==5.0.6 + # via -r requirements.in +pygments==2.19.1 + # via py2neo +pytz==2025.1 + # via interchange +pyyaml==6.0.2 + # via -r requirements.in +redis==5.2.1 + # via -r requirements.in requests==2.32.3 -six==1.16.0 -slack_sdk==3.29.0 -tqdm==4.66.4 -urllib3==2.2.2 + # via -r requirements.in +six==1.17.0 + # via + # interchange + # py2neo +slack-sdk==3.34.0 + # via -r requirements.in +tqdm==4.67.1 + # via -r requirements.in +urllib3==2.3.0 + # via + # py2neo + # requests diff --git a/src/workflow_components/parsing_utils.py b/src/workflow_components/parsing_utils.py index 2c340de..f1b1f1f 100644 --- a/src/workflow_components/parsing_utils.py +++ b/src/workflow_components/parsing_utils.py @@ -2,7 +2,7 @@ def parse_workflow_trigger( - trigger_obj: Union[str, List[str], Dict[str, Any]] + trigger_obj: Union[str, List[str], Dict[str, Any]], ) -> List[str]: """Parse and normalize the trigger field of a workflow. Returns list of triggers. @@ -37,7 +37,7 @@ def parse_workflow_trigger( def parse_job_machine( - runs_on_obj: Optional[Union[str, List[str], Dict[str, Any]]] + runs_on_obj: Optional[Union[str, List[str], Dict[str, Any]]], ) -> Optional[List[str]]: """Parse runs-on field of a job. Examples for input and output: