Skip to content

Commit df487f1

Browse files
authored
Merge branch 'main' into main
2 parents ff6c294 + cb2d870 commit df487f1

File tree

906 files changed

+111985
-6396
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

906 files changed

+111985
-6396
lines changed

.coveragerc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ omit =
1414
ads/common/analyzer.py
1515
ads/common/artifact/*
1616
ads/common/function/*
17-
ads/dataflow/*
1817
ads/dataset/dask_series.py
1918
ads/dataset/factory.py
2019
ads/environment/*
@@ -48,7 +47,6 @@ omit =
4847
ads/common/analyzer.py
4948
ads/common/artifact/*
5049
ads/common/function/*
51-
ads/dataflow/*
5250
ads/dataset/dask_series.py
5351
ads/dataset/factory.py
5452
ads/environment/*
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: "Add 3P License Warning to PR"
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- pyproject.toml
7+
8+
# Cancel in progress workflows on pull_requests.
9+
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
12+
cancel-in-progress: true
13+
14+
permissions:
15+
contents: read
16+
pull-requests: write
17+
18+
jobs:
19+
warning-message-3plicense:
20+
name: Add ⚠️ Warning about 3p license
21+
runs-on: ubuntu-latest
22+
if: ${{ success() }} && ${{ github.event.issue.pull_request }}
23+
steps:
24+
- run: |
25+
BODY_MSG=$(cat << EOF
26+
⚠️ This PR changed **pyproject.toml** file. ⚠️
27+
- PR Creator must update 📃 THIRD_PARTY_LICENSES.txt, if any 📚 library added/removed in **pyproject.toml**.
28+
- PR Approver must confirm 📃 THIRD_PARTY_LICENSES.txt updated, if any 📚 library added/removed in **pyproject.toml**.
29+
EOF
30+
)
31+
echo "BODY_MSG<<EOF" >> $GITHUB_ENV
32+
echo "$BODY_MSG" >> $GITHUB_ENV
33+
echo "EOF" >> $GITHUB_ENV
34+
- uses: actions/github-script@v6
35+
with:
36+
github-token: ${{ github.token }}
37+
script: |
38+
github.rest.issues.createComment({
39+
issue_number: context.issue.number,
40+
owner: context.repo.owner,
41+
repo: context.repo.repo,
42+
body: `${{ env.BODY_MSG }}`
43+
})

.github/workflows/codeql.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ jobs:
3838

3939
steps:
4040
- name: Checkout repository
41-
uses: actions/checkout@v3
41+
uses: actions/checkout@v4
4242

4343
# Initializes the CodeQL tools for scanning.
4444
- name: Initialize CodeQL
45-
uses: github/codeql-action/init@v2
45+
uses: github/codeql-action/init@v3
4646
with:
4747
languages: ${{ matrix.language }}
4848
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -56,7 +56,7 @@ jobs:
5656
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
5757
# If this step fails, then you should remove it and run the build manually (see below)
5858
- name: Autobuild
59-
uses: github/codeql-action/autobuild@v2
59+
uses: github/codeql-action/autobuild@v3
6060

6161
# ℹ️ Command-line programs to run using the OS shell.
6262
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -69,6 +69,6 @@ jobs:
6969
# ./location_of_script_within_repo/buildscript.sh
7070

7171
- name: Perform CodeQL Analysis
72-
uses: github/codeql-action/analyze@v2
72+
uses: github/codeql-action/analyze@v3
7373
with:
7474
category: "/language:${{matrix.language}}"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# We are running out space on the disk, solution described here:
2+
# https://github.com/actions/runner-images/issues/2840#issuecomment-790492173
3+
4+
name: "Create more disk space"
5+
description: "Removing some folders to create more disk space"
6+
runs:
7+
using: composite
8+
steps:
9+
- shell: bash
10+
run: |
11+
sudo rm -rf /usr/share/dotnet
12+
sudo rm -rf /opt/ghc
13+
sudo rm -rf "/usr/local/share/boost"
14+
sudo rm -rf "$AGENT_TOOLSDIRECTORY"

.github/workflows/publish-to-pypi.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@ jobs:
99
runs-on: ubuntu-latest
1010

1111
steps:
12-
- uses: actions/checkout@v3
12+
- uses: actions/checkout@v4
1313
- name: Set up Python
14-
uses: actions/setup-python@v4
14+
uses: actions/setup-python@v5
1515
with:
1616
python-version: "3.x"
1717
- name: Build distribution 📦
1818
run: |
19-
pip install wheel
19+
pip install build
2020
make dist
2121
- name: Validate
2222
run: |
2323
pip install dist/*.whl
2424
python -c "import ads;"
25-
## To run publish to test PyPI secret with token needs to be added,
25+
## To run publish to test PyPI a secret with token needs to be added,
2626
## this one GH_ADS_TESTPYPI_TOKEN - removed after initial test.
27-
## Project name also needed to be updated in setup.py - setup(name="test_oracle_ads", ...),
27+
## Project name also needed to be updated in pyproject.toml - name = "test_oracle_ads" in [project] section
2828
## regular name is occupied by former developer and can't be used for testing
2929
# - name: Publish distribution 📦 to Test PyPI
3030
# env:
Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
11
name: "Publish Docs"
22

3+
# To run this workflow manually from the Actions tab
34
on:
45
# Auto-trigger this workflow on tag creation
56
push:
67
tags:
78
- 'v*.*.*'
8-
# Auto-trigger this workflow on merge to main changes in docs/** folder
9-
pull_request_target:
10-
types:
11-
- closed
12-
branches:
13-
- main
14-
paths:
15-
- 'docs/**'
169

1710
env:
1811
RTDS_ADS_PROJECT: https://readthedocs.org/api/v3/projects/accelerated-data-science
@@ -24,17 +17,16 @@ jobs:
2417
runs-on: ubuntu-latest
2518

2619
steps:
27-
- name: When PR ✅ merged - Trigger Readthedocs build
28-
if: github.event_name == 'pull_request_target' && github.event.pull_request.merged == true
20+
- name: When tag 🏷️ pushed - Trigger Readthedocs build
21+
if: github.event_name == 'push' && startsWith(github.ref_name, 'v')
2922
run: |
23+
# trigger build/publish of latest version
3024
curl \
3125
-X POST \
3226
-H "Authorization: Token $RTDS_ADS_TOKEN" $RTDS_ADS_PROJECT/versions/latest/builds/
33-
- name: When tag 🏷️ pushed - Trigger Readthedocs build
34-
if: github.event_name == 'push' && startsWith(github.ref_name, 'v')
35-
run: |
36-
# add 10 minutes wait time for readthedocs see freshly created tag
37-
sleep 10m
27+
# add 15 minutes wait time for readthedocs see freshly created tag
28+
sleep 15m
29+
# trigger build/publish of v*.*.* version
3830
curl \
3931
-X POST \
4032
-H "Authorization: Token $RTDS_ADS_TOKEN" $RTDS_ADS_PROJECT/versions/${{ github.ref_name }}/builds/
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: "[Py3.8][Py3.10] Operators Tests"
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
paths:
7+
- "ads/opctl/operator/**"
8+
- "**requirements.txt"
9+
- ".github/workflows/run-operators*.yml"
10+
- "test-requirements-operators.txt"
11+
12+
# Cancel in progress workflows on pull_requests.
13+
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
16+
cancel-in-progress: true
17+
18+
permissions:
19+
contents: read
20+
21+
# hack for https://github.com/actions/cache/issues/810#issuecomment-1222550359
22+
env:
23+
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5
24+
25+
jobs:
26+
test:
27+
name: python ${{ matrix.python-version }}
28+
runs-on: ubuntu-latest
29+
timeout-minutes: 180
30+
31+
strategy:
32+
fail-fast: false
33+
matrix:
34+
python-version: ["3.8"]
35+
36+
steps:
37+
- uses: actions/checkout@v4
38+
39+
- uses: actions/setup-python@v5
40+
with:
41+
python-version: ${{ matrix.python-version }}
42+
cache: "pip"
43+
cache-dependency-path: |
44+
pyproject.toml
45+
"**requirements.txt"
46+
"test-requirements-operators.txt"
47+
48+
- uses: ./.github/workflows/set-dummy-conf
49+
name: "Test config setup"
50+
51+
- name: "Run Operators Tests"
52+
timeout-minutes: 180
53+
shell: bash
54+
run: |
55+
set -x # print commands that are executed
56+
$CONDA/bin/conda init
57+
source /home/runner/.bashrc
58+
pip install -r test-requirements-operators.txt
59+
python -m pytest -v -p no:warnings --durations=5 tests/operators
Lines changed: 18 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
1-
name: tests/unitary/default_setup/**
1+
name: "[Py3.8][Py3.9][Py3.10] tests/unitary/default_setup/**"
22

33
on:
4+
workflow_dispatch:
45
pull_request:
5-
branches:
6-
- main
7-
- "release/**"
8-
- develop
6+
branches: [ "main" ]
97
paths:
108
- "ads/**"
11-
- "!ads/ads_version.json"
12-
- setup.py
13-
- "**requirements.txt"
14-
- .github/workflows/run-unittests.yml
15-
- .github/workflows/run-unittests-default_setup.yml
9+
- "!ads/opctl/operator/**"
10+
- "!ads/feature_store/**"
11+
- "pyproject.toml"
12+
1613

1714
# Cancel in progress workflows on pull_requests.
1815
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
@@ -39,48 +36,29 @@ jobs:
3936
python-version: ["3.8", "3.9", "3.10"]
4037

4138
steps:
42-
- uses: actions/checkout@v3
39+
- uses: actions/checkout@v4
4340

44-
# Caching python libraries installed with pip
45-
# https://github.com/actions/cache/blob/main/examples.md#python---pip
46-
- uses: actions/cache@v3
47-
with:
48-
path: ~/.cache/pip
49-
key: ${{ runner.os }}-pip-${{ hashFiles('**/test-requirements.txt') }}
50-
restore-keys: |
51-
${{ runner.os }}-pip-
52-
- uses: actions/setup-python@v4
41+
- uses: actions/setup-python@v5
5342
with:
5443
python-version: ${{ matrix.python-version }}
44+
cache: "pip"
45+
cache-dependency-path: |
46+
pyproject.toml
47+
"**requirements.txt"
5548
56-
- name: "Test config setup"
57-
shell: bash
58-
env:
59-
HOME_RUNNER_DIR: /home/runner
60-
run: |
61-
set -x # print commands that are executed
62-
mkdir -p "$HOME_RUNNER_DIR"/.oci
63-
openssl genrsa -out $HOME_RUNNER_DIR/.oci/oci_ads_user.pem 2048
64-
cat <<EOT >> "$HOME_RUNNER_DIR/.oci/config"
65-
[DEFAULT]
66-
user=ocid1.user.oc1..xxx
67-
fingerprint=00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
68-
tenancy=ocid1.tenancy.oc1..xxx
69-
region=test_region
70-
key_file=$HOME_RUNNER_DIR/.oci/oci_ads_user.pem
71-
EOT
72-
ls -lha "$HOME_RUNNER_DIR"/.oci
73-
echo "Test config file:"
74-
cat $HOME_RUNNER_DIR/.oci/config
49+
- uses: ./.github/workflows/set-dummy-conf
50+
name: "Test config setup"
7551

7652
- name: "Run default_setup tests folder ONLY with minimum ADS dependencies"
77-
timeout-minutes: 15
53+
timeout-minutes: 30
7854
shell: bash
7955
env:
8056
NoDependency: True
8157
run: |
8258
set -x # print commands that are executed
8359
$CONDA/bin/conda init
8460
source /home/runner/.bashrc
61+
conda install python=${{ matrix.python-version }}
8562
pip install -r test-requirements.txt
63+
conda list
8664
python -m pytest -v -p no:warnings --durations=5 tests/unitary/default_setup

0 commit comments

Comments
 (0)