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

adding import export session #2

Merged
merged 11 commits into from
Aug 26, 2024
Merged

adding import export session #2

merged 11 commits into from
Aug 26, 2024

Conversation

StevenLAdler
Copy link
Collaborator

@StevenLAdler StevenLAdler commented Aug 15, 2024

should it add users/items in the import when they dont already exist in DB?
should it auto clear on an import?
is 'unique' the correct field to match items?

tested and passing

@StevenLAdler StevenLAdler requested a review from mandos21 August 15, 2024 05:22
@mandos21
Copy link
Owner

  1. No, it should fail.
  2. I think if we consider them as save/load, then yes it should clear beforehand
  3. '_id' is the field you should match items on.

Ask chatgpt to write you some tests, usually that gets you 80-90% of the way there. That's what I've been doing and it still catches a bunch of issues.

app/views/session.py Show resolved Hide resolved
app/views/session.py Outdated Show resolved Hide resolved
app/views/session.py Outdated Show resolved Hide resolved
Copy link
Owner

@mandos21 mandos21 left a comment

Choose a reason for hiding this comment

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

The git workflow doesn't run pytests, I couldn't get that to work last I tried. You'll have to run pytest locally before pushing. There's a couple other small things in there to address as well.

tests/views/test_session.py Outdated Show resolved Hide resolved
@mandos21
Copy link
Owner

Also, I realize two of my comments weren't added to the review, but once I added them, I couldn't figure out how to do it without deleting them, so they're not in it technically?

@StevenLAdler StevenLAdler self-assigned this Aug 16, 2024
@StevenLAdler StevenLAdler requested a review from mandos21 August 19, 2024 22:57
Copy link
Owner

@mandos21 mandos21 left a comment

Choose a reason for hiding this comment

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

Looks good, just two small things

app/models/user.py Outdated Show resolved Hide resolved
tests/views/test_session.py Show resolved Hide resolved
@StevenLAdler StevenLAdler merged commit bd1dd13 into main Aug 26, 2024
2 checks passed
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