Closed stacks closed 11 years ago
The entire scripts/
folder deserves some cleanup, this is just one instance that should be addressed. For instance scripts/legacy_functions.py
and scripts/import_tex.py
should be rewritten (the first one should be dropped tout court).
And maybe these tools should be moved to a separate project. Then we'd have
stacks-website
: all the website codestacks-project
: the actual project, not a submodule anymore as discussedstacks-tools
: all the tools required for working on the Stacks project and the Stacks website (so both the wellformedness checks and the code that updates the database)This way it is clearer which part does what and there wouldn't be any code duplication (because stacks-website
and stacks-project
share plenty of Python code).
As to this particular question: if you don't need that particular check, we can safely remove it.
The function "split_label" in scripts/legacy_functions.py is only used in the function "parse_aux_file" in scripts/import_tex.py which in turn is only called twice to produce list_dict and label_loc. In turn list_dict isn't used and label_loc is used only to print the warnings about missing location for tags (lines 382 -- 386) which haven't triggered ever as far as I know.
So I suggest removing those functions if you agree.
I an add a check for missing locations for tags in the stacks project.