Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

Commit

Permalink
Renamed and set up Groups
Browse files Browse the repository at this point in the history
  • Loading branch information
philipbeadle committed Sep 19, 2019
1 parent cb0a05f commit 8206d87
Show file tree
Hide file tree
Showing 52 changed files with 2,254 additions and 1,217 deletions.
10 changes: 5 additions & 5 deletions .travis.yml
Expand Up @@ -2,18 +2,18 @@ dist: trusty
language: nix
script:
- ls
- mkdir holochain-basic-chat
- mkdir peer-chat
- shopt -s extglob
- mv !(holochain-basic-chat) holochain-basic-chat
- mv !(peer-chat) peer-chat
- ls
- cd holochain-basic-chat
- cd peer-chat
- cd ..
- ls
- git clone https://github.com/holochain/personas-profiles.git
- cd personas-profiles
- nix-shell --run 'npm run hc:build'
- cd ..
- cd holochain-basic-chat
- cd peer-chat
- nix-shell --run 'cd ui-src && npm install && npm run test && cd .. && npm run prerelease'
- PACKAGE_NAME=$(node -p -e "require('./package.json').name")
- PACKAGE_VERSION=$(node -p -e "require('./package.json').version")
Expand All @@ -27,7 +27,7 @@ deploy:
secure: aGVJa0b6qCYKdrACDbUwoizQxPGiLjElyLsbiXmCOOazBanbixQKdTIZHehigW2DHGXLXJTf6yNGUiEagQm9OJE3ijRZ2Rwebqfx+3OwQNbXv0FJSZEp9rZIBe2nv4tKko3yrwBDXG8EIioP3CGHmDH4kmkYxQ2rMrc2MRMtz70jqEi1cyPWJ1K7qjOVT91qpfcAD8DL4hO8yhULnxfoBHdsDmV2xXL+z2ILKL5EU95KTnpnuYwJDZdqul+oHY3aOLMX38tOupxGSYrJZCIQyB8n4HgHEZiIO8BdyxD0Dh9PShbigTARYwUJtU5U0mQo0DOJi6ipDeXOoaxZqmUGLJ8ysfOVqba/7VHZiDSwDhYgU4/rRkH4VJTRP8rP/uw6CpNYjcUM7Kz9CQChwHdmYWxnavPbtEQ0Wx6AbgFcIZ0rVii9y15MaFtKHzAmk4oqP4rUOzrsmRIltX1ZWfKA3hoW9Be5clnpPXDKvW0dtedw3WGRINd8g0zPGE1UxJEaefPvfd4OB0NfWJb2LHxRlxe2fijaEzLGoM9OpNULhMEqi7wecwPICJwRrsGHTHV3eufqwNTCBH0pqKfqJjlf4yESnIZkuixL5l5epQJpBL3r75X50wfwUbr49630ji5PBNvs73Oq9qzConldn+zTWNglJcjg5gpMy1sNOTg0H1g=
file:
- "ui/$PACKAGE_NAME-$PACKAGE_VERSION.zip"
- "dna/holochain-basic-chat.dna.json"
- "dna/peer-chat.dna.json"
- "../personas-profiles/dna/personas-profiles.dna.json"
skip_cleanup: true
on:
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG-UNRELEASED.md
Expand Up @@ -5,7 +5,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
{{ version-heading }}

