Skip to content

Commit 888ad02

Browse files
committed
Merge branch 'main' of github.com:oracle/accelerated-data-science into release/2.8.x
2 parents cfb7bef + e6ede2e commit 888ad02

File tree

6 files changed

+130
-36
lines changed

6 files changed

+130
-36
lines changed

.github/workflows/run-unittests.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Unit Tests
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
- 'release/**'
9+
- develop
10+
paths:
11+
- '!docs/**'
12+
13+
pull_request:
14+
15+
# Cancel in progress workflows on pull_requests.
16+
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
19+
cancel-in-progress: true
20+
21+
permissions:
22+
contents: read
23+
24+
jobs:
25+
test:
26+
name: ${{ matrix.tests-type }}, python ${{ matrix.python-version }}
27+
runs-on: ubuntu-latest
28+
timeout-minutes: 45
29+
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
python-version: ["3.7","3.8","3.9","3.10"]
34+
tests-type: ["DefaultSetup"]
35+
36+
steps:
37+
- uses: actions/checkout@v3
38+
# - uses: actions/cache@v3
39+
# with:
40+
# path: ~/.cache/pip
41+
# key: ${{ runner.os }}-pip-${{ hashFiles('**/test-requirements.txt') }}
42+
# restore-keys: |
43+
# ${{ runner.os }}-pip-
44+
- uses: actions/setup-python@v4
45+
with:
46+
python-version: ${{ matrix.python-version }}
47+
48+
- name: "Setup test env"
49+
run: |
50+
pip install coverage pytest-codecov tox==4.2.8
51+
52+
- name: "Run unit tests"
53+
timeout-minutes: 45
54+
shell: bash
55+
run: |
56+
set -x # print commands that are executed
57+
# coverage erase
58+
# ./scripts/runtox.sh "${{ matrix.python-version }}-${{ matrix.tests-type }}" --cov --cov-report=
59+
# coverage combine .coverage-*
60+
# coverage html -i
61+
62+
# Uploading test artifacts
63+
# https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts#uploading-build-and-test-artifacts
64+
# - name: "Upload artifact"
65+
# uses: actions/upload-artifact@v3
66+
# with:
67+
# name: code-coverage-report
68+
# path: htmlcov/
69+
# retention-days: 10

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ This example uses SQL injection safe binding variables.
166166

167167
## Contributing
168168

