Giter VIP home page Giter VIP logo

Comments (10)

rrooij avatar rrooij commented on May 22, 2024 1

@pmoura Thanks a lot for the nice diagrams, they look great! I especially like the xref diagram as a quick way of showing people the current architecture.

from terminusdb.

GavinMendelGleason avatar GavinMendelGleason commented on May 22, 2024

Brilliant. I'll give it a go. We'll be getting rid of the serd dependency as soon as we can. Hopefully within the next month.

from terminusdb.

pmoura avatar pmoura commented on May 22, 2024

Forgot a step. After the queries, exit Prolog and type:

$ lgt2svg

If you used the pack to load Logtalk, you will likely need to dig the path to the lgt2svg script. In my case, it's stored at ~/lib/swipl/pack/logtalk/logtalk-3.30.0/tools/diagrams/lgt2svg.sh. Requires a recent Graphviz installation.

from terminusdb.

pmoura avatar pmoura commented on May 22, 2024

With my recent work on GitHub actions and workflows for Logtalk and Prolog repos, if you enable actions tab in this repo settings, I'm happy to submit a PR with a workflow that will (re)generate and publish the diagrams automatically on push events.

from terminusdb.

rrooij avatar rrooij commented on May 22, 2024

@pmoura We got rid of the serd and hdt dependency in the dev branch, so might be easier for you to work with now.

from terminusdb.

pmoura avatar pmoura commented on May 22, 2024

Great! But the required terminus_store_prolog pack cannot currently be installed on macOS (which I'm using). I'm looking into this issue first.

from terminusdb.

pmoura avatar pmoura commented on May 22, 2024

Can you create a gh-pages branch and then go into the repo settings and set GitHub Pages to build from this branch? That will allow the diagrams to be published and browsed without disturbing anything.

from terminusdb.

pmoura avatar pmoura commented on May 22, 2024

Meanwhile I have upload the diagrams for the dev branch at 6e079ec to:

https://logtalk.org/files/terminus-server-diagrams/

There are two sets of diagrams:

  • directory and file diagrams
  • entity and xref diagrams

All diagrams are linked to the source code. The zoom icon allows looking into a sub-diagram with details (e.g. going from directory to its files or from a module interface to its xref details). Most nodes and edges have live links to the directory, files, and file lines in the GitHub repos. Some entry points are:

The diagrams were generated using the query:

logtalk_load(diagrams(loader),
working_directory(TerminusStore,TerminusStore), getenv('HOME', Home), file_search_path(swi, SWIHome),
     atom_concat(SWIHome, '/library', Library),
     atom_concat(SWIHome, '/library/http', SWIhttp),
     atom_concat(SWIHome, '/library/pldoc', SWIpldoc),
     atom_concat(SWIHome, '/library/semweb', SWIsemweb),
     git_hash(Hash, []),
     atomic_list_concat(['https://github.com/terminusdb/terminus-server/tree/',Hash,'/'], Git),
     diagrams::rdirectory(terminus_server, '.', [
         title('terminus-server - open source model driven graph database for knowledge graph representation'),
        zoom(true),
        path_url_prefixes(TerminusStore, Git, ''),
        path_url_prefixes(SWIhttp, 'https://github.com/SWI-Prolog/packages-http/tree/master/', ''),
        path_url_prefixes(SWIpldoc, 'https://github.com/SWI-Prolog/packages-pldoc/tree/master/', ''),
        path_url_prefixes(SWIsemweb, 'https://github.com/SWI-Prolog/packages-semweb/tree/master/', ''),
        path_url_prefixes(Library, 'https://github.com/SWI-Prolog/swipl-devel/tree/master/library/', ''),
        omit_path_prefixes([TerminusStore, SWIhttp, SWIpldoc, SWIsemweb, Library, Home]),
        directory_paths(true),
        exclude_directories([examples, storage, 'terminus-schema', 'terminus-server-diagrams', tmp, utils]),
        layout(top_to_bottom)
    ]).

The query is run after loading a modified start.pl file where the single change is in its first line:

#!/usr/bin/env swilgt

from terminusdb.

pmoura avatar pmoura commented on May 22, 2024

As you noticed, the nodes and edges URLs link to exact locations in the source code at GitHub. That works by linking to a specific commit (as you can see in the query above that generates the diagrams). As a consequence, the locations will become invalid as new commits are pushed. But it's easy to define an automatic workflow that updates the diagrams everytime a commit is pushed (e.g. to the dev branch) and that publishes the diagrams (e.g. to the gh-pages if you're not using it so that you can browse the diagrams at https://terminusdb.github.io/terminus-server/. Let me know if you want me to submit a pull request with the workflow (it uses GitHub actions and thus you'll need to enable both GitHub Actions and GitHub Pages in the repo settings).

from terminusdb.

matko avatar matko commented on May 22, 2024

Closing due to age of issue.

from terminusdb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.