Skip to content

Commit

Permalink
Merge pull request #1 from FabricLabs/fabric
Browse files Browse the repository at this point in the history
Migrate to Fabric
  • Loading branch information
martindale authored May 3, 2023
2 parents bbb7815 + d82ae3f commit 28210f3
Show file tree
Hide file tree
Showing 99 changed files with 208,746 additions and 653 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: npm test
on:
pull_request:
branches:
- '**'
push:
branches:
- master
jobs:
test:
name: Run tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v3
- name: Install Node.js on ${{ matrix.os }}
uses: actions/setup-node@v2
with:
node-version-file: '.nvmrc'
cache: 'npm'
cache-dependency-path: package-lock.json
- name: Install dependencies
run: npm ci
- name: Generate coverage report
run: npm run report:coverage
- name: Send coverage report
uses: codecov/codecov-action@v3.1.1
with:
directory: ./reports/
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16.17.1
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
dist: focal
language: node_js
node_js:
- 16.15.0
before_install:
- npm install -g codecov
after_success:
- npm run report:coverage
- codecov
109 changes: 109 additions & 0 deletions API.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
## Classes

<dl>
<dt><a href="#Clock">Clock</a> : <code>Object</code></dt>
<dd><p>Simple clock. Emits <code>tick</code> events at a specified interval.</p>
</dd>
<dt><a href="#Learner">Learner</a></dt>
<dd><p>Basic neural network support.</p>
</dd>
<dt><a href="#Sensemaker">Sensemaker</a> : <code>Object</code></dt>
<dd><p>Sensemaker is a Fabric-powered application, capable of running autonomously
once started by the user. By default, earnings are enabled.</p>
</dd>
</dl>

<a name="Clock"></a>

## Clock : <code>Object</code>
Simple clock. Emits `tick` events at a specified interval.

**Kind**: global class
<a name="Learner"></a>

## Learner
Basic neural network support.

**Kind**: global class

* [Learner](#Learner)
* [new Learner([settings])](#new_Learner_new)
* [.readChunk(address)](#Learner+readChunk) ⇒ <code>Buffer</code>
* [.writeChunk(address, value)](#Learner+writeChunk) ⇒ <code>Number</code>

<a name="new_Learner_new"></a>

### new Learner([settings])
Create a neural network.

**Returns**: [<code>Learner</code>](#Learner) - Instance of the network.

| Param | Type | Description |
| --- | --- | --- |
| [settings] | <code>Object</code> | Settings for the network. |

<a name="Learner+readChunk"></a>

### learner.readChunk(address) ⇒ <code>Buffer</code>
Read a memory cell.

**Kind**: instance method of [<code>Learner</code>](#Learner)
**Returns**: <code>Buffer</code> - Value of the memory cell.

| Param | Type | Description |
| --- | --- | --- |
| address | <code>Number</code> | Address of the cell. |

<a name="Learner+writeChunk"></a>

### learner.writeChunk(address, value) ⇒ <code>Number</code>
Write a buffer to memory.

**Kind**: instance method of [<code>Learner</code>](#Learner)
**Returns**: <code>Number</code> - Number of bytes written to the cell.

| Param | Type | Description |
| --- | --- | --- |
| address | <code>Number</code> | Address of the cell. |
| value | <code>Buffer</code> | Data to write to memory. |

<a name="Sensemaker"></a>

## Sensemaker : <code>Object</code>
Sensemaker is a Fabric-powered application, capable of running autonomously
once started by the user. By default, earnings are enabled.

**Kind**: global class
**Extends**: <code>Service</code>

* [Sensemaker](#Sensemaker) : <code>Object</code>
* [new Sensemaker([settings])](#new_Sensemaker_new)
* [.start()](#Sensemaker+start) ⇒ <code>Promise</code>
* [.stop()](#Sensemaker+stop) ⇒ <code>Promise</code>

<a name="new_Sensemaker_new"></a>

### new Sensemaker([settings])
Constructor for the Sensemaker application.

**Returns**: [<code>Sensemaker</code>](#Sensemaker) - Resulting instance of Sensemaker.

| Param | Type | Default | Description |
| --- | --- | --- | --- |
| [settings] | <code>Object</code> | <code>{}</code> | Map of configuration values. |
| [settings.port] | <code>Number</code> | <code>7777</code> | Fabric messaging port. |

<a name="Sensemaker+start"></a>

### sensemaker.start() ⇒ <code>Promise</code>
Start the process.

**Kind**: instance method of [<code>Sensemaker</code>](#Sensemaker)
**Returns**: <code>Promise</code> - Resolves once the process has been started.
<a name="Sensemaker+stop"></a>

### sensemaker.stop() ⇒ <code>Promise</code>
Stop the process.

**Kind**: instance method of [<code>Sensemaker</code>](#Sensemaker)
**Returns**: <code>Promise</code> - Resolves once the process has been stopped.
27 changes: 27 additions & 0 deletions DEPRECATIONS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Deprecations
## List
- [ ] mkdirp-promise
- [ ] har-validator
- [ ] multicodec
- [ ] uuid
- [ ] request
- [ ] multibase
- [ ] multicodec
- [ ] cids
- [ ] viz.js

## Log
```
npm WARN deprecated mkdirp-promise@5.0.1: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated multicodec@1.0.4: This module has been superseded by the multiformats module
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid@3.3.2: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated multibase@0.6.1: This module has been superseded by the multiformats module
npm WARN deprecated multibase@0.7.0: This module has been superseded by the multiformats module
npm WARN deprecated multicodec@0.5.7: This module has been superseded by the multiformats module
npm WARN deprecated cids@0.7.5: This module has been superseded by the multiformats module
npm WARN deprecated viz.js@1.8.2: no longer supported
```
2 changes: 2 additions & 0 deletions DEVELOPERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Developers
...should read "A CypherPunk's Manifesto" by Timothy May.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,19 @@ making sense of stuff.
remote APIs, caching that data in a local database, stitching that information
together to extrapolate additional context for previously sparse data, and
delivering that gained context via a simple, queryable API.

```html
<h1>Digital Intelligence is Here.</h1>
<p class="subtitle">Introducing <code>@sensemaker</code>, an organizer of information.</p>

<h2>The Power of Intelligence</h2>
<p><code>@sensemaker</code> provides robust intelligence gathering services, <strong>accumulating</strong> and <strong>organizing</strong> information from a set of configurable data streams to automatically construct new models and foster insight into complex systems.</p>
```

## Quick Start
```
npm i # install dependencies
npm start # run node
```

A basic web interface should now be provided at http://localhost
Loading

0 comments on commit 28210f3

Please sign in to comment.