Skip to content

Add --force-cv flag to limit tags to the controlled vocabulary#80

Merged
novoid merged 6 commits intonovoid:masterfrom
jneidel:force-cv
Feb 11, 2026
Merged

Add --force-cv flag to limit tags to the controlled vocabulary#80
novoid merged 6 commits intonovoid:masterfrom
jneidel:force-cv

Conversation

@jneidel
Copy link
Copy Markdown
Contributor

@jneidel jneidel commented Feb 10, 2026

Closes #18

--force-cv Only allow tags that are part of the controlled vocabulary (.filetags)

TODO

  • describe further in README (if desired)
  • changelog entry (if desired)

--interactive

In --interactive, upon pressing enter a minimal single line will signal the error (and possibly similar tags). The user gets their prompt back and can edit the current selection of tags.

image

Without .filetags:
image

--tags

With --tags the user gets a more verbose error message and can try again:

image

--gui

In the --gui it is similar to --interactive: a validation error will not let the user submit. They may edit their tags, or cancel, which discards all tags.

image

@nbehrnd
Copy link
Copy Markdown
Collaborator

nbehrnd commented Feb 11, 2026

@jneidel Thank you for submitting an extension of filetags functionality which addresses a pending issue.

I would like to note an observation. In an instance of Debian 14/forky with Python 3.13, I cloned your fork, accessed your feature branch force-cv and run pytest by pytest tests/unit_tests.py to run the tests for Linux. Beside an expected warning, your edit now yields an error while repeating the same test with the latest commit to the default branch in @novoid's repository did not. To ease replication on your side, or/and by @novoid, see the two logs attached to this comment.

2026-02-11_pytest_novoid_master.log
2026-02-11_pytest_jneidel_forcecv.log

@jneidel
Copy link
Copy Markdown
Contributor Author

jneidel commented Feb 11, 2026

Hi @nbehrnd , thanks for taking a look. The test failure was a leftover from a last refactor and is fixed now:

PYTHONPATH=".:" pytest tests/unit_tests.py
image

Warning is fixed in #81

@novoid novoid merged commit b03af11 into novoid:master Feb 11, 2026
2 checks passed
@novoid
Copy link
Copy Markdown
Owner

novoid commented Feb 11, 2026

Very useful option. Thank you very much! 🙇

@jneidel jneidel deleted the force-cv branch February 12, 2026 07:25
@jneidel
Copy link
Copy Markdown
Contributor Author

jneidel commented Feb 12, 2026

@novoid you're welcome. Thanks for the great package and your website/talk/research that explained the philosophy behind it quite well 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CV: add CLI option that prevents users from using tags that are not part of the used .filetags file

3 participants