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

note error retracting time stamp --withtime #15

Closed
nbehrnd opened this issue Sep 22, 2021 · 3 comments
Closed

note error retracting time stamp --withtime #15

nbehrnd opened this issue Sep 22, 2021 · 3 comments
Assignees

Comments

@nbehrnd
Copy link
Contributor

nbehrnd commented Sep 22, 2021

date2name fails to revoke successfully the time stamp --withtime date2name prepends.

The version hosted on PyPi (May 9, 2018) does not understand (yet) --remove altogether when presenting a file in pattern of 2021-09-22_test.txt. The current version hosted on GitHub (commit 051254b, Sep 20, 2021) recognizes --remove but truncates 2021-09-21T13.59.59_test.txt only to 21T13.59.59_test.txt; the anticipated pattern would be test.txt.

For documentation, the attached .zip contains test_generator.org from which Makefile and testing test_date2name.py are tangled. To ease visual comparison in a file browser like Thunar while performing the tests, additional delays are set; this form of the .org thus is /not/ for inclusion in the in the project's Git history.

2021-09-22_date2name.zip

@novoid novoid self-assigned this Sep 26, 2021
@novoid novoid pinned this issue Sep 26, 2021
@nbehrnd
Copy link
Contributor Author

nbehrnd commented Sep 29, 2021

Branch retract of my fork about date2name (here) now extends testing to trace the script's affect on files or folders to prepend the five fixed formats and how these stamps are removed. Consistent with earlier observation, the difficulty to retract a --withtime stamp is met again for folders.

The current head in this branch still represents an early development version, aiming for a similar test coverage about files and tests. In addition to the default check across all test functions the Makefile offers, the tests are marked. Thus e.g., a call like

pytest-3 test_date2name.py -m "remove and folders"

constrains the scope of the tests performed to only 10 relevant (only -r and --remove for folders) out of a set of 110 test functions defined. In this perspective, test_generator.org and its tangled files possibly are good enough for you/any other interested to improve how date/time stamps are removed. All other tests implemented pass (i.e. in total, 4 fail, 116 pass; success rate .ge. 96%)

The part testing date2name's action on folders repeats much of the part testing about files. Perhaps I identify improvements for these series of tests relying on the permutation of parameters. If filing a pull request, I probably should condense the changes of multiple individual commits into a single one; this is a technique I have to get familiar anyway.

@novoid
Copy link
Owner

novoid commented Sep 29, 2021

Sounds great - thanks.

I have to admit that I'm not using --remove myself so far.

Looking forward for your pull request. To me, it doesn't matter. I'd gladly accept separate requests as well.

@nbehrnd
Copy link
Contributor Author

nbehrnd commented Nov 25, 2021

The commits by 2021-11-25 resolve the problem, the issue is closed.

@nbehrnd nbehrnd closed this as completed Nov 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants