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

Add URLConfig preprocessor to warn on common mistakes #1203

Open
jmosbacher opened this issue Jun 20, 2023 · 0 comments
Open

Add URLConfig preprocessor to warn on common mistakes #1203

jmosbacher opened this issue Jun 20, 2023 · 0 comments
Assignees

Comments

@jmosbacher
Copy link
Member

jmosbacher commented Jun 20, 2023

We should add a list of common mistakes made when preparing a URL config and add a URLConfig preprocessor that will warn the user if any of these common mistakes are identified in the URL.

Some examples:

  • Not adding &as_list=True when a list should be returned from xedocs
  • Not using the resource:// protocol to fetch files on corrections that return filenames
  • Not sorting the values when building an array from the result of xedocs protocol.
  • referencing a correction that doesnt exist in the xedocs protocol

We should probably organize these issue by protocol, so eg have a list of functions for each protocol. Each function should be called with the argument and kwargs of the URL and optionally issue a warning to the user if a possible mistake was identified. Alternatively we could just register all the functions as preprocessors

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

No branches or pull requests

2 participants