-
Notifications
You must be signed in to change notification settings - Fork 0
/
changelogs.txt
248 lines (213 loc) · 6.77 KB
/
changelogs.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
Oct 17, 2023, v0.5.01rc0 - Major Refactor
- Fully support Pydantic v1/v2 in Settings and BaseModels
- Type annotation still fully supported
- Implement lazy initialization of settings
- Remove `lazyops` dependencies
- Implement reworked `cloudflare` api
- Planned deprecation to move `fileio.lib.types.File` to `fileio.file.File`
- TODO:
- Implement atomic read/write
---
Jan 13, 2022 v0.4.4
- Modify logic for `glob` and `rglob` to return list instead of iterables.
- Resolve logic for local paths for `listdir` `glob` and `rglob` to return list instead of iterables.
Dec 9, 2022 v0.4.1
- Fix `_get_pathlike` method
- Add `csv`, `tsv`, `jsonlines` io classes
Dec 6, 2022 v0.4.0
- Another massive overhaul to clean up, validate, and add more features.
- Improved code readability throughout
---
May 21, 2022 v0.3.1
- Complete Overhaul and refactor.
---
Aug 31, 2021 v0.3.0alpha
- Major refactor to remove `tensorflow` as primary dependency
- Started secondary support of `gs` using `google-cloud-storage`
- Started primary support of `s3` using `tensorflow`
- Working on secondary support of `s3` using `aioaws`
- Planning to integrate `async` support
- Planning to add deeper integration with `smart_open`
- Planning to add support for `supabase` storage
- Started adding auto-auth support: `s3`, `gs`, `supabase`
- Added `compat` module for previous `File` API to prevent breakage
- All previous `File` APIs are still usable.
- Does not check for `tensorflow` dependency. So using without `tensorflow` will break
---
Aug 3, 2021 - v0.1.16
- A lot. But its pretty lazily done.
---
July 7, 2021 - v0.1.15
- Modified behavior of `open` and direct `__call__`
- Remove Explicit need for Tensorflow in setup, but still require it at the moment.
- This may help with macos Tensorflow installations using `tensorflow-macos`
---
July 2, 2021 - v0.1.13
- Change `.textread` to return string rather than list
- `.textreadlines` replaces original function
- Update `.textlist` to support option for stripping newlines and have replacements
- `strip_newlines = True`, will strip all newlines prior to return
- `replacements: [ list | dict | str ] = None`, will iterate through and replace
- Update `.base(filename, with_ext=True)` to allow return without File Extension
- Add `.readfile` method to return `.read()` API
- Add `.mod_fname(filename, new_name=None, prefix=None, suffix=None, ext=None, directory=None, create_dirs=True, filename_only=False, space_replace='_')`
- `src = 'gs://mybucket/path/file.txt'`
- `res = File.mod_fname(src, newname='newfile', ext='json', directory='/newdir', prefix='test_', suffix='_001')`
- `>> res = /newdir/test_newfile_001.json`
---
June 30, 2021 - v0.1.11
- Added Dill as default pickler if installed
- Ability to set any pickle method that supports .dumps/.loads call with `File.set_pickler(name='pickler')` or `File.set_pickler(function=cloudpickle)`
- Hotfix to change method to dumps/loads
- Hotfix for .gsutil method which did not initialize properly.
---
June 11, 2021 - v0.1.8
- Hotfix for methods .split_file/.split_files
---
June 9, 2021 - v0.1.7
- Hotfix for Method .get_local
- Hotfix for method .jlgs
---
May 28, 2021 - v0.1.6
- Added Method to get User Dir
- File.userdir
---
May 21, 2021 - v0.1.5
- Added TSV/CSV Write Methods
- File.csvwrite
- File.tsvwrite
---
May 20, 2021 - v0.1.4
- Hotfix for file.split_file(s) method to also return resulting filenames with `output_files` key
---
May 20, 2021 - v0.1.3
- Py Version Requirement Fix
---
May 19, 2021 - v0.1.2
- Minor Fixes
- Added Methods for Splitting Files/Items
- File.calc_splits
- File.split_items
- File.split_file
- File.split_files
---
May 12, 2021 - v0.1.1
- Minor Fixes
- Added Method
- File.fmv
---
May 12, 2021 - v0.1.0
- Refactored Library
- Organized Methods
- Added MultiThreaded Wrapper
- `from fileio import MultiThreadPipeline`
- Added gsutil wrapper method
- File.gsutil
- Added Methods for Yaml
- File.yload
- File.yloads
- File.ydump
- File.ydumps
- File.yparse
- Updated Methods for Json
- File.jsonload
- File.jsonloads
- File.jsondump
- File.jsondumps
- File.jp
- File.jwrite
- File.jg
- File.jgs
- Updated Methods for Jsonlines
- File.jll
- File.jlp
- File.jldumps
- File.jlwrite
- File.jlwrites
- File.jlg
- File.jlgs
- File.jlload
- File.jlw
- File.jlsample
- Updated Methods for Text
- File.textload
- File.textwrite
- File.textread
- File.textlist
- Added Methods for Requests
- File.rget
- File.rpost
- File.reqsess
- Added Methods for URL Encoding/Decoding
- File.urlencode
- File.urldecode
- Added Methods for Hashing
- File.hash
- File.checkhash
- Added Methods to Disable/Enable TQDM
- File.enable_progress
- File.disable_progress
- Added Utility Methods
- File.cat
- File.backup
- File.findir
- File.append_ext
- File.copydir
- File.dirglob
- File.absdir
- File.get_local
- File.finalize
- File.print
- File.set_printer
- Fixed/Updated Methods
- File.isfile
- File.download
- File.batch_download
- File.pexists
- File.whichpath
- File.copy
- File.bcopy
- Added TFDSIODataset
---
## Previous Version
---
```python
from fileio import File
'''
Recognized File Extensions
.json - json
.jsonl/.jsonlines - jsonlines
.csv - csv
.tsv - tsv with "\t" seperator
.txt - txtlines
.pkl - pickle
.pt - pytorch
.tfrecords - tensorflow
'''
# Main auto classes
File.open(filename, mode='r', auto=True, device=None) # device is specific to pytorch. Set auto=False to get a barebones Posix via Gfile
File.save(data, filename, overwrite=False) # if not overwrite, will attempt to append for newline files
File.load(filenames, device=None) # yields generators per file, meaning you can have different file types
File.download(url, dirpath=None, filename=None, overwrite=False) # Downloads a single url
File.gdown(url, extract=True, verbose=False) # uses gdown lib to grab a google drive drive
# Main i/o classes (Not Binary)
File.read(filename) # 'r'
File.write(filename) # 'w'
File.append(filename) # 'a'
# Binary
File.wb(filename) # 'wb'
File.rb(filename) # 'rb'
# Batch downloaders
File.batch_download(urls, directory=None, overwrite=False) # downloads all urls into a directory, skipping if overwrite = True and exists
File.batch_gdown(urls, directory=None, extract=True, verbose=False) # downloads all gdrive urls to a directory
# Extension Specific
# .json
File.jsonload(filename)
File.jsondump(dict, filename)
# .jsonl/.jsonlines (Single File)
File.jlg(filename)
File.jlw(data, filename, mode='auto', verbose=True)
# Multifile Readers
# .jsonl/.jsonlines
File.jgs(filenames)
```