-
Notifications
You must be signed in to change notification settings - Fork 180
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
added base64 #415
added base64 #415
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good start. Let's add some test coverage now.
You'll need tests for:
- mesop/dataclass_utils/dataclass_utils_test.py
- mesop/dataclass_utils/diff_state_test.py
- mesop/web/src/utils/diff_state_spec.ts
To run the specific tests:
bazel test //mesop/dataclass_utils:dataclass_utils_test
bazel test //mesop/dataclass_utils:diff_state_test
bazel test //mesop/web/src/utils:unit_test
Hey I've added tests and removed the period |
For Also for dataclass_utils_test, can you add a couple more examples for test_serialize_bytes(), such as empty string and maybe something with unicode characters. For those tests you can use pytest parametrized tests: https://docs.pytest.org/en/7.1.x/how-to/parametrize.html#pytest-mark-parametrize-parametrizing-test-functions |
Also in your PR description, can you reference the issue number? |
Hey I've made changes as requested. And extremely sorry about the formatting change, whenever i saved the file it suddenly showed all blue changed lines and I didn't know why, thought there was an error with my editor. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making those changes. This looks good. I added a few minor comments about removing unnecessary comments. But after I can approve and merge this PR in for you. Thanks!
Looks like the linting presubmit failed. Can you adjust based on the errors there. You can also install the precommit checks for checking. See https://google.github.io/mesop/internal/development/ |
Yes i'll look in it. |
I ran pre-commit on the entire file and it has modified most of the files. |
I'm not sure if the changes that I made are correct, i just ran pre-commit and it made some changes of it's own. |
Okay. |
Oh yeah, you should just include |
Ahh man thought it would be done. |
Hold on it changed the files again when I ran pre-commit run --all-files |
There are some changes in .pre-commit-config.yml as well, should i keep those changes?? |
Leave the .pre-commit-config.yaml as is for now. Just upload the change to: mesop/dataclass_utils/dataclass_utils.py I think that should be it. |
Hey I done the changes, hopefully it's the last one. |
It's not a problem at all. I think this just tells us that we need to improve our documentation for setting up the dev environment better. That's usually the most annoying part which is partially why we've been working on setting up Docker Images and Github Codespaces. |
I genuinely don't know why it's going wrong |
Yes this is what i've change just now, however there are other two errors that I'm getting. |
Okay this run seems promising. |
Looks like the next thing to fix is the unit tests. For this test, "test_diff_bytes_fails" you can delete it now that we have support for bytes. To run the tests locally:
|
Okay 1 test reduced at least. I'll look into the other one. |
Hey, Hopefully this works, I'll be going to sleep right now, it's really late here, will work on it tomorrow if it fails. |
What version of bazel do you recommend for this? |
Looking at the error, do you think there is something non-deterministic with the base64 encoding or something? Seems like you get a different encoding your local machine than on the CI machine. I think for now you can just remove unicode test. |
Is this it, I'm not sure at this point. |
The pre checks were all fine for this and checked the bazel test, no errors hopefully this is the last one. |
Ok, looks like it passed. Thanks for you patience on this @zacharias1219. |
Ohh thank god, finally. |
Is there anything I should do more, and yeah I should be thanking you for being patient. |
I think that's it for this issue.
…On Thu, Jun 13, 2024 at 7:35 AM Richard Abishai ***@***.***> wrote:
Is there anything I should do more, and yeah I should be thanking you for
being patient.
—
Reply to this email directly, view it on GitHub
<#415 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEDZ4I3KEMLPF5DKSWZC4LZHGU27AVCNFSM6AAAAABJDRGVZOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRVHA3DAMRQGQ>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
Thank you so much for being a good mentor during this pr. I'll look forward to contributing more to this project. |
Issue number #158