Skip to content

Commit

Permalink
Sphinx documentation (#247)
Browse files Browse the repository at this point in the history
* Preparation for switch to sphinx documentation

* Update release.yml to build and deploy docs to gh-pages

* Add CNAME file to docs/_build

* Use deploy script from https://github.com/X1011/git-directory-deploy

* Add all functions

* Styling

* Remove autosummary extension

* Rewrite some docs to fit sphinx-js

* Basic installation instructions

* Array creation docs

* Add usage notes and 'under construction' signs
  • Loading branch information
mateogianolio authored Sep 7, 2023
1 parent 274fbee commit b35babe
Show file tree
Hide file tree
Showing 1,732 changed files with 2,709 additions and 654,910 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ jobs:
- name: Build dist/
run: npm run build

- name: Generate docs/
run: npm run docs

- name: Test
run: npm test

Expand All @@ -48,19 +45,25 @@ jobs:
with:
coverageLocations: ${{github.workspace}}/coverage/lcov.info:lcov

- name: Publish dist/ and docs/
- name: Build and deploy docs
run: |
npm run docs
./docs/deploy.sh
- name: Publish dist
run: |
git add dist docs
git commit -m "Publish dist and docs"
git push origin master
git add dist
git commit --amend --no-edit
git push --force origin master
- id: publish
name: Publish package to npm
- name: Publish package to npm
id: publish
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}

