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

Add --preserve option #383

Merged
merged 7 commits into from
May 4, 2019
Merged

Add --preserve option #383

merged 7 commits into from
May 4, 2019

Conversation

humCopper
Copy link
Contributor

Adds preserve option like in #327.

README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
@jarun jarun requested a review from rachmadaniHaryono May 4, 2019 02:08
README.md Outdated Show resolved Hide resolved
@rachmadaniHaryono
Copy link
Collaborator

@jarun can we add annotation for update_rec function?

also @humCopper can you add test for this?

@jarun
Copy link
Owner

jarun commented May 4, 2019

can we add annotation

Sure!

@humCopper
Copy link
Contributor Author

I don't know how to do the tests. Are there any tutorials I can follow?

@jarun
Copy link
Owner

jarun commented May 4, 2019

I don't know how to do the tests. Are there any tutorials I can follow?

@rachmadaniHaryono please guide. Can this be a separate PR?

@rachmadaniHaryono
Copy link
Collaborator

Can this be a separate PR?

yes

for guide, kinda basic

  • first make sure you have virtual environment activated
  • install pytest
  • run pytest
  • create test function
  • run pytest again

@jarun jarun merged commit 04777b0 into jarun:master May 4, 2019
@jarun
Copy link
Owner

jarun commented May 4, 2019

OK, then! @humCopper please raise a new PR for the tests. I have merged this one. Thank you!

@rachmadaniHaryono rachmadaniHaryono removed their request for review May 4, 2019 15:43
@rachmadaniHaryono
Copy link
Collaborator

i remove myself and review on later pr

@jarun
Copy link
Owner

jarun commented May 4, 2019

OK. Thanks!

@jarun
Copy link
Owner

jarun commented May 4, 2019

@humCopper we need to revert this and you have to raise a fresh PR for the correct use-case.

The --preserve option is for the following cases:

buku -u
buku -u db_index

basically the cases where refreshdb() is called. I had forgotten the context and I assumed that you have understood the use-case clearly as you raised the PR directly.

For update_rec() with options, users can specify which fields to update already so `--preserve doesn't make sense.

Please make refreshdb() handle --preserve.

@jarun
Copy link
Owner

jarun commented May 12, 2019

@humCopper are you planning to modify the changes made in this PR to work for refreshdb()?

@humCopper
Copy link
Contributor Author

Not right now.

@github-actions github-actions bot locked and limited conversation to collaborators Jun 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants