Comments (3)
Hi @larsks
Thanks for raising this issue. I will spend some time on it over the next few days however if you want to attempt to solve it and submit a pull request, I would be more than happy to review it.
From the issue you shared above, we should be defaulting to AutoConfig() on L9 within reviews/config/settings.py
in
reviews/reviews/config/settings.py
Lines 5 to 10 in a9f4685
This makes use of python-decouple which uses AutoConfig()
to do the following:
This is a lazy Config factory that detects which configuration repository youβre using.
It recursively searches up your configuration module path looking for a settings.ini or a .env file.
Optionally, it accepts search_path argument to explicitly define where the search starts.
Depending on where AutoConfig runs from, it may be possible it's running from where reviews
is installed and not the current working directory. To support the current working directly this may need to be updated to specify the search_path=os.getcwd()
from reviews.
With reviews
installed in /home/lars/.local/pipx/venvs/reviews/lib/python3.11/site-packages/reviews
, and run from /home/lars/projects/kola
, the search path for .env
is:
71595 newfstatat(AT_FDCWD, "/home/lars/.local/pipx/venvs/reviews/lib64/python3.11/site-packages/reviews/config/.env", 0x7ffe0d108070, 0) = -1 ENOENT (No such file or directory)
71595 newfstatat(AT_FDCWD, "/home/lars/.local/pipx/venvs/reviews/lib64/python3.11/site-packages/reviews/.env", 0x7ffe0d108070, 0) = -1 ENOENT (No such file or directory)
71595 newfstatat(AT_FDCWD, "/home/lars/.local/pipx/venvs/reviews/lib64/python3.11/site-packages/.env", 0x7ffe0d1080d0, 0) = -1 ENOENT (No such file or directory)
71595 newfstatat(AT_FDCWD, "/home/lars/.local/pipx/venvs/reviews/lib64/python3.11/.env", 0x7ffe0d1080d0, 0) = -1 ENOENT (No such file or directory)
71595 newfstatat(AT_FDCWD, "/home/lars/.local/pipx/venvs/reviews/lib64/.env", 0x7ffe0d1080d0, 0) = -1 ENOENT (No such file or directory)
71595 newfstatat(AT_FDCWD, "/home/lars/.local/pipx/venvs/reviews/.env", 0x7ffe0d1080d0, 0) = -1 ENOENT (No such file or directory)
71595 newfstatat(AT_FDCWD, "/home/lars/.local/pipx/venvs/.env", 0x7ffe0d1080d0, 0) = -1 ENOENT (No such file or directory)
71595 newfstatat(AT_FDCWD, "/home/lars/.local/pipx/.env", 0x7ffe0d1080d0, 0) = -1 ENOENT (No such file or directory)
71595 newfstatat(AT_FDCWD, "/home/lars/.local/.env", 0x7ffe0d1080d0, 0) = -1 ENOENT (No such file or directory)
71595 newfstatat(AT_FDCWD, "/home/lars/.env", 0x7ffe0d1080d0, 0) = -1 ENOENT (No such file or directory)
71595 newfstatat(AT_FDCWD, "/home/.env", 0x7ffe0d1080d0, 0) = -1 ENOENT (No such file or directory)
...which is of course silly. I think just passing .
to AutoConfig()
will probably do the right thing.
from reviews.
Thank you for your pull request @larsks - this will be made available in the 0.5.1 release of reviews
relates to:
from reviews.
Related Issues (20)
- [Feature] Provide configuration via config files HOT 3
- [FEATURE] Add support for corporate-hosted github HOT 4
- [FEATURE] Add support for inline diffs on pull requests HOT 2
- [BUG] Async isn't actually being used, and prevents ctrl+c from correctly exiting the app HOT 1
- [BUG] Does not seem to work with on premise git enterprise HOT 5
- [BUG] Bad/missing credentials are not handled graciously HOT 2
- [FEATURE] Names of the environment variable are somewhat generic HOT 2
- [Feature] Add flag to dashboard to hide/show authors pull requests HOT 13
- [Feature] Add support for Gitlab HOT 5
- refactor this function for usage with Gitlab
- refactor this function to accept a link
- refactor this function for usage with Gitlab
- refactor this function to accept a link
- replace with pull_request.web_url
- - pass in link
- refactor this function for usage with Gitlab
- refactor this function to accept a link
- Cant get settings file to work HOT 4
- Request for PAT requirements documentation HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reviews.