forked from kahst/BirdNET-Lite
-
-
Notifications
You must be signed in to change notification settings - Fork 137
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
WIP - Python - Create a file path and directory resolver & migrate away from hard coded paths #908
Closed
jaredb7
wants to merge
15
commits into
mcguirepr89:PR-development
from
jaredb7:Replace-Hard-Coded-Paths
Closed
WIP - Python - Create a file path and directory resolver & migrate away from hard coded paths #908
jaredb7
wants to merge
15
commits into
mcguirepr89:PR-development
from
jaredb7:Replace-Hard-Coded-Paths
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Created a file path and directory resolver that can be called with a filename or directory and returns a path relative to a home path (which is still currently fixed but can be easily changed) Updated the 4 only python scripts to use this resolver when looking for the bird.db path, models, labels.txt etc etc Included test_filepath_resolver.py which runs a simple list of tests against the new get_file_path and get_directory to ensure they return what we expect
… audio livestream
To avoid having to update file or directory paths in 3 script locations (PHP Common, Shell Common and Python File path resolver) A JSON file that describes folder and file locations will be referenced by all 3 systems, allowing them to generate paths from one central location, With the hope that files can be then moved around, the file updated and all 3 languages will up to date without any other work.
Added possibility in Spectrogram view to activate frequency shifting
Security Fixes, Mainly
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Created a file path and directory resolver that can be called with a file name or directory and returns a path relative to a home path, which is still currently fixed to the use executing the scripts but the idea that now this can be easily changed.
This resolver is practically identical to the one created in #901 to support the Web UI
Updated the 4 only python scripts to use this resolver when looking for the bird.db path, models, labels.txt etc etc
All scripts have been tested and work fine, but comments/suggestions welcome.
Included test_filepath_resolver.py which runs a simple list of tests against the new get_file_path and get_directory to ensure they return what we expect
The script should return nothing if all was ok
Relies upon #901 for config/filepath_map.json