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

Support committing a single dataset when multiple have changes #69

Closed
UberMouse opened this issue May 4, 2020 · 3 comments · Fixed by #131
Closed

Support committing a single dataset when multiple have changes #69

UberMouse opened this issue May 4, 2020 · 3 comments · Fixed by #131
Milestone

Comments

@UberMouse
Copy link

No description provided.

@UberMouse UberMouse changed the title Support staging changes Support committing a single dataset when multiple have changes May 4, 2020
@craigds craigds added this to the 0.4 milestone Jun 2, 2020
@craigds
Copy link
Member

craigds commented Jun 2, 2020

tagging this for milestone 0.4, but we need to flesh out exactly what we want it to look like shortly.

As a straw man for discussion, how about

#  commits all of dataset1, and one feature in dataset2
sno commit dataset1 dataset2:fid=1

Since commit doesn't yet take any positional args in sno or in git, I think this could be a sensible approach.

It would naturally lead into this

# commit pieces interactively, like `git add -p`
sno commit -i
sno commit --interactive

@olsen232
Copy link
Collaborator

Started work on this today - committing a partial working copy, works, but then the working-copy has its "tree" field set to the HEAD then it shows as having no diffs.

Not sure how much work this is to fix: maybe it should be in 0.5 as part of the dataset v2.

@craigds
Copy link
Member

craigds commented Jun 15, 2020

IMO that's probably not particularly hard to fix; we just have to delete particular things from the tracking table instead of truncating the whole table.

The tracking table contains both table_name and pk:

sqlite> .schema %track%
CREATE TABLE IF NOT EXISTS ".sno-track" (
                    table_name TEXT NOT NULL,
                    pk TEXT NULL,
                    CONSTRAINT ".sno-track_pk" PRIMARY KEY (table_name, pk)
                );
sqlite>

so it seems reasonably straightforward to delete from selectively. The main difficulty of implementing this might just be in refactoring the various layers of python callbacks so the filter information can be passed through to the bit that actually does the delete

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 a pull request may close this issue.

3 participants