Skip to content

Commit 838b9b9

Browse files
committed
Merge with main
2 parents 50a70af + bc49588 commit 838b9b9

Some content is hidden

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

43 files changed

+787
-373
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ jobs:
2020
no_output_timeout: 25m
2121
command: |
2222
pip install -r requirements.txt
23-
sphinx-build -b html -WT --keep-going spec build/latest -d doctrees
23+
sphinx-build -b html -WT --keep-going spec build/draft -d doctrees
2424
- store_artifacts:
25-
path: build/latest
25+
path: build/draft
2626

2727
workflows:
2828
version: 2

.github/workflows/pages.yml

Lines changed: 123 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,132 @@
1+
#/
2+
# @license MIT
3+
#
4+
# Copyright (c) 2022 Python Data APIs Consortium.
5+
#
6+
# Permission is hereby granted, free of charge, to any person obtaining a copy
7+
# of this software and associated documentation files (the "Software"), to deal
8+
# in the Software without restriction, including without limitation the rights
9+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
# copies of the Software, and to permit persons to whom the Software is
11+
# furnished to do so, subject to the following conditions:
12+
#
13+
# The above copyright notice and this permission notice shall be included in all
14+
# copies or substantial portions of the Software.
15+
#
16+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
# SOFTWARE.
23+
#/
24+
25+
# Workflow name:
26+
name: gh_pages
27+
28+
# Workflow triggers:
129
on:
230
push:
331
branches:
432
- main
33+
534
pull_request:
635
branches:
7-
- "**"
36+
- "**"
37+
38+
# Workflow jobs:
839
jobs:
9-
run:
10-
# Don't run Action on forks, and allow skipping CI
40+
41+
# Define a job for publishing to the gh-pages branch...
42+
publish:
43+
44+
# Define a display name:
45+
name: 'Publish'
46+
47+
# Define the type of virtual host machine:
48+
runs-on: ubuntu-latest
49+
50+
# Avoid running this workflow for forks and allow skipping CI:
1151
if: "github.repository == 'data-apis/array-api' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')"
12-
runs-on: ubuntu-18.04
52+
53+
# Define a sequence of job steps...
1354
steps:
14-
# - uses: docker://pandoc/latex:2.9
15-
- uses: actions/checkout@master
16-
- uses: actions/setup-python@v2
17-
with:
18-
python-version: '3.10.2' # Version range or exact version of a Python version to use, using semvers version range syntax.
19-
architecture: 'x64' # (x64 or x86)
20-
- run: |
21-
# add dependencies based on the conf.py
22-
pip install -r requirements.txt
23-
- name: Build docs
24-
run: |
25-
# Turn warnings into errors; ensure .doctrees doesn't get deployed
26-
sphinx-build -b html -WT --keep-going spec build/latest -d doctrees
27-
touch build/.nojekyll
28-
- uses: actions/upload-artifact@v2
29-
if: ${{ github.event_name == 'pull_request'}}
30-
with:
31-
name: html
32-
path: build/
33-
if-no-files-found: error
34-
- name: Deploy
35-
if: ${{ github.ref == 'refs/heads/main'}}
36-
uses: peaceiris/actions-gh-pages@v3
37-
with:
38-
github_token: ${{ secrets.GITHUB_TOKEN }}
39-
publish_dir: ./build
55+
56+
# Checkout the repository:
57+
- name: 'Checkout repository'
58+
uses: actions/checkout@v2
59+
with:
60+
# Specify whether to remove untracked files before checking out the repository:
61+
clean: false
62+
63+
# Limit clone depth to the most recent commit:
64+
fetch-depth: 1
65+
66+
# Specify whether to download Git-LFS files:
67+
lfs: false
68+
69+
# GitHub token:
70+
token: ${{ secrets.GITHUB_TOKEN }}
71+
timeout-minutes: 10
72+
73+
# Install Python:
74+
- name: 'Install Python'
75+
uses: actions/setup-python@v2
76+
with:
77+
python-version: '3.10.2'
78+
architecture: 'x64'
79+
80+
# Install dependencies:
81+
- name: 'Install dependencies'
82+
run: |
83+
pip install -r ./requirements.txt
84+
85+
# Generate the documentation:
86+
- name: 'Build documentation'
87+
run: |
88+
# Turn warnings into errors and ensure .doctrees is not deployed:
89+
sphinx-build -b html -WT --keep-going spec build/draft -d doctrees
90+
91+
# Upload the build artifact:
92+
- name: 'Upload build artifact'
93+
uses: actions/upload-artifact@v2
94+
if: ${{ github.event_name == 'pull_request'}}
95+
with:
96+
name: html
97+
path: build/
98+
if-no-files-found: error
99+
100+
# Configure Git:
101+
- name: 'Configure Git'
102+
run: |
103+
git config --local user.email "[email protected]"
104+
git config --local user.name "array-api-bot"
105+
timeout-minutes: 5
106+
107+
# Checkout the gh-pages branch:
108+
- name: 'Checkout gh-pages'
109+
run: |
110+
git fetch --all
111+
git checkout gh-pages
112+
timeout-minutes: 5
113+
114+
# Copy build artifact:
115+
- name: 'Copy build artifact'
116+
run: |
117+
rm -rf ./draft && cp -R ./build/draft ./draft
118+
timeout-minutes: 10
119+
120+
# Commit changes to:
121+
- name: 'Commit changes'
122+
run: |
123+
git add . && git commit -m "Deploy: ${{ github.sha }}"
124+
continue-on-error: true
125+
timeout-minutes: 10
126+
127+
# Push changes:
128+
- name: 'Push changes'
129+
if: success()
130+
run: |
131+
git push "https://$GITHUB_ACTOR:[email protected]/${{ github.repository }}.git"
132+
timeout-minutes: 10

