barecat 0.2.6__tar.gz → 0.2.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. {barecat-0.2.6 → barecat-0.2.7}/PKG-INFO +1 -1
  2. {barecat-0.2.6 → barecat-0.2.7}/src/barecat/_version.py +16 -3
  3. {barecat-0.2.6 → barecat-0.2.7}/src/barecat/cli_impl.py +17 -7
  4. {barecat-0.2.6 → barecat-0.2.7}/src/barecat/upgrade_database.py +1 -2
  5. {barecat-0.2.6 → barecat-0.2.7}/src/barecat.egg-info/PKG-INFO +1 -1
  6. {barecat-0.2.6 → barecat-0.2.7}/.github/workflows/python-publish.yml +0 -0
  7. {barecat-0.2.6 → barecat-0.2.7}/.gitignore +0 -0
  8. {barecat-0.2.6 → barecat-0.2.7}/.readthedocs.yaml +0 -0
  9. {barecat-0.2.6 → barecat-0.2.7}/LICENSE +0 -0
  10. {barecat-0.2.6 → barecat-0.2.7}/MANIFEST.in +0 -0
  11. {barecat-0.2.6 → barecat-0.2.7}/README.md +0 -0
  12. {barecat-0.2.6 → barecat-0.2.7}/docs/Makefile +0 -0
  13. {barecat-0.2.6 → barecat-0.2.7}/docs/_static/styles/my_theme.css +0 -0
  14. {barecat-0.2.6 → barecat-0.2.7}/docs/_templates/autoapi/index.rst +0 -0
  15. {barecat-0.2.6 → barecat-0.2.7}/docs/_templates/autoapi/python/attribute.rst +0 -0
  16. {barecat-0.2.6 → barecat-0.2.7}/docs/_templates/autoapi/python/class.rst +0 -0
  17. {barecat-0.2.6 → barecat-0.2.7}/docs/_templates/autoapi/python/data.rst +0 -0
  18. {barecat-0.2.6 → barecat-0.2.7}/docs/_templates/autoapi/python/exception.rst +0 -0
  19. {barecat-0.2.6 → barecat-0.2.7}/docs/_templates/autoapi/python/function.rst +0 -0
  20. {barecat-0.2.6 → barecat-0.2.7}/docs/_templates/autoapi/python/method.rst +0 -0
  21. {barecat-0.2.6 → barecat-0.2.7}/docs/_templates/autoapi/python/module.rst +0 -0
  22. {barecat-0.2.6 → barecat-0.2.7}/docs/_templates/autoapi/python/package.rst +0 -0
  23. {barecat-0.2.6 → barecat-0.2.7}/docs/_templates/autoapi/python/property.rst +0 -0
  24. {barecat-0.2.6 → barecat-0.2.7}/docs/_templates/copyright.html +0 -0
  25. {barecat-0.2.6 → barecat-0.2.7}/docs/abbrev_long.bib +0 -0
  26. {barecat-0.2.6 → barecat-0.2.7}/docs/conf.py +0 -0
  27. {barecat-0.2.6 → barecat-0.2.7}/docs/index.rst +0 -0
  28. {barecat-0.2.6 → barecat-0.2.7}/docs/make.bat +0 -0
  29. {barecat-0.2.6 → barecat-0.2.7}/docs/references.bib +0 -0
  30. {barecat-0.2.6 → barecat-0.2.7}/docs/requirements.txt +0 -0
  31. {barecat-0.2.6 → barecat-0.2.7}/figure.png +0 -0
  32. {barecat-0.2.6 → barecat-0.2.7}/pyproject.toml +0 -0
  33. {barecat-0.2.6 → barecat-0.2.7}/setup.cfg +0 -0
  34. {barecat-0.2.6 → barecat-0.2.7}/src/barecat/__init__.py +0 -0
  35. {barecat-0.2.6 → barecat-0.2.7}/src/barecat/archive_formats.py +0 -0
  36. {barecat-0.2.6 → barecat-0.2.7}/src/barecat/cli.py +0 -0
  37. {barecat-0.2.6 → barecat-0.2.7}/src/barecat/codecs.py +0 -0
  38. {barecat-0.2.6 → barecat-0.2.7}/src/barecat/common.py +0 -0
  39. {barecat-0.2.6 → barecat-0.2.7}/src/barecat/consumed_threadpool.py +0 -0
  40. {barecat-0.2.6 → barecat-0.2.7}/src/barecat/core/__init__.py +0 -0
  41. {barecat-0.2.6 → barecat-0.2.7}/src/barecat/core/barecat.py +0 -0
  42. {barecat-0.2.6 → barecat-0.2.7}/src/barecat/core/index.py +0 -0
  43. {barecat-0.2.6 → barecat-0.2.7}/src/barecat/core/sharder.py +0 -0
  44. {barecat-0.2.6 → barecat-0.2.7}/src/barecat/defrag.py +0 -0
  45. {barecat-0.2.6 → barecat-0.2.7}/src/barecat/exceptions.py +0 -0
  46. {barecat-0.2.6 → barecat-0.2.7}/src/barecat/from_tar_stream.py +0 -0
  47. {barecat-0.2.6 → barecat-0.2.7}/src/barecat/glob_to_regex.py +0 -0
  48. {barecat-0.2.6 → barecat-0.2.7}/src/barecat/progbar.py +0 -0
  49. {barecat-0.2.6 → barecat-0.2.7}/src/barecat/sql/schema.sql +0 -0
  50. {barecat-0.2.6 → barecat-0.2.7}/src/barecat/threadsafe.py +0 -0
  51. {barecat-0.2.6 → barecat-0.2.7}/src/barecat/to_tar_stream.py +0 -0
  52. {barecat-0.2.6 → barecat-0.2.7}/src/barecat/upgrade_database2.py +0 -0
  53. {barecat-0.2.6 → barecat-0.2.7}/src/barecat/util.py +0 -0
  54. {barecat-0.2.6 → barecat-0.2.7}/src/barecat/viewerqt6.py +0 -0
  55. {barecat-0.2.6 → barecat-0.2.7}/src/barecat.egg-info/SOURCES.txt +0 -0
  56. {barecat-0.2.6 → barecat-0.2.7}/src/barecat.egg-info/dependency_links.txt +0 -0
  57. {barecat-0.2.6 → barecat-0.2.7}/src/barecat.egg-info/entry_points.txt +0 -0
  58. {barecat-0.2.6 → barecat-0.2.7}/src/barecat.egg-info/requires.txt +0 -0
  59. {barecat-0.2.6 → barecat-0.2.7}/src/barecat.egg-info/top_level.txt +0 -0
  60. {barecat-0.2.6 → barecat-0.2.7}/tests/test_barecat.py +0 -0
  61. {barecat-0.2.6 → barecat-0.2.7}/tests/test_cli.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: barecat
