-
Notifications
You must be signed in to change notification settings - Fork 155
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
feat: add validator for eth addresses #383
feat: add validator for eth addresses #383
Conversation
Hi. Please note that I plan to extend this by adding more validators for TRX, ADA, and other crypto addresses. Thanks! |
Hi, I'll review, but is it possible to make the external dependency, optional? |
Sure. Something like a new group of optional dependencies named Finally, it can be used like |
That sound exactly like what I was thinking. |
It's done. Now, how do you think we should update the pycqa.yaml workflow? I can explicitly include |
Change this: Lines 9 to 10 in a7bcfda
to: # tooling
pdm export --group tooling,crypto-eth-addresses -f requirements -o package/requirements.tooling.txt Do the same in Let's see if it works. |
It doesn't seem to be working. Isn't it because the optional dependencies are not installed here in the "testing" workflow? validators/.github/workflows/pycqa.yaml Lines 52 to 53 in a7bcfda
|
Ah, you are right, then let's add a redundant dependency group with: $ pdm add -dG testing pytest This should change [tool.pdm.dev-dependencies]
+ testing = ["pytest>=8.2.2"] Do not remove # tooling
pdm export --group tooling -f requirements -o package/requirements.tooling.txt
+# testing
+pdm export --group testing,crypto-eth-addresses -f requirements -o package/requirements.testing.txt Finally in -run: pip install pytest
+run: pip install -r package/requirements.testing.txt Run the scripts, commit, push and try again. |
@yozachar All tests are passed except for the tooling workflow. Seems like we need # tooling
-pdm export --group tooling -f requirements -o package/requirements.tooling.txt
+pdm export --group tooling,crypto-eth-addresses -f requirements -o package/requirements.tooling.txt
# testing
pdm export --group testing,crypto-eth-addresses -f requirements -o package/requirements.testing.txt |
Ah yes, I missed that. |
It's all good now. |
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 PR looks like a good candidate for 0.29.0
. Please go ahead.
I updated the version and changelog. Let me know if this wraps it up or if more needs to be done. |
I'll push a few changes, just some arrangements. |
8529575
to
cd33389
Compare
What do you think? |
- make `eth_hash` truly optional - update dev dependencies - improve changelog - fix packaging and CI
cd33389
to
8683bef
Compare
Much better. Thanks! |
Thanks a lot for the PR! |
https://build.opensuse.org/request/show/1184350 by user mia + anag+factory - Update to 0.29.0 Breaking: * move btc_address to crypto_addresses gh#python-validators/validators#383 Features: * add validator for eth addresses (depends on eth-hash, which is not packaged yet) gh#python-validators/validators#383
src/validators/crypto_addresses