Skip to content

Commit ed0694f

Browse files
committed
Merge commit '7f49d7e651a02eac57af3ef387aec53c76845e2e'
2 parents 1fac993 + 7f49d7e commit ed0694f

File tree

170 files changed

+14697
-2975
lines changed

Some content is hidden

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

170 files changed

+14697
-2975
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+
- setup.py
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 **setup.py** file. ⚠️
27+
- PR Creator must update 📃 THIRD_PARTY_LICENSES.txt, if any 📚 library added/removed in **setup.py**.
28+
- PR Approver must confirm 📃 THIRD_PARTY_LICENSES.txt updated, if any 📚 library added/removed in **setup.py**.
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+
})
Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,7 @@
11
name: "Publish Docs"
22

3-
on:
4-
# Auto-trigger this workflow on tag creation
5-
push:
6-
tags:
7-
- '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/**'
3+
# To run this workflow manually from the Actions tab
4+
on: workflow_dispatch
165

176
env:
187
RTDS_ADS_PROJECT: https://readthedocs.org/api/v3/projects/accelerated-data-science
@@ -24,17 +13,16 @@ jobs:
2413
runs-on: ubuntu-latest
2514

2615
steps:
27-
- name: When PR ✅ merged - Trigger Readthedocs build
28-
if: github.event_name == 'pull_request_target' && github.event.pull_request.merged == true
16+
- name: When tag 🏷️ pushed - Trigger Readthedocs build
17+
if: github.event_name == 'push' && startsWith(github.ref_name, 'v')
2918
run: |
19+
# trigger build/publish of latest version
3020
curl \
3121
-X POST \
3222
-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
23+
# add 15 minutes wait time for readthedocs see freshly created tag
24+
sleep 15m
25+
# trigger build/publish of v*.*.* version
3826
curl \
3927
-X POST \
4028
-H "Authorization: Token $RTDS_ADS_TOKEN" $RTDS_ADS_PROJECT/versions/${{ github.ref_name }}/builds/

.github/workflows/run-unittests.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ jobs:
135135
needs: test
136136
if: ${{ success() }} && ${{ github.event.issue.pull_request }}
137137
env:
138-
COMPARE_BRANCH: develop
138+
COMPARE_BRANCH: main
139139

140140
steps:
141141
- name: "Checkout current branch"
@@ -152,9 +152,14 @@ jobs:
152152
COV_BODY_INTRO="📌 Overall coverage:\n\n"
153153
echo COV_BODY="$COV_BODY_INTRO No success to gather report. 😿" >> $GITHUB_ENV
154154
155+
# Prepare file paths to .coverage files
156+
# Filenames taken from job.test last step with name - "Save coverage files"
157+
FILE_UNITARY="cov-reports-unitary/.coverage"; [[ ! -f $FILE_UNITARY ]] && FILE_UNITARY=""
158+
FILE_MODEL="cov-reports-model/.coverage"; [[ ! -f $FILE_MODEL ]] && FILE_MODEL=""
159+
155160
# Combine coverage files
156161
pip install coverage
157-
coverage combine cov-reports-unitary/.coverage cov-reports-model/.coverage
162+
coverage combine $FILE_UNITARY $FILE_MODEL
158163
159164
# Make html report
160165
coverage html

