-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial TrustGraph integration (backend) #104
Conversation
b8d7087
to
b084baf
Compare
a70ebff
to
f959a98
Compare
9a32832
to
d2cc67f
Compare
049c700
to
a98edea
Compare
#[derive(Debug, Serialize, Deserialize, SerializedBytes)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct FollowTopicInput { | ||
pub topic: String, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pub topic: String, | |
pub topic: Option<String>, |
pub struct FollowInput { | ||
pub agent: AgentPubKey, | ||
pub follow_topics: Vec<FollowTopicInput>, | ||
pub follow_other: bool, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pub follow_other: bool, |
@@ -419,6 +551,23 @@ pub fn get_mews_with_mention(agent_pub_key: AgentPubKey) -> ExternResult<Vec<Fee | |||
get_mews_from_path(path) | |||
} | |||
|
|||
fn get_mews_from_path_by_author(path: Path, author: AgentPubKey) -> ExternResult<Vec<FeedMew>> { | |||
let mut full_path = path; | |||
full_path.append_component(hdk::hash_path::path::Component::from("by".to_string())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nuke the "by"
full_path.append_component(hdk::hash_path::path::Component::from("by".to_string())); |
1b82118
to
df16bfd
Compare
a89f4d7
to
4c217cc
Compare
@@ -0,0 +1,714 @@ | |||
use hdk::prelude::*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO delete this file after harvesting the useful functions
dnas/mewsfeed/helpers/src/lib.rs
Outdated
@@ -0,0 +1,38 @@ | |||
use hdk::prelude::*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move to top level /crates/helpers
or break out into its own repo
or PR it to
https://github.com/holochain/hc-utils
@@ -27,6 +30,116 @@ pub fn get_all_mews_with_context(_: ()) -> ExternResult<Vec<FeedMew>> { | |||
Ok(feedmews) | |||
} | |||
|
|||
#[hdk_extern] | |||
pub fn get_trusted_mews_with_context(input: RecommendedInput) -> ExternResult<Vec<FeedMew>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adapt to get links by hashtag, then FILTER by author (of link!)
6e899e3
to
9218ad9
Compare
c5f3885
to
31e4fcc
Compare
25980ad
to
4bc84b7
Compare
We're gearing up for the first release now and the question is arising: do you think we will be able to launch with it, or should we go ahead without and introduce it after? We did talk about it being included in the first release in the What's Happening newsletter. Was great to see you at dweb camp, hope everything's well, @harlantwood ! |
Remove TrustGraph zome call infra from frontend refactor(ui): make trust graph wrapper a vue input component Create vec of trust atoms on follow Update tests with new `follow` signature Write test for following with TAs; Comment out most tests CI reverts Cleanup Fix CI step name Tests from develop, plus follow test from TrustGraph Comment out our test; add dep Rough cut of Recommended mews Sweettest infra Iterate on Recommended feed DNA func Iterate Iterate Recommended MewsFeed Follow -- reinstate trust atom creation, better Refactor out call_local_zome function Work on tests, cleanup Test fixes; run sweettest in CI Lock TG to git ref Commit old flake.lock file (holonix 2023-03-25) to avoid infinite hang on Mac M1 Try latest holonix Fix CI command Update TG git ref Use latest TG git repo CI: restore rust from branch; run both runners even if 1 fails Always cache rust builds Test helpers Iterate on tests test:watch FollowInput in TS & tryorama Add path: hashtag.#mytag.by.MYPUBKEY Test of Recommeneded Only show recent mews in Recommended add payload so it fails for right reason Update nix action to v20 sleet without tokio -- hangs on CI Update flake Simplify test WIP test refactor broken Test refactor working (thx GPT4) More test helper refactor Refactor tests Refactor tests Refactor tests Refactor tests Refactor tests Refactor tests Refactor tests CPU burning sleep which may work on CI... Try commenting out test with sleep for CI Run tests serial, not parallel; begin test on ordering feed; better duration handling Clippy fixes Update flake.lock Update Cargo.lock Move tests to new dna Order TrustFeedMews by topic weight Lint Update lockfiles Update "follow" code in frontend First cut at "Your Basket" view Basket feed getting closer... TrustAtom Vue work Frontend tweaks and design notes flake lock Update hdk/hdi + flake lock Various updates Try to fix nix, breaking on CI: https://github.com/GeekGene/MewsFeed/actions/runs/4761734440/jobs/8463253867 Use alternative hc cahcix cache as well Run TG on push; push to holochain cache -- CI is timing out in mewsfeed org Reduce nix storage space Check disk space on CI Test assert eq Less debugging Update flake migrate tests to ts step 1: mv Commit old sweet tests, and start sour tests Convert "recommended" func test rs -> ts Work on trust feed Reinstate much of trustgraph infra + trust feed trustgraph zome infra, test fixes Fix up types & tests Cleanup/refactor Cleanup Revert frontend changes -- split off to own branch rm ui flake lock Follow topics + refactor helpers Convert more sweet -> sour tests Await asyncs; fix zome Minor test fixes and comments Update flake lock Fix some instances of `follow` in tests Good stuff Link Types Ignore TAs starting with __
a676be3
to
7ef1b56
Compare
Unfortunately I have too many balls in the air, and need to reduce those in order to do a good job with a smaller number. So with sadness I’m putting TrustGraph/MewsFeed integration on hold, to be resumed if/when bandwidth is available. If anyone in the community wants to pick it up in the meantime I’m happy to advise. |
There is much useful context and short- and long- term discussion of TrustGraph integration in #94.
This PR is backend only, no frontend, to prepare for future full TrustGraph integration.
Feed
Following
__FOLLOW__
or similar)Unfollowing
Consider