feat: add validator for eth addresses#383
feat: add validator for eth addresses#383yozachar merged 10 commits intopython-validators:masterfrom
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.txtDo 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 pytestThis 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.txtFinally in -run: pip install pytest
+run: pip install -r package/requirements.testing.txtRun 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. |
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