.gitleaks.toml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
title = "Gitleaks Config"
2+
3+
# Gitleaks feature, extending the existing base config from:
4+
# https://github.com/zricethezav/gitleaks/blob/master/config/gitleaks.toml
5+
[extend]
6+
useDefault = true
7+
8+
# Allowlist's 'stopwords' and 'regexes' excludes any secrets or mathching patterns from the current repository.
9+
# Paths listed in allowlist will not be scanned.
10+
[allowlist]
11+
description = "Global allow list"
12+
stopwords = ["test_password", "sample_key"]
13+
regexes = [
14+
'''example-password''',
15+
'''this-is-not-the-secret''',
16+
'''<redacted>'''
17+
]
18+
paths = [
19+
'''tests/integration/tests_configs.yaml'''
20+
]
21+
22+
# Describe rule to search real ocids
23+
[[rules]]
24+
description = "Real ocids"
25+
id = "ocid"
26+
regex = '''ocid[123]\.[a-z1-9A-Z]*\.oc\d\.[a-z1-9A-Z]*\.[a-z1-9A-Z]+'''
27+
keywords = [
28+
"ocid"
29+
]
30+
31+
# Describe rule to search generic secrets
32+
[[rules]]
33+
description = "Generic secret"
34+
id = "generic-secret"
35+
regex = '''(?i)((key|api|token|secret|passwd|password|psw|pass|pswd)[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([0-9a-zA-Z!@#$%^&*<>\\\-_.=]{3,100})['\"]'''
36+
entropy = 0
37+
secretGroup = 4
38+
keywords = [
39+
"key","api","token","secret","passwd","password", "psw", "pass", "pswd"
40+
]

.pre-commit-config.yaml

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
repos:
2+
# Standard hooks
23
- repo: https://github.com/pre-commit/pre-commit-hooks
34
rev: v4.4.0
45
hooks:
56
- id: check-ast
7+
exclude: ^docs/
68
- id: check-docstring-first
7-
exclude: ^tests/
9+
exclude: ^(docs/|tests/)
810
- id: check-json
911
- id: check-merge-conflict
1012
- id: check-yaml
@@ -14,14 +16,34 @@ repos:
1416
- id: pretty-format-json
1517
args: ['--autofix']
1618
- id: trailing-whitespace
19+
args: [--markdown-linebreak-ext=md]
20+
exclude: ^docs/
21+
# Black, the code formatter, natively supports pre-commit
1722
- repo: https://github.com/psf/black
18-
rev: 22.12.0
23+
rev: 23.3.0
1924
hooks:
2025
- id: black
26+
exclude: ^docs/
27+
# Regex based rst files common mistakes detector
2128
- repo: https://github.com/pre-commit/pygrep-hooks
22-
rev: v1.9.0
29+
rev: v1.10.0
2330
hooks:
2431
- id: rst-backticks
32+
files: ^docs/
2533
- id: rst-inline-touching-normal
26-
27-
exclude: ^(docs/)
34+
files: ^docs/
35+
# Hardcoded secrets and ocids detector
36+
- repo: https://github.com/gitleaks/gitleaks
37+
rev: v8.17.0
38+
hooks:
39+
- id: gitleaks
40+
# Oracle copyright checker
41+
- repo: https://github.com/oracle-samples/oci-data-science-ai-samples/
42+
rev: cbe0136
43+
hooks:
44+
- id: check-copyright
45+
name: check-copyright
46+
entry: .pre-commit-scripts/check-copyright.py
47+
language: script
48+
types_or: ['python', 'shell', 'bash']
49+
exclude: ^docs/

.readthedocs.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Read the Docs configuration file
2+
3+
# Required
4+
version: 2
5+
6+
# Set the version of Python and other tools you might need
7+
build:
8+
os: ubuntu-22.04
9+
tools:
10+
python: "3.9"
11+
12+
# Build documentation in the docs/ directory with Sphinx
13+
sphinx:
14+
configuration: docs/source/conf.py
15+
16+
# Optionally declare the Python requirements required to build your docs
17+
python:
18+
install:
19+
- requirements: docs/requirements.txt

CONTRIBUTING.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@ git commit --signoff
3131
Only pull requests from committers that can be verified as having signed the OCA
3232
are accepted.
3333

34+
## Branching strategy
35+
36+
Use GitHub flow branching strategy. With the GitHub flow, there are only 2 branches: main and feature.
37+
38+
1. Every change that is worked on is branched directly off of main into a feature branch.
39+
2. Once a feature is ready it is tested on the feature branch and the code is reviewed before being merged to main.
40+
41+
Hotfixes, bugfixes are treated the same as feature branches.
42+
3443
## Pull request process
3544

3645
1. Ensure there is an issue created to track and discuss the fix or enhancement

0 commit comments

Comments
 (0)