Refactored config file loading logic for easier default config usage.#149
Refactored config file loading logic for easier default config usage.#149AdrianDAlessandro merged 23 commits intomainfrom
Conversation
for more information, see https://pre-commit.ci
…/Auto-CORPus into default_config_refactor
…efault config to use.
for more information, see https://pre-commit.ci
alexdewar
left a comment
There was a problem hiding this comment.
Looks good! There's a missing call to process_files() needed and I'd replace that assert statement, but other than that I think it's all ok. I've made some other suggestions, but I'll leave it up to you whether you think they're worth it or not.
AdrianDAlessandro
left a comment
There was a problem hiding this comment.
Overall pretty good. Alex made some relevant comments that should be addressed
Co-authored-by: Alex Dewar <alexdewar@users.noreply.github.com>
for more information, see https://pre-commit.ci
…/Auto-CORPus into default_config_refactor
for more information, see https://pre-commit.ci
|
Re-requested reviews as plenty of requested changes have been implemented but one may have been missed, I've put a refactor of the DefaultConfig class in which outdated some of the issues |
AdrianDAlessandro
left a comment
There was a problem hiding this comment.
This is really good overall! I've made one suggestion about making the type of config consistent, which should also simplify the Enum. Will be happy to merge after that change
alexdewar
left a comment
There was a problem hiding this comment.
Agree with @AdrianDAlessandro's comment, but aside from that it looks good!
|
load_config is now called to retrieve the config data as a dict, with the class docs adjusted |
|
Oh, except that Tip: you can install a hook locally to check this stuff before you commit if you run |
…/Auto-CORPus into default_config_refactor
for more information, see https://pre-commit.ci
Just tried my local ruff and its not reporting what is listed in the pre-commit.ci check on GitHub, so looks like I have a config issue. I've made changes based on the listed problems in the ruff GitHub action so far |
…/Auto-CORPus into default_config_refactor
for more information, see https://pre-commit.ci
Co-authored-by: Adrian D'Alessandro <a.dalessandro@imperial.ac.uk>
AdrianDAlessandro
left a comment
There was a problem hiding this comment.
Great! I've enabled auto-merge and updated the branch, so this will merge once the checks have passed.
Description
Config files are now loaded separately depending on whether a default config is used or a new, user-made custom one.
Fixes #143
This new way of loading a default config file can be done like this:
For custom config files, users can do the following:
Type of change
Key checklist
pytest)mkdocs)pre-commit run --all-files)Further checks