-
Notifications
You must be signed in to change notification settings - Fork 978
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
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
ix-56h
left a comment
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. |
|
This pull request has resolved merge conflicts and is ready for review. |
|
This pull request has merge conflicts that must be resolved before it can be merged. |
|
Hi there! We haven’t seen activity on this pull request for 45 days, so I’m marking it as stale. |
|
Hi there! We haven’t heard anything for 10 days, so I’m closing this pull request. Feel free to reopen if you’d like to continue working on it. Thanks! |
Closes #285
GITINGEST_*) to overrideconfig.pydefaults--max-files,--max-total-size,--max-directory-depth).utils/config_utils.pywith functions_get_str_env_varand_get_int_env_varREADME.md--tagCLI flagisortin favour ofruff.lint.isortBASE_DIRandTEMPLATE_DIRintests/server/test_flow_integration.pytemplatestoJINJA_TEMPLATESinsrc/server/server_config.pyColorsfromsrc/server/server_utils.pytosrc/gitingest/utils/colors.pyto break circular import chain