- if: steps.publish.outputs.type != 'none'
- name: Publish git tag
if: steps.publish.outputs.type != 'none'
run: |
git tag ${{ steps.publish.outputs.version }}
git push origin ${{ steps.publish.outputs.version }}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ node_modules
coverage
.DS_Store
built
benchmarks
benchmarks
docs/code
docs/_build/**/*
!docs/_build/CNAME
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"esbonio.sphinx.confDir": ""
}
5 changes: 3 additions & 2 deletions dist/core/abs.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NDArray } from './';
/**
* @static
* @memberof module:Globals
* @memberof vectorious
* @function abs
* @description Returns the absolute value of each element of `x`.
* @param {NDArray} x
Expand All @@ -14,7 +14,8 @@ import { NDArray } from './';
export declare const abs: (x: NDArray | ArrayLike<any>) => NDArray;
/**
* @function abs
* @memberof NDArray.prototype
* @memberof NDArray
* @instance
* @description Returns the absolute value of each element of current array.
* @returns {this}
* @example
Expand Down
5 changes: 3 additions & 2 deletions dist/core/acos.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NDArray } from './';
/**
* @static
* @memberof module:Globals
* @memberof vectorious
* @function acos
* @description Returns the arccosine of each element of `x`.
* @param {NDArray} x
Expand All @@ -14,7 +14,8 @@ import { NDArray } from './';
export declare const acos: (x: NDArray | ArrayLike<any>) => NDArray;
/**
* @function acos
* @memberof NDArray.prototype
* @memberof NDArray
* @instance
* @description Returns the arccosine of each element of current array.
* @returns {this}
* @example
Expand Down
5 changes: 3 additions & 2 deletions dist/core/acosh.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NDArray } from './';
/**
* @static
* @memberof module:Globals
* @memberof vectorious
* @function acosh
* @description Returns the hyperbolic arccosine of each element of `x`.
* @param {NDArray} x
Expand All @@ -14,7 +14,8 @@ import { NDArray } from './';
export declare const acosh: (x: NDArray | ArrayLike<any>) => NDArray;
/**
* @function acosh
* @memberof NDArray.prototype
* @memberof NDArray
* @instance
* @description Returns the hyperbolic arccosine of each element of current array.
* @param {NDArray} x
* @returns {this}
Expand Down
5 changes: 3 additions & 2 deletions dist/core/add.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NDArray } from './';
/**
* @static
* @memberof module:Globals
* @memberof vectorious
* @function add
* @description
* Adds `y` multiplied by `alpha` to `x`.
Expand All @@ -18,7 +18,8 @@ import { NDArray } from './';
export declare const add: (x: NDArray | ArrayLike<any>, y: NDArray | ArrayLike<any>, alpha?: number) => NDArray;
/**
* @function add
* @memberof NDArray.prototype
* @memberof NDArray
* @instance
* @description
* Adds `x` multiplied by `alpha` to the current array.
* Accelerated with BLAS `?axpy`.
Expand Down
5 changes: 3 additions & 2 deletions dist/core/angle.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NDArray } from './';
/**
* @static
* @memberof module:Globals
* @memberof vectorious
* @function angle
* @description Determines the angle between the `x` and `y`
* @param {NDArray} x
Expand All @@ -15,7 +15,8 @@ import { NDArray } from './';
export declare const angle: (x: NDArray | ArrayLike<any>, y: NDArray | ArrayLike<any>) => number;
/**
* @function angle
* @memberof NDArray.prototype
* @memberof NDArray
* @instance
* @description Determines the angle between the current vector and `x`.
* @param {NDArray} x
* @returns {number}
Expand Down
2 changes: 1 addition & 1 deletion dist/core/array.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NDArray } from './';
/**
* @static
* @memberof module:Globals
* @memberof vectorious
* @function array
* @description `array(...args)` is an alias for `new v(...args)`
* @param {} ...args
Expand Down
5 changes: 3 additions & 2 deletions dist/core/asin.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NDArray } from './';
/**
* @static
* @memberof module:Globals
* @memberof vectorious
* @function asin
* @description Returns the arcsine of each element of `x`.
* @param {NDArray} x
Expand All @@ -14,7 +14,8 @@ import { NDArray } from './';
export declare const asin: (x: NDArray | ArrayLike<any>) => NDArray;
/**
* @function asin
* @memberof NDArray.prototype
* @memberof NDArray
* @instance
* @description Returns the arcsine of each element of current array.
* @returns {this}
* @example
Expand Down
5 changes: 3 additions & 2 deletions dist/core/asinh.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NDArray } from './';
/**
* @static
* @memberof module:Globals
* @memberof vectorious
* @function asinh
* @description Returns the hyperbolic arcsine of each element of `x`.
* @param {NDArray} x
Expand All @@ -14,7 +14,8 @@ import { NDArray } from './';
export declare const asinh: (x: NDArray | ArrayLike<any>) => NDArray;
/**
* @function asinh
* @memberof NDArray.prototype
* @memberof NDArray
* @instance
* @description Returns the hyperbolic arcsine of each element of current array.
* @returns {this}
* @example
Expand Down
5 changes: 3 additions & 2 deletions dist/core/atan.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NDArray } from './';
/**
* @static
* @memberof module:Globals
* @memberof vectorious
* @function atan
* @description Returns the arctangent of each element of `x`.
* @param {NDArray} x
Expand All @@ -14,7 +14,8 @@ import { NDArray } from './';
export declare const atan: (x: NDArray | ArrayLike<any>) => NDArray;
/**
* @function atan
* @memberof NDArray.prototype
* @memberof NDArray
* @instance
* @description Returns the arctangent of each element of current array.
* @returns {this}
* @example
Expand Down
5 changes: 3 additions & 2 deletions dist/core/atanh.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NDArray } from './';
/**
* @static
* @memberof module:Globals
* @memberof vectorious
* @function atanh
* @description Returns the hyperbolic arctangent of each element of `x`.
* @param {NDArray} x
Expand All @@ -14,7 +14,8 @@ import { NDArray } from './';
export declare const atanh: (x: NDArray | ArrayLike<any>) => NDArray;
/**
* @function atanh
* @memberof NDArray.prototype
* @memberof NDArray
* @instance
* @description Returns the hyperbolic arctangent of each element of current array.
* @returns {this}
* @example
Expand Down
5 changes: 3 additions & 2 deletions dist/core/augment.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NDArray } from './';
/**
* @static
* @memberof module:Globals
* @memberof vectorious
* @function augment
* @description Augments `x` and `y`.
* @param {NDArray} x
Expand All @@ -15,7 +15,8 @@ import { NDArray } from './';
export declare const augment: (x: NDArray | ArrayLike<any>, y: NDArray | ArrayLike<any>) => NDArray;
/**
* @function augment
* @memberof NDArray.prototype
* @memberof NDArray
* @instance
* @description Augments `x` with current matrix.
* @param {NDArray} x
* @returns {this}
Expand Down
5 changes: 3 additions & 2 deletions dist/core/binOp.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NDArray } from './';
/**
* @static
* @memberof module:Globals
* @memberof vectorious
* @function binOp
* @description Perform binary operation `f` on `y` in `x`.
* @param {NDArray} x
Expand All @@ -15,7 +15,8 @@ import { NDArray } from './';
export declare const binOp: (x: NDArray | ArrayLike<any>, y: NDArray | ArrayLike<any>, f: (a: number, b: number, index: number) => number) => NDArray;
/**
* @function binOp
* @memberof NDArray.prototype
* @memberof NDArray
* @instance
* @description Perform binary operation `f` on `x` in the current array.
* @param {NDArray} x
* @returns {this}
Expand Down
5 changes: 3 additions & 2 deletions dist/core/cbrt.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NDArray } from './';
/**
* @static
* @memberof module:Globals
* @memberof vectorious
* @function cbrt
* @description Returns the cube root of each element of `x`.
* @param {NDArray} x
Expand All @@ -14,7 +14,8 @@ import { NDArray } from './';
export declare const cbrt: (x: NDArray | ArrayLike<any>) => NDArray;
/**
* @function cbrt
* @memberof NDArray.prototype
* @memberof NDArray
* @instance
* @description Returns the cube root of each element of current array.
* @returns {this}
* @example
Expand Down
5 changes: 3 additions & 2 deletions dist/core/ceil.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NDArray } from './';
/**
* @static
* @memberof module:Globals
* @memberof vectorious
* @function ceil
* @description Returns smallest integer greater than or equal to of each element of `x`.
* @param {NDArray} x
Expand All @@ -14,7 +14,8 @@ import { NDArray } from './';
export declare const ceil: (x: NDArray | ArrayLike<any>) => NDArray;
/**
* @function ceil
* @memberof NDArray.prototype
* @memberof NDArray
* @instance
* @description Returns smallest integer greater than or equal to of each element of current array.
* @returns {NDArray}
* @example
Expand Down
5 changes: 3 additions & 2 deletions dist/core/check.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NDArray } from './';
/**
* @static
* @memberof module:Globals
* @memberof vectorious
* @function check
* @description Asserts if indices `i, j, ..., n` are within the bounds of `x`
* @param {NDArray} x
Expand All @@ -15,7 +15,8 @@ import { NDArray } from './';
export declare const check: (x: NDArray | ArrayLike<any>, ...indices: number[]) => void;
/**
* @function check
* @memberof NDArray.prototype
* @memberof NDArray
* @instance
* @description Asserts if indices `i, j, ..., n` are within the bounds of current array
* @param {Number[]} ...indices
* @throws {Error} index out of bounds
Expand Down
5 changes: 3 additions & 2 deletions dist/core/combine.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NDArray } from './';
/**
* @static
* @memberof module:Globals
* @memberof vectorious
* @function combine
* @description Combines the vector `x` with `y`
* @param {NDArray} x
Expand All @@ -15,7 +15,8 @@ import { NDArray } from './';
export declare const combine: (x: NDArray | ArrayLike<any>, y: NDArray | ArrayLike<any>) => NDArray;
/**
* @function combine
* @memberof NDArray.prototype
* @memberof NDArray
* @instance
* @description Combines the current vector with `x`
* @param {NDArray} x
* @returns {this}
Expand Down
5 changes: 3 additions & 2 deletions dist/core/copy.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NDArray } from './';
/**
* @static
* @memberof module:Globals
* @memberof vectorious
* @function copy
* @description Makes a copy of `x`
* @param {NDArray} x
Expand All @@ -14,7 +14,8 @@ import { NDArray } from './';
export declare const copy: (x: NDArray | ArrayLike<any>) => NDArray;
/**
* @function copy
* @memberof NDArray.prototype
* @memberof NDArray
* @instance
* @description Makes a copy of the class and underlying data
* @returns {NDArray}
* @example
Expand Down
5 changes: 3 additions & 2 deletions dist/core/cos.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NDArray } from './';
/**
* @static
* @memberof module:Globals
* @memberof vectorious
* @function cos
* @description Returns the cosine of each element of `x`.
* @param {NDArray} x
Expand All @@ -14,7 +14,8 @@ import { NDArray } from './';
export declare const cos: (x: NDArray | ArrayLike<any>) => NDArray;
/**
* @function cos
* @memberof NDArray.prototype
* @memberof NDArray
* @instance
* @description Returns the cosine of each element of current array.
* @returns {this}
* @example
Expand Down
Loading

0 comments on commit b35babe

Please sign in to comment.