Skip to content

Commit 87f78ba

Browse files
committed
Merge commit '13b7ba43ca42b4d020a025462eccd7d9f21a7ece'
Conflicts: .github/workflows/run-unittests.yml
2 parents d2fbe3e + 13b7ba4 commit 87f78ba

File tree

4 files changed

+47
-11
lines changed

4 files changed

+47
-11
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: "Publish Docs"
2+
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/**'
16+
17+
env:
18+
RTDS_ADS_PROJECT: https://readthedocs.org/api/v3/projects/accelerated-data-science
19+
RTDS_ADS_TOKEN: ${{ secrets.RTDS_ADS_TOKEN }}
20+
21+
jobs:
22+
build-n-publish:
23+
name: Build and publish Docs 📖 to Readthedocs
24+
runs-on: ubuntu-latest
25+
26+
steps:
27+
- name: When PR ✅ merged - Trigger Readthedocs build
28+
if: github.event_name == 'pull_request_target' && github.event.pull_request.merged == true
29+
run: |
30+
curl \
31+
-X POST \
32+
-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
38+
curl \
39+
-X POST \
40+
-H "Authorization: Token $RTDS_ADS_TOKEN" $RTDS_ADS_PROJECT/versions/${{ github.ref_name }}/builds/

.github/workflows/run-unittests-default_setup.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: tests/unitary/default_setup/**
22

33
on:
4-
push:
4+
pull_request:
55
branches:
66
- main
77
- 'release/**'
@@ -10,9 +10,6 @@ on:
1010
- 'ads/**'
1111
- setup.py
1212
- '**requirements.txt'
13-
- '!docs/**'
14-
15-
pull_request:
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

.github/workflows/run-unittests.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: tests/unitary/**
22

33
on:
4-
push:
4+
pull_request:
55
branches:
66
- main
77
- "release/**"
@@ -10,9 +10,6 @@ on:
1010
- "ads/**"
1111
- setup.py
1212
- "**requirements.txt"
13-
- "!docs/**"
14-
15-
pull_request:
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
@@ -162,7 +159,7 @@ jobs:
162159
# Calculate overall coverage and update body message
163160
COV=$(grep -E 'pc_cov' htmlcov/index.html | cut -d'>' -f 2 | cut -d'%' -f 1)
164161
if [[ ! -z $COV ]]; then
165-
if [[ $COV < 50 ]]; then COLOR=red; elif [[ $COV < 80 ]]; then COLOR=yellow; else COLOR=green; fi
162+
if [[ $COV -lt 50 ]]; then COLOR=red; elif [[ $COV -lt 80 ]]; then COLOR=yellow; else COLOR=green; fi
166163
echo COV_BODY="$COV_BODY_INTRO ![Coverage-$COV%](https://img.shields.io/badge/coverage-$COV%25-$COLOR)" >> $GITHUB_ENV
167164
fi
168165
@@ -173,7 +170,7 @@ jobs:
173170
174171
# Prepare default diff body text
175172
DIFF_BODY_INTRO="📌 Cov diff with **${{ env.COMPARE_BRANCH }}**:\n\n"
176-
echo DIFF_BODY="$BODY_INTRO No success to gather report. 😿" >> $GITHUB_ENV
173+
echo DIFF_BODY="$DIFF_BODY_INTRO No success to gather report. 😿" >> $GITHUB_ENV
177174
178175
# Prepare file paths to coverage xml files
179176
# Filenames taken from job.test last step with name - "Save coverage files"
@@ -192,7 +189,7 @@ jobs:
192189
--compare-branch=origin/${{ env.COMPARE_BRANCH }} | grep "No lines");
193190
echo DIFF_BODY="$DIFF_BODY_INTRO $DIFF_INFO">> $GITHUB_ENV
194191
else
195-
if [[ $DIFF < 50 ]]; then COLOR=red; elif [[ $DIFF < 80 ]]; then COLOR=yellow; else COLOR=green; fi
192+
if [[ $DIFF -lt 50 ]]; then COLOR=red; elif [[ $DIFF -lt 80 ]]; then COLOR=yellow; else COLOR=green; fi
196193
echo DIFF_BODY="$DIFF_BODY_INTRO ![Coverage-$DIFF%](https://img.shields.io/badge/coverage-$DIFF%25-$COLOR)" >> $GITHUB_ENV
197194
fi
198195

docs/source/user_guide/configuration/authentication.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,5 @@ In the this example, the default authentication uses API keys specified with the
7878
set_auth("api_key") # default signer is set to api_key
7979
os_auth = authutil.resource_principal() # use resource principal to as the preferred way to access object store
8080
81+
``AuthContext`` context class can also be used to specify the desired type of authentication. It supports API key configuration, resource principal, and instance principal authentication, as well as predefined signers, callable signers, or API keys configurations from specified locations. See `API Documentation <../../ads.common.html#ads.common.auth.AuthContext>`__ for more details.
82+

0 commit comments

Comments
 (0)