### Added
Added in unit tests that run in Jest (CI) and Storybook [#65](!https://github.com/holochain/holochain-basic-chat/pull/65)
Added in unit tests that run in Jest (CI) and Storybook [#65](!https://github.com/holochain/peer-chat/pull/65)
### Changed

### Deprecated
Expand Down
6 changes: 3 additions & 3 deletions CHANGELOG.md
Expand Up @@ -7,9 +7,9 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
### Added

### Changed
Added a second Diorama to avoid current error in Hachiko that is caused when an instance created in Diorama is not used in a test. PR [#59](!https://github.com/holochain/holochain-basic-chat/pull/59)
Generated a new Travis key PR [#61](!https://github.com/holochain/holochain-basic-chat/pull/61)
Updated to 0.0.25 [#62](!https://github.com/holochain/holochain-basic-chat/pull/62)
Added a second Diorama to avoid current error in Hachiko that is caused when an instance created in Diorama is not used in a test. PR [#59](!https://github.com/holochain/peer-chat/pull/59)
Generated a new Travis key PR [#61](!https://github.com/holochain/peer-chat/pull/61)
Updated to 0.0.25 [#62](!https://github.com/holochain/peer-chat/pull/62)
### Deprecated

### Removed
Expand Down
4 changes: 2 additions & 2 deletions LICENSE
Expand Up @@ -443,7 +443,7 @@ modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.

10. Automatic Licensing of Downstream Recipients.
10. Automatic Licensing of Downconversation Recipients.

Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
Expand Down Expand Up @@ -504,7 +504,7 @@ then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
license to downconversation recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
Expand Down
4 changes: 2 additions & 2 deletions MULTI-AGENT-CYPRESS-TESTING.md
Expand Up @@ -7,7 +7,7 @@ A little convoluted but works for now.

- clone the repo
```
git clone git@github.com:holochain/holochain-basic-chat.git
git clone git@github.com:holochain/peer-chat.git
```

- install node modules for the UI and build to the ui folder for Agent 2.
Expand Down Expand Up @@ -51,7 +51,7 @@ A little convoluted but works for now.
npm run cypress:open
```

- you can now see the 2 files of tests, register.js and rooms.js. These tests are designed to be run over and over again.
- you can now see the 2 files of tests, register.js and conversations.js. These tests are designed to be run over and over again.
- Click the run all tests button.

### Tests
Expand Down
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -17,7 +17,7 @@ A simple chat app designed to get new users up, running and developing on Holoch

- Get the latest released basic-chat
```
wget --header='Accept:application/octet-stream' https://api.github.com/repos/holochain/holochain-basic-chat/releases/assets/12405253 -O basic-chat.zip
wget --header='Accept:application/octet-conversation' https://api.github.com/repos/holochain/peer-chat/releases/assets/12405253 -O basic-chat.zip
unzip basic-chat.zip
```

Expand Down Expand Up @@ -106,7 +106,7 @@ or use the CLI directly
```
mkdir -p dna
cd dna-src
hc package --strip-meta -o ../dna/holo-chat.hcpkg
hc package --strip-meta -o ../dna/peer-chat.hcpkg
```

*Be careful!* If you are trying to network with other agents it is best to use a pre-built DNA. Any differences in compiler configuration may lead to the DNA hash being different and the nodes will not be able to communicate.
Expand Down
4 changes: 2 additions & 2 deletions Untitled.json
Expand Up @@ -2,7 +2,7 @@
"signal": {
"signal_type": "User",
"name": "new_message",
"arguments": "{\"room_id\":\"QmTuAgVbGEZruty7362x84qGC2PhrdNapX9upYhvuavitH\"}"
"arguments": "{\"conversation_id\":\"QmTuAgVbGEZruty7362x84qGC2PhrdNapX9upYhvuavitH\"}"
},
"instance_id": "holo-chat"
"instance_id": "peer-chat"
}
12 changes: 6 additions & 6 deletions conductor-config-agent1.toml
Expand Up @@ -15,8 +15,8 @@
file = "../DeepKey/dna/deepkey.dna.json"
hash = "QmbdxX9VaX1XYyaDgM36ob3ta96umUifaKJ4ySExxo7ckH"
[[dnas]]
id = "chat_dna"
file = "./dna/holochain-basic-chat.dna.json"
id = "peer_chat_dna"
file = "./dna/peer-chat.dna.json"
hash = "Qmf7mbu7B898UBtLte1y3AB8c6MskpsrV8yWjvyNsXxxSj"

[[instances]]
Expand All @@ -32,14 +32,14 @@
[instances.storage]
type = "memory"
[[instances]]
id = "holo-chat"
dna = "chat_dna"
id = "peer-chat"
dna = "peer_chat_dna"
agent = "test_agent1"
[instances.storage]
type = "memory"

[[bridges]]
caller_id = "holo-chat"
caller_id = "peer-chat"
callee_id = "personas-profiles"
handle = "p-p-bridge"

Expand All @@ -51,7 +51,7 @@
[[interfaces.instances]]
id = "dpki_happ"
[[interfaces.instances]]
id = "holo-chat"
id = "peer-chat"
[[interfaces.instances]]
id = "personas-profiles"

Expand Down
12 changes: 6 additions & 6 deletions conductor-config-agent1_1.toml
Expand Up @@ -16,8 +16,8 @@ keystore_file = "./agent1_1.keystore"
file = "../DeepKey/dna/deepkey.dna.json"
hash = "QmbdxX9VaX1XYyaDgM36ob3ta96umUifaKJ4ySExxo7ckH"
[[dnas]]
id = "chat_dna"
file = "./dna/holochain-basic-chat.dna.json"
id = "peer_chat_dna"
file = "./dna/peer-chat.dna.json"
hash = "Qmf7mbu7B898UBtLte1y3AB8c6MskpsrV8yWjvyNsXxxSj"

[[instances]]
Expand All @@ -33,14 +33,14 @@ keystore_file = "./agent1_1.keystore"
[instances.storage]
type = "memory"
[[instances]]
id = "holo-chat"
dna = "chat_dna"
id = "peer-chat"
dna = "peer_chat_dna"
agent = "test_agent1_1"
[instances.storage]
type = "memory"

[[bridges]]
caller_id = "holo-chat"
caller_id = "peer-chat"
callee_id = "personas-profiles"
handle = "p-p-bridge"

Expand All @@ -52,7 +52,7 @@ keystore_file = "./agent1_1.keystore"
[[interfaces.instances]]
id = "dpki_happ"
[[interfaces.instances]]
id = "holo-chat"
id = "peer-chat"
[[interfaces.instances]]
id = "personas-profiles"

Expand Down
12 changes: 6 additions & 6 deletions conductor-config-agent2.toml
Expand Up @@ -16,8 +16,8 @@ keystore_file = "./agent2.keystore"
file = "../DeepKey/dna/deepkey.dna.json"
hash = "QmbdxX9VaX1XYyaDgM36ob3ta96umUifaKJ4ySExxo7ckH"
[[dnas]]
id = "chat_dna"
file = "./dna/holochain-basic-chat.dna.json"
id = "peer_chat_dna"
file = "./dna/peer-chat.dna.json"
hash = "Qmf7mbu7B898UBtLte1y3AB8c6MskpsrV8yWjvyNsXxxSj"

[[instances]]
Expand All @@ -33,14 +33,14 @@ keystore_file = "./agent2.keystore"
[instances.storage]
type = "memory"
[[instances]]
id = "holo-chat"
dna = "chat_dna"
id = "peer-chat"
dna = "peer_chat_dna"
agent = "test_agent2"
[instances.storage]
type = "memory"

[[bridges]]
caller_id = "holo-chat"
caller_id = "peer-chat"
callee_id = "personas-profiles"
handle = "p-p-bridge"

Expand All @@ -52,7 +52,7 @@ keystore_file = "./agent2.keystore"
[[interfaces.instances]]
id = "dpki_happ"
[[interfaces.instances]]
id = "holo-chat"
id = "peer-chat"
[[interfaces.instances]]
id = "personas-profiles"

Expand Down
12 changes: 6 additions & 6 deletions conductor-config-agent4.toml
Expand Up @@ -16,8 +16,8 @@ keystore_file = "./agent4.keystore"
file = "../DeepKey/dna/deepkey.dna.json"
hash = "Qmavj2zmA2EyWyq9RS11Zz3FGcxiWXrcLd8onYiCHPpXoL"
[[dnas]]
id = "chat_dna"
file = "./dna/holochain-basic-chat.dna.json"
id = "peer_chat_dna"
file = "./dna/peer-chat.dna.json"
hash = "Qmat3Lk9Fb1x4pGMZRcm9vGcWQtFn6YcWUoYEr7VRk4cTz"

[[instances]]
Expand All @@ -33,14 +33,14 @@ keystore_file = "./agent4.keystore"
[instances.storage]
type = "memory"
[[instances]]
id = "holo-chat"
dna = "chat_dna"
id = "peer-chat"
dna = "peer_chat_dna"
agent = "test_agent4"
[instances.storage]
type = "memory"

[[bridges]]
caller_id = "holo-chat"
caller_id = "peer-chat"
callee_id = "personas-profiles"
handle = "p-p-bridge"

Expand All @@ -52,7 +52,7 @@ keystore_file = "./agent4.keystore"
[[interfaces.instances]]
id = "dpki_happ"
[[interfaces.instances]]
id = "holo-chat"
id = "peer-chat"
[[interfaces.instances]]
id = "personas-profiles"

Expand Down
6 changes: 3 additions & 3 deletions config.nix
Expand Up @@ -87,10 +87,10 @@ See:
owner = "holochain";

# repository name on github that release are deployed to
repo = "holochain-basic-chat";
repo = "peer-chat";

# canonical local upstream name as per `git remote -v`
upstream = "origin";
# canonical local upconversation name as per `git remote -v`
upconversation = "origin";
};
};
}
2 changes: 1 addition & 1 deletion default.nix
@@ -1,4 +1,4 @@
# This is an example of what downstream consumers of holonix should do
# This is an example of what downconversation consumers of holonix should do
# This is also used to dogfood as many commands as possible for holonix
# For example the release process for holonix uses this file
let
Expand Down
14 changes: 7 additions & 7 deletions dna-src/test/agent/messages.js
Expand Up @@ -8,28 +8,28 @@ module.exports = scenario => {
}

const testNewChannelParams = {
name: "test new stream",
name: "test new conversation",
description: "for testing...",
initial_members: [],
public: true
}

scenario('Can post a message to the stream and retrieve', async (s, t, {chat_instance_1}) => {
scenario('Can post a message to the conversation and retrieve', async (s, t, {chat_instance_1}) => {

const register_result = await chat_instance_1.call('chat', 'register', {name: 'chat_instance_1', avatar_url: ''})
console.log(register_result)
t.equal(register_result.Ok.length, 63)

const create_result = await chat_instance_1.call('chat', 'create_stream', testNewChannelParams)
const create_result = await chat_instance_1.call('chat', 'create_conversation', testNewChannelParams)
console.log(create_result)
const stream_addr = create_result.Ok
t.deepEqual(stream_addr.length, 46)
const conversation_addr = create_result.Ok
t.deepEqual(conversation_addr.length, 46)

const post_result = await chat_instance_1.call('chat', 'post_message', {stream_address: stream_addr, message: testMessage})
const post_result = await chat_instance_1.call('chat', 'post_message', {conversation_address: conversation_addr, message: testMessage})
console.log(post_result)
t.notEqual(post_result.Ok, undefined, 'post should return Ok')

const get_message_result = await chat_instance_1.call('chat', 'get_messages', {address: stream_addr})
const get_message_result = await chat_instance_1.call('chat', 'get_messages', {address: conversation_addr})
console.log(get_message_result)
t.deepEqual(get_message_result.Ok[0].entry.payload, testMessage.payload, 'expected to receive the message back')
})
Expand Down
12 changes: 6 additions & 6 deletions dna-src/test/index.js
Expand Up @@ -8,16 +8,16 @@ process.on('unhandledRejection', error => {
console.error('got unhandledRejection:', error);
});

const chat_dnaPath = "./dist/dna-src.dna.json"
const peer_chat_dnaPath = "./dist/dna-src.dna.json"
const personas_dnaPath = "../../personas-profiles/dna/personas-profiles.dna.json"

const chat_dna_1 = Diorama.dna(chat_dnaPath, 'chat_1')
const peer_chat_dna_1 = Diorama.dna(peer_chat_dnaPath, 'chat_1')
const personas_dna_1 = Diorama.dna(personas_dnaPath, 'personas_1', {uuid: 'agent1'})
const chat_dna_2 = Diorama.dna(chat_dnaPath, 'chat_2')
const peer_chat_dna_2 = Diorama.dna(peer_chat_dnaPath, 'chat_2')

const diorama_1 = new Diorama({
instances: {
chat_instance_1: chat_dna_1,
chat_instance_1: peer_chat_dna_1,
personas_instance_1: personas_dna_1
},
bridges: [
Expand All @@ -30,9 +30,9 @@ const diorama_1 = new Diorama({

const diorama_2 = new Diorama({
instances: {
chat_instance_1: chat_dna_1,
chat_instance_1: peer_chat_dna_1,
personas_instance_1: personas_dna_1,
chat_instance_2: chat_dna_2
chat_instance_2: peer_chat_dna_2
},
bridges: [
Diorama.bridge('p-p-bridge', 'chat_instance_1', 'personas_instance_1')
Expand Down

0 comments on commit 8206d87

Please sign in to comment.