qri

command module
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2021 License: GPL-3.0 Imports: 3 Imported by: 0

README

qri

Qri GoDoc License Codecov CI

Qri CLI

logo
a dataset version control system built on the distributed web

Welcome

Question Answer
"I want to learn about Qri" Read the official documentation
"I want to download Qri" Download Qri or brew install qri-io/qri/qri
"I have a question" Create an issue and use the label 'question'
"I found a bug" Create an issue and use the label 'bug'
"I want to help build the Qri backend" Read the Contributing guides
"I want to build Qri from source" Build Qri from source

qri is a global dataset version control system built on the distributed web

Breaking that down:

  • global so that if anyone, anywhere has published work with the same or similar datasets, you can discover it.
  • Specific to datasets because data deserves purpose-built tools
  • version control to keep data in sync, attributing all changes to authors
  • On the distributed web to make all of the data published on qri simultaneously available, letting peers work on data together.

If you’re unfamiliar with version control, particularly the distributed kind, well you're probably viewing this document on github — which is a version control system intended for code. Its underlying technology – git – popularized some magic sauce that has inspired a generation of programmers and popularized concepts at the heart of the distributed web. Qri is applying that family of concepts to four common data problems:

  1. Discovery Can I find data I’m looking for?
  2. Trust Can I trust what I’ve found?
  3. Friction Can I make this work with my other stuff?
  4. Sync How do I handle changes in data?

Because qri is global and content-addressed, adding data to qri also checks the entire network to see if someone has added it before. Since qri is focused solely on datasets, it can provide meaningful search results. Every change on qri is associated with a peer, creating an audit-able trail you can use to quickly see what has changed and who has changed it. All datasets on qri are automatically described at the time of ingest using a flexible schema that makes data naturally inter-operate. Qri comes with tools to turn all datasets on the network into a JSON API with a single command. Finally, all changes in qri are tracked & synced.

Building From Source

To build qri you'll need the go programming language on your machine.

$ git clone https://github.com/qri-io/qri
$ cd qri
$ make install

If this is your first time building, this command will have a lot of output. That's good! Its means it's working :) It'll take a minute or two to build.

After this is done, there will be a new binary qri in your ~/go/bin directory if using go modules, and $GOPATH/bin directory otherwise. You should be able to run:

$ qri help

and see help output.

Building on Windows

To start, make sure that you have enabled Developer Mode. A library that we depend on needs it enabled in order to properly handle symlinks. If not done, you'll likely get the error message "A required privilege is not held by the client".

You should not need to Run As Administrator to build or run qri. We do not recommend using administrator to run qri.

Shell

For your shell, we recommend using msys2. Other shells, such as cmd, Powershell, or cygwin may also be usable, but msys2 makes it easy to install our required dependencies. IPFS also recommends msys2, and qri is built on top of IPFS.

Dependencies

Building depends upon having git and make installed. If using msys2, you can easily install these by using the package manager "pacman". In a shell, type:

pacman -S git make

Assuming you've also installed go using the official Windows installer linked above, you will also need to add go to your PATH by modifying your environment variable. See the next section on "Environment variables" for more information.

Due to how msys2 treats the PATH variable, you also need to add a new environment variable MSYS2_PATH_TYPE, with the value inherit, using the same procedure.

Once these steps are complete, proceed to building.

Building on Rasberry PI

On a Raspberry PI, you'll need to increase your swap file size in order to build. Normal desktop and server linux OSes should be fine to proceed to building.

One symptom of having not enough swap space is the go install command producing an error message ending with:

link: signal: killed

To increase your swapfile size, first turn off the swapfile:

sudo dphys-swapfile swapoff

Then edit /etc/dphys-swapfile as root and set CONF_SWAPSIZE to 1024.

Finally turn on the swapfile again:

sudo dphys-swapfile swapon

Otherwise linux machines with reduced memory will have other ways to increase their swap file sizes. Check documentation for your particular machine.

Packages

Qri is comprised of many specialized packages. Below you will find a summary of each package.

Package Go Docs Go Report Card Description
api Go Docs report user accessible layer, primarily made for communication with our frontend webapp
cmd Go Docs report our command line interface
config Go Docs report user configuration details, includes peer's profile
lib Go Docs report takes arguments from the cmd and api layer and forms proper requests to call to the action layer
p2p Go Docs report the peer to peer communication layer of qri
repo Go Docs report the repository: saving, removing, and storing datasets, profiles, and the config
dataset Go Docs report the blueprint for a dataset, the atoms that make up qri
registry Go Docs report the blueprint for a registry: the service that allows profiles to be unique and datasets to be searchable
starlib Go Docs report the starlark standard library available for qri transform scripts
qfs Go Docs report "qri file sytem" is Qri's file system abstraction for getting & storing data from different sources
ioes Go Docs report package to handle in, out, and error streams: gives us better control of where we send output and errors
jsonschema Go Docs report used to describe the structure of a dataset, so we can validate datasets and determine dataset interop
Outside Libraries

The following packages are not under Qri, but are important dependencies, so we display their latest versions for convenience.

Package Version
ipfs ipfs version
This documentation has been adapted from the Cycle.js documentation.

Documentation

Overview

Qri is a distributed dataset version control tool. Bigger than a spreadsheet, smaller than a database, datasets are all around us. Use Qri to browse, download, create, fork, and publish datasets on a peer-to-peer network that works both on and offline.

more info at: https://qri.io

Directories