169-
This project welcomes contributions from the community. Before submitting a pull request, please review our contribution guide [CONTRIBUTING.md](https://github.com/oracle/accelerated-data-science/blob/main/CONTRIBUTING.md).
169+
This project welcomes contributions from the community. Before submitting a pull request, please [review our contribution guide](./CONTRIBUTING.md)
170170

171171
Find Getting Started instructions for developers in [README-development.md](https://github.com/oracle/accelerated-data-science/blob/main/README-development.md)
172172

SECURITY.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ and privacy of all our users.
66

77
Please do NOT raise a GitHub Issue to report a security vulnerability. If you
88
believe you have found a security vulnerability, please submit a report to
9-
[secalert_us@oracle.com](mailto:secalert_us@oracle.com) preferably with a proof of concept.
10-
Please review some additional information on
11-
[how to report security vulnerabilities to Oracle](https://www.oracle.com/corporate/security-practices/assurance/vulnerability/reporting.html).
9+
[secalert_us@oracle.com][1] preferably with a proof of concept. Please review
10+
some additional information on [how to report security vulnerabilities to Oracle][2].
1211
We encourage people who contact Oracle Security to use email encryption using
13-
[our encryption key](https://www.oracle.com/security-alerts/encryptionkey.html).
12+
[our encryption key][3].
1413

1514
We ask that you do not use other channels or contact the project maintainers
1615
directly.
@@ -22,15 +21,18 @@ security features are welcome on GitHub Issues.
2221

2322
Security updates will be released on a regular cadence. Many of our projects
2423
will typically release security fixes in conjunction with the
25-
[Oracle Critical Patch Update](https://www.oracle.com/security-alerts/encryptionkey.html) program.
26-
Security updates are released on the Tuesday closest to the 17th day of January, April, July and October.
27-
A pre-release announcement will be published on the Thursday preceding each release. Additional
28-
information, including past advisories, is available on our
29-
[security alerts](https://www.oracle.com/security-alerts/) page.
24+
[Oracle Critical Patch Update][3] program. Additional
25+
information, including past advisories, is available on our [security alerts][4]
26+
page.
3027

3128
## Security-related information
3229

3330
We will provide security related information such as a threat model, considerations
3431
for secure use, or any known security issues in our documentation. Please note
3532
that labs and sample code are intended to demonstrate a concept and may not be
3633
sufficiently hardened for production use.
34+
35+
[1]: mailto:secalert_us@oracle.com
36+
[2]: https://www.oracle.com/corporate/security-practices/assurance/vulnerability/reporting.html
37+
[3]: https://www.oracle.com/security-alerts/encryptionkey.html
38+
[4]: https://www.oracle.com/security-alerts/

build_spec.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright (c) 2023, 2022, Oracle and/or its affiliates.
2+
3+
version: 0.1
4+
component: build
5+
timeoutInSeconds: 1000
6+
shell: bash
7+
8+
steps:
9+
- type: Command
10+
name: "compress the repo"
11+
command: |
12+
tar -cvzf ${OCI_WORKSPACE_DIR}/repo.tgz ./
13+
outputArtifacts:
14+
- name: artifact
15+
type: BINARY
16+
location: ${OCI_WORKSPACE_DIR}/repo.tgz

docs/requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
-e .
21
autodoc
32
nbsphinx
43
sphinx

docs/source/user_guide/jobs/run_script.rst

Lines changed: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ This example runs a job with CLI arguments:
128128

129129
.. code-block:: python3
130130
131+
from ads.jobs import Job
132+
from ads.jobs import DataScienceJob
133+
from ads.jobs import ScriptRuntime
134+
131135
job = Job()
132136
job.with_infrastructure(
133137
DataScienceJob()
@@ -161,9 +165,9 @@ You could create the preceding example job with the following YAML file:
161165

162166
.. code-block:: yaml
163167
164-
kind: job
165-
spec:
166-
infrastructure:
168+
kind: job
169+
spec:
170+
infrastructure:
167171
kind: infrastructure
168172
type: dataScienceJob
169173
spec:
@@ -177,14 +181,14 @@ You could create the preceding example job with the following YAML file:
177181
memoryInGBs: 16
178182
ocpus: 1
179183
blockStorageSize: 50
180-
runtime:
181-
kind: runtime
184+
runtime:
185+
kind: runtime
182186
type: python
183-
spec:
184-
args:
185-
- <first_argument>
186-
- <second_argument>
187-
scriptPathURI: job_script_argument.py
187+
spec:
188+
args:
189+
- <first_argument>
190+
- <second_argument>
191+
scriptPathURI: job_script_env.py
188192
189193
190194
Environment Variables
@@ -201,12 +205,16 @@ Suppose you want to run the following python script named ``job_script_env.py``:
201205
202206
import os
203207
import sys
204-
print("Hello " + os.environ["KEY1"] + " and " + os.environ["KEY2"])""")
208+
print("Hello " + os.environ["KEY1"] + " and " + os.environ["KEY2"])
205209
206210
This example runs a job with environment variables:
207211

208212
.. code-block:: python3
209213
214+
from ads.jobs import Job
215+
from ads.jobs import DataScienceJob
216+
from ads.jobs import ScriptRuntime
217+
210218
job = Job()
211219
job.with_infrastructure(
212220
DataScienceJob()
@@ -246,12 +254,12 @@ You could create the preceding example job with the following YAML file:
246254

247255
.. code-block:: yaml
248256
249-
kind: job
250-
spec:
251-
infrastructure:
252-
kind: infrastructure
257+
kind: job
258+
spec:
259+
infrastructure:
260+
kind: infrastructure
253261
type: dataScienceJob
254-
spec:
262+
spec:
255263
logGroupId: <log_group_ocid>
256264
logId: <log_ocid>
257265
compartmentId: <compartment_ocid>
@@ -262,16 +270,16 @@ You could create the preceding example job with the following YAML file:
262270
memoryInGBs: 16
263271
ocpus: 1
264272
blockStorageSize: 50
265-
runtime:
266-
kind: runtime
273+
runtime:
274+
kind: runtime
267275
type: python
268-
spec:
269-
env:
270-
- name: KEY1
271-
value: <first_value>
272-
- name: KEY2
273-
value: <second_value>
274-
scriptPathURI: job_script_env.py
276+
spec:
277+
env:
278+
- name: KEY1
279+
value: <first_value>
280+
- name: KEY2
281+
value: <second_value>
282+
scriptPathURI: job_script_env.py
275283
276284
277285

0 commit comments

Comments
 (0)