Update `get_all_files` or split into two functions.
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start by locating get_all_files and its callers, then inspect any related tests or file-override lookup entry points. Compare the filename and filename-omitted cases against both examples. Done means each matching file has its own ordered override hierarchy, while the filename form still returns one hierarchy and callers remain consistent.
Written by the indexing model from the issue text.
Description
Currently get_all_files is kinda doing two separate things. If you include filename, it provides all files in the override hierarchy for that file. If you omit filename, it assumes all files in the lowest level folder share the same override hierarchy and returns a single override hierarchy along with all files at the lowest level scope folder. This second behavior isn't exactly consistent with the first.
What we should do is return the override hierarchy for every match in the search criteria--and the tree structure may be different!. In other words, if the file is omitted, and multiple files match the specified scope, we should provide separate override hierarchies for each file.
Example
├── defaults/
│ └── vr_foraging/
│ ├── default.yaml
│ ├── config_a.yaml
│ └── config_b.yaml
└── hostname/
└── W11BRUNO/
└── vr_foraging/
├── config_a.yaml
└── config_b.yaml
Example 1
Calling
get_all_files(namespace=vr_foraging,
scope_idenfitiers={'hostname': 'W11BRUNO'})
# filename omitted
should return separate override hierarchies for each config with matching scope critera (scopes are ordered):
[
["defaults/vr_foraging/default.yaml",
"defaults/vr_foraging/config_a.yaml",
"hostname/W11BRUNO/vr_foraging/config_a.yaml"],
["defaults/vr_foraging/default.yaml",
"defaults/vr_foraging/config_b.yaml",
"hostname/W11BRUNO/vr_foraging/config_b.yaml"],
]
Note how the above override hierarchies are different in other places besides the lowest level folder.
Example 2
Calling
get_all_files(namespace=vr_foraging,
scope_idenfitiers={'hostname': 'W11BRUNO'},
filename="config_b.yaml")
should return:
["defaults/vr_foraging/default.yaml",
"defaults/vr_foraging/config_b.yaml",
"hostname/W11BRUNO/vr_foraging/config_b.yaml"],
Let's consider making this two functions:
get_file_override_stack(namespace, scope_identifiers, filename)- returns a single file override hierarchy
get_all_files(namespace, scope_identifiers)- returns multiple file override hierarchies, one per matching file.
- Dominant language
- Python
- Stars
- 1
- Forks
- 0
- Avg merge
- 15h 6m
- Merged PRs (30d)
- 3
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from AllenNeuralDynamics/ficus
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
AllenNeuralDynamics/ficus#87 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
AllenNeuralDynamics/ficus#85 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
AllenNeuralDynamics/ficus#84 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
AllenNeuralDynamics/ficus#54 · 4 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
AllenNeuralDynamics/ficus#93 · 2 comments ·
All issues in AllenNeuralDynamics/ficus
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
developmentseed/titiler-cmr#250 · 1 comment ·
Maintainers usually reply within 1 day
-
[Bug]: IndexHandler.post crashes with HTTP 500 on malformed payloads, missing credentials, or when login is disabledPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 6 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
cookiecutter/cookiecutter-django#6999 ·
Maintainers usually reply within 1 day
-
fix: @_helpers.positional raises TypeError when decorating functions without default argumentsPossibly taken @codeXsidd claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
googleapis/google-api-python-client#2845 ·
Maintainers usually reply within 1 day
-
github_actions
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
collective/icalendar#2003 · 1 comment ·
Maintainers usually reply within 1 day