Path Synopsis
api
Package api implements a JSON-API for interacting with a qri node
Package api implements a JSON-API for interacting with a qri node
auth
key
key/test
Package test contains predefined set of Keys for testing.
Package test contains predefined set of Keys for testing.
Package base defines business that operates on local data.
Package base defines business that operates on local data.
archive
Package archive creates and consumes high-fidelity conversions of dataset documents for export & import
Package archive creates and consumes high-fidelity conversions of dataset documents for export & import
dsfs
Package dsfs glues datsets to cafs (content-addressed-file-system)
Package dsfs glues datsets to cafs (content-addressed-file-system)
dsfs/dstest
Package dstest defines an interface for reading test cases from static files leveraging directories of test dataset input files & expected output files
Package dstest defines an interface for reading test cases from static files leveraging directories of test dataset input files & expected output files
fill
Package fill assigns arbitrary values to struct fields using reflection.
Package fill assigns arbitrary values to struct fields using reflection.
cmd
Package cmd defines the CLI interface.
Package cmd defines the CLI interface.
generate
Package generate is a command that creates a bash completion file for qri
Package generate is a command that creates a bash completion file for qri
Package config encapsulates qri configuration options & details.
Package config encapsulates qri configuration options & details.
migrate
Package migrate defines migrations for qri configuration files
Package migrate defines migrations for qri configuration files
docs module
Package dsref defines structure and syntax for referring to a dataset
Package dsref defines structure and syntax for referring to a dataset
Package event implements an event bus.
Package event implements an event bus.
fsi
Package fsi defines qri file system integration: representing a dataset as files in a directory on a user's computer.
Package fsi defines qri file system integration: representing a dataset as files in a directory on a user's computer.
Package lib implements core qri business logic.
Package lib implements core qri business logic.
Package logbook records and syncs dataset histories.
Package logbook records and syncs dataset histories.
logsync
Package logsync synchronizes logs between logbooks across networks
Package logsync synchronizes logs between logbooks across networks
oplog
Package oplog is an operation-based replicated data type of append-only logs oplog has three main structures: logbook, log, and op A log is a sequence of operations attributed to a single author, designated by a private key.
Package oplog is an operation-based replicated data type of append-only logs oplog has three main structures: logbook, log, and op A log is a sequence of operations attributed to a single author, designated by a private key.
p2p
Package p2p implements qri peer-to-peer communication.
Package p2p implements qri peer-to-peer communication.
test
Package p2ptest defines utilities for qri peer-2-peer testing
Package p2ptest defines utilities for qri peer-2-peer testing
Package profile defines a qri peer profile
Package profile defines a qri peer profile
Package registry defines primitives for keeping centralized repositories of qri types (peers, datasets, etc).
Package registry defines primitives for keeping centralized repositories of qri types (peers, datasets, etc).
regclient
Package regclient defines a client for interacting with a registry server
Package regclient defines a client for interacting with a registry server
regserver
Package regserver provides a mock registry server for testing purposes
Package regserver provides a mock registry server for testing purposes
regserver/handlers
Package handlers creates HTTP handler functions for registry interface implementations
Package handlers creates HTTP handler functions for registry interface implementations
Package remote implements syncronization between qri instances
Package remote implements syncronization between qri instances
registry
Package registry defines primitives for keeping centralized repositories of qri types (peers, datasets, etc).
Package registry defines primitives for keeping centralized repositories of qri types (peers, datasets, etc).
registry/regclient
Package regclient defines a client for interacting with a registry server
Package regclient defines a client for interacting with a registry server
registry/regserver
Package regserver provides a mock registry server for testing purposes
Package regserver provides a mock registry server for testing purposes
registry/regserver/handlers
Package handlers creates HTTP handler functions for registry interface implementations
Package handlers creates HTTP handler functions for registry interface implementations
Package repo represents a repository of qri information Analogous to a git repository, repo expects a rigid structure filled with rich types specific to qri.
Package repo represents a repository of qri information Analogous to a git repository, repo expects a rigid structure filled with rich types specific to qri.
buildrepo
Package buildrepo initializes a qri repo
Package buildrepo initializes a qri repo
fs
Package fsrepo is a file-system implementation of repo
Package fsrepo is a file-system implementation of repo
ref
test/spec
Package spec contains a set of tests to ensure a repo implementation conforms to expected behaviors, calling RunRepoTests on a given repo implementation should pass all checks in order to properly work with Qri.
Package spec contains a set of tests to ensure a repo implementation conforms to expected behaviors, calling RunRepoTests on a given repo implementation should pass all checks in order to properly work with Qri.
sql
preprocess
Package preprocess is a SQL query preprocessor.
Package preprocess is a SQL query preprocessor.
qds
Package stats defines a stats provider service, wrapping a cache & stats component calculation
Package stats defines a stats provider service, wrapping a cache & stats component calculation
run
Package run defines metadata about transform script execution
Package run defines metadata about transform script execution
startf
Package startf implements dataset transformations using the starlark programming dialect For more info on starlark check github.com/google/starlark
Package startf implements dataset transformations using the starlark programming dialect For more info on starlark check github.com/google/starlark
startf/ds
Package ds exposes the qri dataset document model into starlark Package ds defines the qri dataset object within starlark outline: ds ds defines the qri dataset object within starlark.
Package ds exposes the qri dataset document model into starlark Package ds defines the qri dataset object within starlark outline: ds ds defines the qri dataset object within starlark.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL