Skip to content

Commit

Permalink
beta-01 upgrade, + commented include
Browse files Browse the repository at this point in the history
  • Loading branch information
nphias committed Mar 17, 2023
1 parent 6909658 commit bada1ea
Show file tree
Hide file tree
Showing 16 changed files with 2,162 additions and 850 deletions.
18 changes: 10 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
## system files
.DS_Store

target/
node_modules/
dist/
.cargo/
/node_modules/
/dist/
/target/
/.cargo/
/tests/node_modules/
*.happ
*.webhapp
*.zip
*.dna
.hc*
dna/workdir/*.dna
dna/workdir/*.happ
dna/workdir/*.webhapp
*.tsbuildinfo
.hc
.running
5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ members = [
]

[workspace.dependencies]
hdi = "0.2.0"
hdk = "0.1.0"
holochain = "0.1.0"
hdi = "0.2.1"
hdk = "0.1.1"
serde = "1"
derive-new = "0.5"

Expand Down
58 changes: 58 additions & 0 deletions DEVELOPER.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@

## Environment Setup

> PREREQUISITE: set up the [holochain development environment](https://developer.holochain.org/docs/install/).
Enter the nix shell by running this in the root folder of the repository:

```bash
nix develop
npm install
```

**Run all the other instructions in this README from inside this nix-shell, otherwise they won't work**.

## Running 2 agents

```bash
npm start
```

This will create a network of 2 nodes connected to each other and their respective UIs.
It will also bring up the Holochain Playground for advanced introspection of the conductors.

## Running the backend tests

```bash
npm test
```

## Bootstrapping a network

Create a custom network of nodes connected to each other and their respective UIs with:

```bash
AGENTS=3 npm run network
```

Substitute the "3" for the number of nodes that you want to bootstrap in your network.
This will also bring up the Holochain Playground for advanced introspection of the conductors.

## Packaging

To package the web happ:
``` bash
npm run package
```

You'll have the `forum.webhapp` in `workdir`. This is what you should distribute so that the Holochain Launcher can install it.
You will also have its subcomponent `forum.happ` in the same folder`.

## Documentation

This repository is using these tools:
- [NPM Workspaces](https://docs.npmjs.com/cli/v7/using-npm/workspaces/): npm v7's built-in monorepo capabilities.
- [hc](https://github.com/holochain/holochain/tree/develop/crates/hc): Holochain CLI to easily manage Holochain development instances.
- [@holochain/tryorama](https://www.npmjs.com/package/@holochain/tryorama): test framework.
- [@holochain/client](https://www.npmjs.com/package/@holochain/client): client library to connect to Holochain from the UI.
- [@holochain-playground/cli](https://www.npmjs.com/package/@holochain-playground/cli): introspection tooling to understand what's going on in the Holochain nodes.
28 changes: 23 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,28 @@ Initial Proof-of-Concept of MAP Layer 0
For the use cases in scope for the initial slice, see [wiki](https://github.com/evomimic/map-proto1/wiki)

## Tech Stack:
* nix 2.3.12
* rust 1.64.0
* holochain 0.0.165 (note: the project is known to NOT build on the Mac when using holochain 0.0.175)
* hdk 0.0.163
* hdi 0.1
* rust 1.66.0
* nix 2.13.2
* holochain 0.1.x
* hdk 0.1.1
* hdi 0.2.1

## Setup:

If not already done before, Enable Nix commands and Nix flakes for your use:

```bash
mkdir -p ~/.config/nix
echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf
```

## Install and run tests:

```bash
nix develop
npm install
npm test / npm start

```


12 changes: 6 additions & 6 deletions crates/integrity-zomes/holon_integ/src/holon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pub mod holon {
use std::collections::BTreeMap;
// use hdi::prelude::hash_blake2b;
// use hdk::prelude::holo_hash::*;
use hc_zome_integrity_type_desc::descriptor::descriptor::{HolonDescriptor, IntegerDescriptor, StringDescriptor, BooleanDescriptor, SemanticVersion};
// use hc_zome_integrity_type_desc::descriptor::descriptor::{HolonDescriptor, IntegerDescriptor, StringDescriptor, BooleanDescriptor, SemanticVersion};

//use hdk::prelude::EntryHash;

Expand All @@ -25,9 +25,9 @@ pub mod holon {
namespace_id: u8,
local_id: u8,
// created_at: Timestamp,
version: SemanticVersion,
//version: SemanticVersion,
properties: BTreeMap<String, PropertyValue>,
descriptor: HolonDescriptor,
// descriptor: HolonDescriptor,
// actions: ActionMap,
//relationships: RelationshipMap
}
Expand All @@ -45,14 +45,14 @@ pub mod holon {
#[derive(Serialize, Deserialize, Debug, Clone)]
#[serde(rename_all = "camelCase")]
pub struct IntegerValue<T> {
descriptor: IntegerDescriptor,
//descriptor: IntegerDescriptor,
value: T,
}

#[derive(Serialize, Deserialize, Debug, Clone)]
#[serde(rename_all = "camelCase")]
pub struct StringValue {
descriptor: StringDescriptor,
//descriptor: StringDescriptor,
value: String,
}
/*
Expand All @@ -72,7 +72,7 @@ pub mod holon {
#[derive(Serialize, Deserialize, Debug, Clone)]
#[serde(rename_all = "camelCase")]
pub struct BooleanValue {
descriptor: BooleanDescriptor,
//descriptor: BooleanDescriptor,
value: bool,
fuzzy_value: UnitInterval,
}
Expand Down
19 changes: 19 additions & 0 deletions crates/workdir/dna.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
manifest_version: "1"
name: map-proto1
integrity:
network_seed: ~
properties: ~
origin_time: 1667042009524230
zomes:
- name: hc_zome_integrity_type_desc
hash: ~
bundled: "../../target/wasm32-unknown-unknown/release/hc_zome_integrity_type_desc.wasm"
dependencies: ~
coordinator:
zomes:
- name: hc_zome_coordinator_externs
hash: ~
bundled: "../../target/wasm32-unknown-unknown/release/hc_zome_coordinator_externs.wasm"
dependencies:
- name: hc_zome_integrity_type_desc
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit bada1ea

Please sign in to comment.