Skip to content

Commit

Permalink
publish docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dastrobu committed Dec 21, 2022
1 parent 535538e commit b60929e
Show file tree
Hide file tree
Showing 75 changed files with 75 additions and 33,572 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/docc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: generate-documentation

on:
push:
branches:
- main

jobs:
generate-docs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: generate-documentation
# https://apple.github.io/swift-docc-plugin/documentation/swiftdoccplugin/generating-documentation-for-hosting-online/
run: >
swift package
--allow-writing-to-directory ./docs
generate-documentation
--output-path ./docs
--hosting-base-path NdArray
--disable-indexing
--transform-for-static-hosting
- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# Swift Package Manager
.build/
.swiftpm
docs

DerivedData/

Expand Down
2 changes: 0 additions & 2 deletions .jazzy.yaml

This file was deleted.

17 changes: 17 additions & 0 deletions .run/preview-documentation.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="preview-documentation" type="ShConfigurationType">
<option name="SCRIPT_TEXT" value="swift package --disable-sandbox preview-documentation" />
<option name="INDEPENDENT_SCRIPT_PATH" value="true" />
<option name="SCRIPT_PATH" value="swift" />
<option name="SCRIPT_OPTIONS" value="package --disable-sandbox preview-documentation" />
<option name="INDEPENDENT_SCRIPT_WORKING_DIRECTORY" value="true" />
<option name="SCRIPT_WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="INDEPENDENT_INTERPRETER_PATH" value="true" />
<option name="INTERPRETER_PATH" value="/usr/local/bin/bash" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="EXECUTE_IN_TERMINAL" value="true" />
<option name="EXECUTE_SCRIPT_FILE" value="false" />
<envs />
<method v="2" />
</configuration>
</component>
16 changes: 16 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"object": {
"pins": [
{
"package": "SwiftDocCPlugin",
"repositoryURL": "https://github.com/apple/swift-docc-plugin",
"state": {
"branch": null,
"revision": "3303b164430d9a7055ba484c8ead67a52f7b74f6",
"version": "1.0.0"
}
}
]
},
"version": 1
}
14 changes: 10 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,16 @@ let package = Package(
name: "NdArray",
targets: ["NdArray"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
],
dependencies: {
// https://apple.github.io/swift-docc-plugin/documentation/swiftdoccplugin/
var deps: [PackageDescription.Package.Dependency] = []
#if swift(>=5.6.0)
deps.append(
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0")
)
#endif
return deps
}(),
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
[![Swift Version](https://img.shields.io/badge/swift-5.7-blue.svg)](https://swift.org)
![Platform](https://img.shields.io/badge/platform-macOS|iOS|tvOS|whatchOS-lightgray.svg)
![Build](https://github.com/dastrobu/NdArray/actions/workflows/ci.yaml/badge.svg)
[![documentation](https://github.com/dastrobu/NdArray/raw/main/docs/badge.svg?sanitize=true)](https://dastrobu.github.io/NdArray/)

N dimensional array package for numeric computing in [Swift](https://swift.org).

Expand Down Expand Up @@ -712,4 +711,4 @@ Some features would be nice to have at some time but currently out of scope.

## Docs

Read the generated [docs](https://dastrobu.github.io/NdArray).
Read the generated [docs](https://dastrobu.github.io/NdArray/documentation/ndarray).
2 changes: 2 additions & 0 deletions Sources/NdArray/NdArray.swift
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import Darwin
import Accelerate

/// Memory layout for contiguous data
public enum Contiguous {
case C
case F
}

/// Array for dimensional data.
open class NdArray<T>: CustomDebugStringConvertible,
CustomStringConvertible {

Expand Down
1 change: 1 addition & 0 deletions Sources/NdArray/matrix/Matrix.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import Darwin
import Accelerate

/// Special NdArray subtype for two dimensional data.
open class Matrix<T>: NdArray<T>, Sequence {

/// flag to indicate if this matrix is a square matrix
Expand Down
1 change: 1 addition & 0 deletions Sources/NdArray/vector/Vector.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public enum SortOrder {
case descending
}

/// Special NdArray subtype for one dimensional data.
open class Vector<T>: NdArray<T>, Sequence {
public required init(empty count: Int) {
super.init(empty: count)
Expand Down
Loading

0 comments on commit b60929e

Please sign in to comment.