Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add compatibility tables to rendered specification #607

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
3 changes: 2 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ _defaults: &defaults
docker:
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
- image: cimg/python:3.10.2
- image: cimg/python:3.10.2-node
working_directory: ~/repo

jobs:
Expand All @@ -21,6 +21,7 @@ jobs:
command: |
pip install -r doc-requirements.txt
make spec
make compat
- store_artifacts:
path: _site/

Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,20 @@ jobs:
run: |
pip install -r doc-requirements.txt

# Install Node.js:
- name: 'Install Node.js'
uses: actions/setup-node@v3
with:
node-version: '16' # 'lts/*'
timeout-minutes: 5

# Generate the documentation:
- name: 'Build documentation'
run: |
# Turn warnings into errors and ensure .doctrees is not deployed:
export SPHINXOPTS="-b html -WT --keep-going -d doctrees"
make spec
make compat

# Configure Git:
- name: 'Configure Git'
Expand Down
167 changes: 161 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,170 @@
# SOFTWARE.
#/

# Files #
#########


# Directories #
###############
_site/
doctrees/
build/
.vscode/
node_modules/
__pycache__/
*.pyc
spec/**/generated
dist/

build/
downloads/
reports/
tmp/

# Compiled source #
###################
*.com
*.class
*.dll
*.o
*.so
*.slo
*.lo
*.obj
*.dylib
*.lai
*.la
*.a
*.lib
*.ko
*.elf
*.node

# Precompiled headers #
#######################
*.gch
*.pch

# Executables #
###############
*.exe
*.out
*.app

# Packages #
############
# It is better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip

# Logs and databases #
######################
*.log
*.sql
*.sqlite

# OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
Icon?
ehthumbs.db
Thumbs.db
Desktop.ini

# Temporary files #
###################
*~

# Node.js #
###########
/node_modules/
pids
*.pid
*.seed

# Typescript #
##############
*.tsbuildinfo

# Matlab #
##########
*.asv
*.mex*

# Fortran #
###########
*.mod

# R #
#####
.Rhistory
.Rapp.history
.Rproj.user/

# Python #
##########
__pycache__/
*.py[cod]
*$py.class
*.egg-info/
*.egg
dist/

# TeX #
#######
*.aux
*.lof
*.log
*.lot
*.fls
*.out
*.toc
*.dvi
*-converted-to.*
*.bbl
*.bcf
*.blg
*-blx.aux
*-blx.bib
*.brf
*.run.xml
*.fdb_latexmk
*.synctex
*.synctex.gz
*.synctex.gz(busy)
*.pdfsync
*.alg
*.loa
acs-*.bib
*.thm
*.nav
*.snm
*.vrb
*.acn
*.acr
*.glg
*.glo
*.gls
*-concordance.tex
*.tikz
*-tikzDictionary
*.idx
*.ilg
*.ind
*.ist

# Visual Studio #
#################
.vscode/
jsconfig.json

# Sublime Text #
################
*.sublime-workspace
*.sublime-project
34 changes: 34 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#/
# @license MIT
#
# Copyright (c) 2023 Python Data APIs Consortium.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#/

# Configuration for [npm][1].
#
# [1]: https://docs.npmjs.com/files/npmrc

# Disable the creation of a lock file:
package-lock = false
shrinkwrap = false

# Disable automatically "saving" dependencies on install:
save = false
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ spec:
sphinx-build "$(SOURCEDIR)/2022.12" "$(BUILDDIR)/2022.12" $(SPHINXOPTS)
cp -r "$(BUILDDIR)/2022.12" "$(BUILDDIR)/latest"
sphinx-build "$(SOURCEDIR)/draft" "$(BUILDDIR)/draft" $(SPHINXOPTS)

compat:
npm install && npm run build
33 changes: 33 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"private": true,
"name": "@data-apis/array-api",
"version": "0.0.0",
"license": "MIT",
"description": "Array API specification.",
"author": {},
"contributors": [],
"main": "",
"directories": {},
"scripts": {
"build": "npm run build:install && npm run build:compat",
"build:install": "cd ./node_modules/array-api-compat-data && npm install",
"build:compat": "npm run build:compat:draft && npm run build:compat:latest && npm run build:compat:2022 && npm run build:compat:2021",
"build:compat:init": "cd ./node_modules/array-api-compat-data && rm -rf ./build/embed && mkdir -p ./build/embed && cd ./../../",
"build:compat:draft": "npm run build:compat:init && cd ./node_modules/array-api-compat-data && node ./scripts/build_embed.js --max-version='*' && node ./scripts/build_spec.js ./../../_site/draft",
"build:compat:latest": "npm run build:compat:init && cd ./node_modules/array-api-compat-data && node ./scripts/build_embed.js --max-version='*' && node ./scripts/build_spec.js ./../../_site/latest",
"build:compat:2022": "npm run build:compat:init && cd ./node_modules/array-api-compat-data && node ./scripts/build_embed.js --max-version='2022.12' && node ./scripts/build_spec.js ./../../_site/2022.12",
"build:compat:2021": "npm run build:compat:init && cd ./node_modules/array-api-compat-data && node ./scripts/build_embed.js --max-version='2021.12' && node ./scripts/build_spec.js ./../../_site/2021.12"
},
"homepage": "https://github.com/data-apis/array-api",
"repository": {
"type": "git",
"url": "git://github.com/data-apis/array-api.git"
},
"bugs": {
"url": "https://github.com/data-apis/array-api/issues"
},
"devDependencies": {
"array-api-compat-data": "git+https://github.com/data-apis/array-api-compat-data.git#main"
},
"keywords": []
}
Binary file added spec/_static/images/compat/cupy_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spec/_static/images/compat/cupy_logo_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions spec/_static/images/compat/dask_logo_icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions spec/_static/images/compat/deprecated.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions spec/_static/images/compat/disabled.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions spec/_static/images/compat/jax_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions spec/_static/images/compat/more.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spec/_static/images/compat/mxnet_logo_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions spec/_static/images/compat/no.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions spec/_static/images/compat/numpy_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading