Skip to content

Commit 0b04b0d

Browse files
authored
Merge branch 'main' into jobs_docs
2 parents 3fc17ec + b46be37 commit 0b04b0d

File tree

505 files changed

+51213
-7209
lines changed

Some content is hidden

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

505 files changed

+51213
-7209
lines changed

.coveragerc

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
[run]
2+
omit =
3+
**/__init__.py
4+
**/__main__.py
5+
**/_imports.py
6+
**/cli.py
7+
**/constants.py
8+
**/extension.py
9+
**/score.py
10+
*/.*
11+
/private/*
12+
/tmp/*
13+
ads/automl/*
14+
ads/common/analyzer.py
15+
ads/common/artifact/*
16+
ads/common/function/*
17+
ads/dataflow/*
18+
ads/dataset/dask_series.py
19+
ads/dataset/factory.py
20+
ads/environment/*
21+
ads/experiments/*
22+
ads/explanations/*
23+
ads/templates/*
24+
ads/type_discovery/*
25+
docs/*
26+
tests/*
27+
28+
[report]
29+
exclude_lines =
30+
pragma: no cover
31+
def __repr__
32+
if __name__ == .__main__.:
33+
@(abc\.)?abstractmethod
34+
raise AssertionError
35+
raise NotImplementedError
36+
omit =
37+
**/__init__.py
38+
**/__main__.py
39+
**/_imports.py
40+
**/cli.py
41+
**/constants.py
42+
**/extension.py
43+
**/score.py
44+
*/.*
45+
/private/*
46+
/tmp/*
47+
ads/automl/*
48+
ads/common/analyzer.py
49+
ads/common/artifact/*
50+
ads/common/function/*
51+
ads/dataflow/*
52+
ads/dataset/dask_series.py
53+
ads/dataset/factory.py
54+
ads/environment/*
55+
ads/experiments/*
56+
ads/explanations/*
57+
ads/templates/*
58+
ads/type_discovery/*
59+
show_missing = true
60+
skip_empty = true
61+
precision = 2
62+
63+
[html]
64+
directory = htmlcov
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Feature Request
2+
description: Feature and enhancement proposals in oracle-ads library
3+
title: "[FR]: "
4+
labels: [Task, Backlog]
5+
assignees:
6+
- octocat
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: |
11+
Before proceeding, please review the [Contributing to this repository](https://github.com/oracle/accelerated-data-science/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/oracle/.github/blob/main/CODE_OF_CONDUCT.md).
12+
13+
---
14+
15+
Thank you for submitting a feature request.
16+
- type: dropdown
17+
id: contribution
18+
attributes:
19+
label: Willingness to contribute
20+
description: Would you or another member of your organization be willing to contribute an implementation of this feature?
21+
options:
22+
- Yes. I can contribute this feature independently.
23+
- Yes. I would be willing to contribute this feature with guidance from the oracle-ads team.
24+
- No. I cannot contribute this feature at this time.
25+
validations:
26+
required: true
27+
- type: textarea
28+
attributes:
29+
label: Proposal Summary
30+
description: |
31+
In a few sentences, provide a clear, high-level description of the feature request
32+
validations:
33+
required: true
34+
- type: textarea
35+
attributes:
36+
label: Motivation
37+
description: |
38+
- What is the use case for this feature?
39+
- Why is this use case valuable to support for OCI DataScience users in general?
40+
- Why is this use case valuable to support for your project(s) or organization?
41+
- Why is it currently difficult to achieve this use case?
42+
value: |
43+
> #### What is the use case for this feature?
44+
45+
> #### Why is this use case valuable to support for OCI DataScience users in general?
46+
47+
> #### Why is this use case valuable to support for your project(s) or organization?
48+
49+
> #### Why is it currently difficult to achieve this use case?
50+
validations:
51+
required: true
52+
- type: textarea
53+
attributes:
54+
label: Details
55+
description: |
56+
Use this section to include any additional information about the feature. If you have a proposal for how to implement this feature, please include it here. For implementation guidelines, please refer to the [Contributing to this repository](https://github.com/oracle/accelerated-data-science/blob/main/CONTRIBUTING.md).
57+
validations:
58+
required: false

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

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: "[DO NOT TRIGGER] Publish to PyPI"
2+
3+
# To run this workflow manually from the Actions tab
4+
on: workflow_dispatch
5+
6+
jobs:
7+
build-n-publish:
8+
name: Build and publish Python 🐍 distribution 📦 to PyPI
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v3
13+
- name: Set up Python
14+
uses: actions/setup-python@v4
15+
with:
16+
python-version: "3.x"
17+
- name: Build distribution 📦
18+
run: |
19+
pip install wheel
20+
make dist
21+
- name: Validate
22+
run: |
23+
pip install dist/*.whl
24+
python -c "import ads;"
25+
## To run publish to test PyPI secret with token needs to be added,
26+
## 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", ...),
28+
## regular name is occupied by former developer and can't be used for testing
29+
# - name: Publish distribution 📦 to Test PyPI
30+
# env:
31+
# TWINE_USERNAME: __token__
32+
# TWINE_PASSWORD: ${{ secrets.GH_ADS_TESTPYPI_TOKEN }}
33+
# run: |
34+
# pip install twine
35+
# twine upload -r testpypi dist/* -u $TWINE_USERNAME -p $TWINE_PASSWORD
36+
- name: Publish distribution 📦 to PyPI
37+
env:
38+
TWINE_USERNAME: __token__
39+
TWINE_PASSWORD: ${{ secrets.GH_ADS_PYPI_TOKEN }}
40+
run: |
41+
pip install twine
42+
twine upload dist/* -u $TWINE_USERNAME -p $TWINE_PASSWORD
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: "Publish Docs"
2+
3+
on:
4+
# Auto-trigger this workflow on tag creation
5+
push:
6+
tags:
7+
- 'v*.*.*'
8+
9+
env:
10+
RTDS_ADS_PROJECT: https://readthedocs.org/api/v3/projects/accelerated-data-science
11+
RTDS_ADS_TOKEN: ${{ secrets.RTDS_ADS_TOKEN }}
12+
13+
jobs:
14+
build-n-publish:
15+
name: Build and publish Docs 📖 to Readthedocs
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: When tag 🏷️ pushed - Trigger Readthedocs build
20+
if: github.event_name == 'push' && startsWith(github.ref_name, 'v')
21+
run: |
22+
# trigger build/publish of latest version
23+
curl \
24+
-X POST \
25+
-H "Authorization: Token $RTDS_ADS_TOKEN" $RTDS_ADS_PROJECT/versions/latest/builds/
26+
# add 15 minutes wait time for readthedocs see freshly created tag
27+
sleep 15m
28+
# trigger build/publish of v*.*.* version
29+
curl \
30+
-X POST \
31+
-H "Authorization: Token $RTDS_ADS_TOKEN" $RTDS_ADS_PROJECT/versions/${{ github.ref_name }}/builds/
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: tests/unitary/default_setup/**
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
- "release/**"
8+
- develop
9+
paths:
10+
- "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
16+
17+
# Cancel in progress workflows on pull_requests.
18+
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
19+
concurrency:
20+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
21+
cancel-in-progress: true
22+
23+
permissions:
24+
contents: read
25+
26+
# hack for https://github.com/actions/cache/issues/810#issuecomment-1222550359
27+
env:
28+
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5
29+
30+
jobs:
31+
test:
32+
name: python ${{ matrix.python-version }}, default_setup
33+
runs-on: ubuntu-latest
34+
timeout-minutes: 20
35+
36+
strategy:
37+
fail-fast: false
38+
matrix:
39+
python-version: ["3.8", "3.9", "3.10"]
40+
41+
steps:
42+
- uses: actions/checkout@v3
43+
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
53+
with:
54+
python-version: ${{ matrix.python-version }}
55+
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
75+
76+
- name: "Run default_setup tests folder ONLY with minimum ADS dependencies"
77+
timeout-minutes: 15
78+
shell: bash
79+
env:
80+
NoDependency: True
81+
run: |
82+
set -x # print commands that are executed
83+
$CONDA/bin/conda init
84+
source /home/runner/.bashrc
85+
pip install -r test-requirements.txt
86+
python -m pytest -v -p no:warnings --durations=5 tests/unitary/default_setup

0 commit comments

Comments
 (0)