-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🩹 Fix wrong file loading due to partial filename matching in Project (#…
…1212) This PR fixes an issue with using project due to partial matching of file names where the wrong file was loaded if it started with the same string as the intended file, but is higher in the string sorting order. E.g. if you had 2 files `model.yml` and `model-target.yml` in your projects `models` folder and would call `project.load_model("model")` it would load `model-target.yml`. In addition, some code duplications were removed and error messages for missing files were improved. ### Change summary - [🧪 Changed project tests to fail due to partial filename matching](ba956d6) (Note: The "bad" files were added to the markdown repr string since it should show all files) - [🩹 Fix file loading](29d3dc5) - [🧪🩹 Fixed tests that only passed due to wrong file matching](171d897) - [🧪🧹 Reduced duplication in test](d1becfb) - [👌 Improved error messages on file not found error](8ab8ba3)
- Loading branch information
Showing
5 changed files
with
101 additions
and
53 deletions.
There are no files selected for viewing
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
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
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
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
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