Allow base namespaces to have fragments (e.g., ssvc#example)
#934
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the ability to use "fragments" after a registered namespace. E.g.,
ssvc#fooorcisa#bar. This was the intent all along, we just hadn't been testing for it so we missed that while it passed the pattern, it did not pass the validator on the namespace class.Copilot Summary
This pull request enhances the namespace validation logic and expands the test coverage to handle namespace strings containing fragments (using
#). The main updates improve how fragments are parsed and validated, ensuring that such cases are correctly recognized as valid namespaces.Validation logic improvements:
NameSpace.validateto correctly handle and parse fragments in namespace strings by splitting on the fragment separator (#) before validation.Test coverage enhancements:
test_namespace_validatorto confirm that namespace strings with fragments (e.g.,ssvc#test) are validated successfully.ssvc#reference-arch-1andx_example.test#test.Code cleanup:
re) fromtest_namespaces.pyfor clarity.