.github/workflows/preview.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ jobs:
1111
uses: larsoner/circleci-artifacts-redirector-action@master
1212
with:
1313
repo-token: ${{ secrets.GITHUB_TOKEN }}
14-
artifact-path: 0/build/latest/index.html
14+
artifact-path: 0/build/draft/index.html
1515
circleci-jobs: build_page
1616
job-title: Check the rendered docs here!
17-
- name: Array API preview
18-
run: |
19-
curl --fail ${{ steps.step1.outputs.url }} | grep $GITHUB_SHA

.gitignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,33 @@
1+
#/
2+
# @license MIT
3+
#
4+
# Copyright (c) 2022 Python Data APIs Consortium.
5+
#
6+
# Permission is hereby granted, free of charge, to any person obtaining a copy
7+
# of this software and associated documentation files (the "Software"), to deal
8+
# in the Software without restriction, including without limitation the rights
9+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
# copies of the Software, and to permit persons to whom the Software is
11+
# furnished to do so, subject to the following conditions:
12+
#
13+
# The above copyright notice and this permission notice shall be included in all
14+
# copies or substantial portions of the Software.
15+
#
16+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
# SOFTWARE.
23+
#/
24+
125
spec/_build/
26+
doctrees/
227
build/
328
.vscode/
429
node_modules/
530
__pycache__/
631
*.pyc
732
spec/**/generated
33+
tmp/

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ myst-parser
44
sphinx_markdown_tables
55
sphinx_copybutton
66
docutils<0.18
7+
sphinx-math-dollar
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
from .array_object import *
2+
from .constants import *
3+
from .creation_functions import *
4+
from .data_type_functions import *
5+
import array_api.data_types as dtype
6+
from .elementwise_functions import *
7+
from .linear_algebra_functions import *
8+
from .manipulation_functions import *
9+
from .searching_functions import *
10+
from .set_functions import *
11+
from .sorting_functions import *
12+
from .statistical_functions import *
13+
from .utility_functions import *
14+
from . import linalg

0 commit comments

Comments
 (0)