Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Update `get_all_files` or split into two functions.

Open
#49 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python
Domain
backend

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from AllenNeuralDynamics/ficus

All issues in AllenNeuralDynamics/ficus

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.