-
Notifications
You must be signed in to change notification settings - Fork 844
feat: enhance config options, support env vars #385
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
base: main
Are you sure you want to change the base?
Conversation
Thanks for your work @Cheelax. I have rebase upon Refactor
Fix
Docs and consistency
Tests
TODO
|
This comment was marked as resolved.
This comment was marked as resolved.
@filipchristiansen Hello, any news on this? |
The code crashes when running the server locally, possibly due to a circular import. I will have a look at it. |
refactor(config,lint): centralize env utils, switch to ruff.isort, drop unused constants
|
@Cheelax The branch needs to be rebase upon main Update: Done |
Closes coderamp-labs#285 * add support for environment variables (`GITINGEST_*`) to override `config.py` defaults * implement a precedence hierarchy: CLI/Python args → environment variables → default values * introduce new CLI options (`--max-files`, `--max-total-size`, `--max-directory-depth`). * centralise environment variable utilities in `utils/config_utils.py` with functions `_get_str_env_var` and `_get_int_env_var` * add configuration examples to `README.md` * tidy and update docstrings * update tests * add missing `--tag` CLI flag * remove `isort` in favour of `ruff.lint.isort` * remove unused constants `BASE_DIR` and `TEMPLATE_DIR` in `tests/server/test_flow_integration.py` * rename constant `templates` to `JINJA_TEMPLATES` in `src/server/server_config.py` * move `Colors` from `src/server/server_utils.py` to `src/gitingest/utils/colors.py` to break circular import chain Co-authored-by: Cheelax <thomas.belloc@gmail.com>
a720ad2
to
adda1ce
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@filipchristiansen i'll let add your review and merge it. |
This pull request has merge conflicts that must be resolved before it can be merged. |
Closes #285
GITINGEST_*
) to overrideconfig.py
defaults--max-files
,--max-total-size
,--max-directory-depth
).utils/config_utils.py
with functions_get_str_env_var
and_get_int_env_var
README.md
--tag
CLI flagisort
in favour ofruff.lint.isort
BASE_DIR
andTEMPLATE_DIR
intests/server/test_flow_integration.py
templates
toJINJA_TEMPLATES
insrc/server/server_config.py
Colors
fromsrc/server/server_utils.py
tosrc/gitingest/utils/colors.py
to break circular import chain