-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow for OrderedDicts to be passed to dict_list and other similar fu…
…nctions (#283) * Allow for OrderedDicts to be passed to dict_list and other similar functions. Anywhere where functions required the input to be a ::Dict{K,T} were changed to ::AbstractDict{K,T} to allow for OrderedDicts. The only place this was not changed was in the project_setup where it gets the pkg["name"] because that returns a Dict. Added an optional kwarg `order` argument to struct2dict to return an OrderedDict (default is false), where order refers to insertion order. If a set of OrderedDicts is used with dict_list an OrderedDict should be returned. checktagtype! will also return a regular Dict. OrderedDict from DataStructures is also exported from DrWatson. * Removed `DataStructures` dependency. struct2dict now allows the user to specify the type of dictionary to be returned. If one is not specified, then a `Dict` is returned. * Added tests for example usage of OrderedDicts to `stool_tests.jl` `tostringdict` and `tosymboldict` also allow for a specific type of `dict` to be returned. Still have the `DataStructures` dependency. Unsure why and not sure how to fix. Have checked the files and the only place DataStructures is used is in `stool_tests.jl` * `DataStructures` dependency is actually removed this time. * Fixed minor typos and comments in `naming.jl` and `saving_tools.jl`.
- Loading branch information
Showing
7 changed files
with
102 additions
and
40 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
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