Make erfa source directory a constant in erfa_generator#223
Make erfa source directory a constant in erfa_generator#223eerovaher wants to merge 1 commit intoliberfa:mainfrom
erfa source directory a constant in erfa_generator#223Conversation
Previously `erfa_generator` accepted the location of the `erfa` source files both as a command line argument and as an argument for its `main()` function, with the default being the correct directory in the `liberfa` submodule of this repository. This functionality is not useful and it is much simpler if the location of the `erfa` source files is specified by a module level constant in `erfa_generator`.
| from pathlib import Path | ||
|
|
||
| DEFAULT_ERFA_LOC = Path(__file__).with_name("liberfa") / "erfa" / "src" | ||
| ERFA_SRC = Path(__file__).with_name("liberfa") / "erfa" / "src" |
There was a problem hiding this comment.
ERFA_SRC is the name already used by setup.py.
|
Sorry but I don't see a big advantage in removing the Would it be a big issue for you to keep it? |
|
I don't really like that it is possible to customize the location of the |
|
Oh, maybe I made some confusion. Regarding the |
|
Does the location of the templates also have to stay customizable from the CLI? |
|
Yes, to me it makes sense |
Currently
erfa_generatoraccepts the location of theerfasource files both as a command line argument and as an argument for itsmain()function, with the default being the correct directory in theliberfasubmodule of this repository. To me this looks like a leftover from the time beforeerfawas included inpyerfaas a submodule and I don't think this functionality is useful. It is much simpler if the location of theerfasource files is specified by a module level constant inerfa_generator.This can break backwards compatibility for those running
erfa_generatordirectly as a script and for those who importerfa_generatorand call itsmain()function directly, but I suspect I am the only person who runs theerfa_generatorscript directly and that no-one at all is importingerfa_generator.