Skip to content
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

fix(get): Get completely reworked to function better #520

Merged
merged 2 commits into from
Aug 23, 2018
Merged

Conversation

dustmop
Copy link
Contributor

@dustmop dustmop commented Aug 22, 2018

Get method written so that it is used by both cmd/ and api/. Follows the new
guideline set out by #519, moving nearly all the logic from lib/ to actions/.
Logic which is specific to the command-line, selecting parts of a dataset
using a path, moved up a level to the cmd/ package.

Get can now be used to retrieve info about local and remote datasets, from
both command-line and api server. Fixes #509, #479 #397, and possibly others.

Clears the way to merging body into get in a future PR.

Breaks ability to get multiple datasets at once.

@ghost ghost assigned dustmop Aug 22, 2018
@ghost ghost added the in progress label Aug 22, 2018
Get method written so that it is used by both cmd/ and api/. Follows the new
guideline set out by #519, moving nearly all the logic from lib/ to actions/.
Logic which is specific to the command-line, selecting parts of a dataset
using a path, moved up a level to the cmd/ package.

Get can now be used to retrieve info about local and remote datasets, from
both command-line and api server. Fixes #509, #479 #397, and possibly others.

Clears the way to merging `body` into `get` in a future PR.

Breaks ability to `get` multiple datasets at once.
@b5 b5 self-requested a review August 23, 2018 18:14
Copy link
Member

@b5 b5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

verrrrrrry 👌. Some quick request for comments but this looks great. Mergable once comments are added.

Path: o.Path,
Format: o.Format,
Concise: o.Concise,
// TODO: It is more efficient to only request data in the Path field, but for now
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glad this is here. We should def get an RFC going around selectors (querying a dataset), dataset pathing, subsets, and _possibly dataset concatenation.

lib/datasets.go Outdated

// Select selects details of one or more datasets
func (r *DatasetRequests) Select(p *SelectParams, res *[]byte) (err error) {
// Get a dataset
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be great if this provided a little more detail:

// Get fetches a dataset head (commit, structure, meta, viz, transform) for a given reference
// The returned *repo.DatasetRef.Dataset field  will be populated if a dataset is found

@@ -12,6 +12,8 @@ import (
"github.com/qri-io/qri/repo"
)

// TODO: Remove this, move other functions to another file, possibly in lib/.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

erm, I think this should stay for now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

erm, nope, nvm plz ignore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants