Uh oh!
There was an error while loading. Please reload this page.
Add ability to select path segments using Python re regexprs; follow on to PR#146 & #177 - #186
Add ability to select path segments using Python re regexprs; follow on to PR#146 & #177#186AlainLich wants to merge 17 commits into
Conversation
Restructured as requested, strictly required mods - flake8 compliant - nose2 tested - tox tested for Python3.11 and Pypy3.9 - improved some tests (require verification of result...) - documentation README.rst synchronized Still TBD: - check of .github/workflows Test environment: - Running on ARM-64 Linux version 5.15.49-linuxkit (root@buildkitsandbox) (gcc (Alpine 10.2.1_pre1) 10.2.1 20201203, GNU ld (GNU Binutils) 2.35.2) dpath-maintainers#1 SMP PREEMPT Tue Sep 13 07:51:32 UTC 2022 - Python 3.11.2 - pypy3 --version : Python 3.9.16 (7.3.11+dfsg-2, Feb 06 2023, 17:14:22) [PyPy 7.3.11 with GCC 12.2.0]
- new file: .github/workflows/python3Test.yml - remove this for PR
- f-strings support = for self-documenting expression introduced with Python 3.8
- includes only required changes for feature, as suggested in @moomoohk comment on April 5th - test improvements - tested on python3.8,...,3.11 and pypy3.7 & 3.9
moomoohk
commented
Apr 14, 2023
Thanks Alain I will begin looking over your changes. My first pass will mainly aimed at style discrepancies and then I'll dive deeper into functionality. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
AlainLich
commented
Apr 15, 2023
Hi @moomoohk, Just answered your questions, I plan to push to Github later today or tomorrow Have a good day, |
- types: addition of GlobExtend where both a glob and a regex are allowed - code : __init__.py: improved _split_path - added InvalidRegex exception - test improvements (assert expected result) and additions - change default behaviour DPATH_ACCEPT_RE_REGEXP_IN_STRING=False, kept documentation current Flake8 compliant, tested Python11/Pypy9 on debian/ARM64 Also added a workflow for testing in arbitrary branch, expected to be suppressed in PR, but more testing is in order at this time!!
- made option DPATH_ACCEPT_RE_REGEXP_IN_STRING configurable from sys. environ - separated in test_various_exts tests which require this to be True, other tests may always be run - added tox-set-rex.ini which sets (whereas the default is unset) - python3Test.yml runs both tox configurations, reduced number of Python & Pypy configs
moomoohk
commented
Apr 15, 2023
Hi Alain, What do you think we can do about this? P.S. I've also noticed you've added a new GitHub workflow just for testing this feature. Is it truly necessary? Again, I would like this PR to be minimal and focused. This change entails the extra envar logic you've added to Regards |
AlainLich
commented
Apr 16, 2023
Hi @moomoohk,
I hope this answers your questions, I have not yet looked at your 'polishing' modification Please let me know if this suits you, I could try to make this available by next week end |
AlainLich
commented
Apr 16, 2023
Hi @moomoohk , Your changes Sun Apr 16 01:50:18 - 02:05:29 2023 +0300 are all fine and integrated in my development tree. Regards |
AlainLich
commented
Apr 19, 2023
Hi @moomoohk, |
moomoohk
commented
Apr 19, 2023
Thanks @AlainLich, sounds great. I had meant to reply to your previous comment with some notes but my computer crashed... After giving it some thought I've come to the conclusion that you're correct assuming that the tests should be run twice, with the option toggled. I've also thought about the best way to implement a testable feature flag and agree that an envar is the way to go. I've reduced the code in As for setting the feature flag for the tests, I believe adding an extra step to the existing workflow will suffice. This will ensure that non-test code has to be written around the tests themselves. I will push this update shortly for your reference. Regarding what you wrote about the branch name, the existing workflow is configured to run on pushes to pull requests as well. Now that this PR is opened I would say that your workflow can be removed. Additionally, I believe Thanks again |
AlainLich
commented
Apr 19, 2023
OK, give me 5 hours of stability, I will integrate my stuff and push |
**NOTE** this is for my testing; if all goes well I will suppress extra workflow and push again
AlainLich
commented
Apr 19, 2023
Hi @moomoohk , while testing, got hit (again) by
and (same code location)
My understanding is that Hypothesis generated a test case where the string was essentially started by a zero character.... in Considering that this is a different issue (no re.Pattern in sight), I will proceed to removing the unneeded workflow, and let you review the code. Full story in attachment |
Hi @moomoohk ,
Following your comments, this PR substitutes to #177 and includes only required changes to implement and test the feature. I hope that this fits your expectations.
Also, the PR is based on your latest commit abb76a1 (origin/master, origin/HEAD, master, Sat Mar 25 21:07:41 2023 +0300).
Tests through workflows at https://github.com/AlainLich/dpath-python/actions/runs/4651582912
Regards
Alain