Relative path to include config files
- Dominant language
- Python
- Stars
- 2.2k
- Forks
- 122
- Avg merge
- 5d 10h
- Merged PRs (30d)
- 2
Description
Currently if you include other gin files with a statement `include path/to/file` the path can be either absolute or relative to the folder the code is running in.
The config file however should be - in my opinion - agnostic to the folder from which you are calling the code. It makes more sense to me if all gin-config files are stored in a `config` folder and their relative paths are fixed (or whoever is maintaining the code is keeping track of it).
In other words, take the example in which there are two config files (`config.gin` and `base.gin`) **in the same folder**. Let's say that `config.gin` has the following line of code:
```
...
include 'base.gin'
...
```
Now let's say that `main.py` (located wherever you want) is calling the `gin.parse_config_files_and_bindings(...)` on `config.gin` having been given the appropriate path to it (absolute or relative). This scenario will raise an error if the terminal from which you are calling `main.py` is not located in the same folder in which the two config files are.
Contributor guide
Assessment
This issue has not been assessed yet.