3
- Version: 0.2.6
3
+ Version: 0.2.7
4
4
  Summary: Scalable archive format for storing millions of small files with random access and SQLite indexing.
5
5
  Author-email: István Sárándi <istvan.sarandi@gmail.com>
6
6
  License: MIT License
@@ -1,7 +1,14 @@
1
1
  # file generated by setuptools-scm
2
2
  # don't change, don't track in version control
3
3
 
4
- __all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
4
+ __all__ = [
5
+ "__version__",
6
+ "__version_tuple__",
7
+ "version",
8
+ "version_tuple",
9
+ "__commit_id__",
10
+ "commit_id",
11
+ ]
5
12
 
6
13
  TYPE_CHECKING = False
7
14
  if TYPE_CHECKING:
@@ -9,13 +16,19 @@ if TYPE_CHECKING:
9
16
  from typing import Union
10
17
 
11
18
  VERSION_TUPLE = Tuple[Union[int, str], ...]
19
+ COMMIT_ID = Union[str, None]
12
20
  else:
13
21
  VERSION_TUPLE = object
22
+ COMMIT_ID = object
14
23
 
15
24
  version: str
16
25
  __version__: str
17
26
  __version_tuple__: VERSION_TUPLE
18
27
  version_tuple: VERSION_TUPLE
