Commit d4031c0
Take filenames with dots into account in get_sigmf_filenames() (#107)
* take filenames with dots into account in get_sigmf_filenames()
The function get_sigmf_filenames() does not work correctly if a
file contains dots in the filename. These are interpretted as suffixes
by pathlib, and a part of the filename can be removed when forming
the different SigMF filenames. This fixes the problem by only
considering as file extensions the canonical SigMF file extensions.
Any other suffixes are treated as part of the filename and not removed.
This fixes #106.
* fix SigMFCollection.get_SigMFFile()
The get_SigMFFile() method was broken because it used ".sigmf_meta"
instead of ".sigmf-meta". This rewrites the method to use
get_sigmf_filenames().
* test that SigMF files with . in the filename are loaded correctly
This adds a unit test that shows that SigMF files like
a.sigmf-meta, b.c.sigmf-meta, and d.e.f.sigmf-meta are all loaded
correctly.
* increment patch version
---------
Co-authored-by: Teque5 <[email protected]>1 parent b9b6bed commit d4031c0
3 files changed
+41
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
915 | 915 | | |
916 | 916 | | |
917 | 917 | | |
918 | | - | |
919 | | - | |
920 | | - | |
921 | | - | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
922 | 921 | | |
923 | | - | |
924 | | - | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
925 | 925 | | |
926 | 926 | | |
927 | 927 | | |
| |||
1111 | 1111 | | |
1112 | 1112 | | |
1113 | 1113 | | |
1114 | | - | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
1115 | 1130 | | |
1116 | 1131 | | |
1117 | | - | |
1118 | | - | |
1119 | | - | |
1120 | | - | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
1121 | 1136 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
46 | 60 | | |
47 | 61 | | |
48 | 62 | | |
| |||
0 commit comments