28
+ commit_id: COMMIT_ID
29
+ __commit_id__: COMMIT_ID
19
30
 
20
- __version__ = version = '0.2.6'
21
- __version_tuple__ = version_tuple = (0, 2, 6)
31
+ __version__ = version = '0.2.7'
32
+ __version_tuple__ = version_tuple = (0, 2, 7)
33
+
34
+ __commit_id__ = commit_id = 'gb334ebf79'
@@ -245,7 +245,12 @@ def barecat2archive(src_path, target_path):
245
245
 
246
246
  def print_ncdu_json(path):
247
247
  timestamp = time.time()
248
- print(f'[1,1,{{"progname":"barecat","progver":"0.1.2","timestamp":{timestamp}}},')
248
+ import importlib.metadata
249
+
250
+ progver = importlib.metadata.version('barecat')
251
+ progver = '.'.join(progver.split('.')[:3])
252
+
253
+ print(f'[1,1,{{"progname":"barecat","progver": {progver},"timestamp":{timestamp}}},')
249
254
  with barecat_.Index(path) as index_reader:
250
255
  _print_ncdu_json(index_reader, '')
251
256
  print(']')
@@ -255,15 +260,20 @@ def _print_ncdu_json(index_reader, dirpath):
255
260
  basename = '/' if dirpath == '' else osp.basename(dirpath)
256
261
 
257
262
  print('[', json.dumps(dict(name=basename, asize=4096, ino=0)), end='')
258
- subdirs, files = index_reader.listdir_with_sizes_and_counts(dirpath)
259
- if files:
263
+ infos = index_reader.listdir_infos(dirpath)
264
+ file_infos = [f for f in infos if isinstance(f, BarecatFileInfo)]
265
+ subdir_infos = [d for d in infos if isinstance(d, BarecatDirInfo)]
266
+ del infos
267
+
268
+ if file_infos:
260
269
  filedump = json.dumps(
261
- [dict(name=osp.basename(file), asize=size, dsize=size, ino=0) for file, size in files]
270
+ [dict(name=osp.basename(fi.path), asize=fi.size, dsize=fi.size, ino=0) for fi in file_infos]
262
271
  )
263
272
  print(',', filedump[1:-1], end='')
264
- del files
265
- for subdir, _, _ in subdirs:
273
+ del file_infos
274
+
275
+ for subdir in subdir_infos:
266
276
  print(',')
267
- _print_ncdu_json(index_reader, osp.join(dirpath, subdir))
277
+ _print_ncdu_json(index_reader, subdir.path)
268
278
 
269
279
  print(']', end='')
@@ -26,7 +26,7 @@ def main():
26
26
 
27
27
 
28
28
  def upgrade_schema(path: str):
29
- with barecat.Index(path_out + '-sqlite-index', readonly=False) as index_out:
29
+ with barecat.Index(path + '-sqlite-index', readonly=False) as index_out:
30
30
  c = index_out.cursor
31
31
  c.execute('COMMIT')
32
32
  c.execute('PRAGMA foreign_keys=OFF')
@@ -100,7 +100,6 @@ def update_crc32c(path_out: str, workers=8):
100
100
  def temp_crc_writer_main(dbpath, future_iter):
101
101
  with sqlite3.connect(dbpath) as conn:
102
102
  c = conn.cursor()
103
- c.execute('COMMIT')
104
103
  c.execute('PRAGMA synchronous=OFF')
105
104
  c.execute('PRAGMA journal_mode=OFF')
106
105
  c.execute("CREATE TABLE IF NOT EXISTS crc32c (path TEXT PRIMARY KEY, crc32c INTEGER)")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: barecat
3
- Version: 0.2.6
3
+ Version: 0.2.7
4
4
  Summary: Scalable archive format for storing millions of small files with random access and SQLite indexing.
5
5
  Author-email: István Sárándi <istvan.sarandi@gmail.com>
6
6
  License: MIT License
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes