pathpilot 0.7.0__tar.gz → 0.7.1__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.
- {pathpilot-0.7.0 → pathpilot-0.7.1}/PKG-INFO +1 -1
- {pathpilot-0.7.0 → pathpilot-0.7.1}/pathpilot/__init__.py +1 -1
- {pathpilot-0.7.0 → pathpilot-0.7.1}/pathpilot/_file/kinds/_excel.py +18 -18
- {pathpilot-0.7.0 → pathpilot-0.7.1}/pyproject.toml +29 -29
- {pathpilot-0.7.0 → pathpilot-0.7.1}/uv.lock +1 -1
- {pathpilot-0.7.0 → pathpilot-0.7.1}/.gitignore +0 -0
- {pathpilot-0.7.0 → pathpilot-0.7.1}/.python-version +0 -0
- {pathpilot-0.7.0 → pathpilot-0.7.1}/LICENSE +0 -0
- {pathpilot-0.7.0 → pathpilot-0.7.1}/README.md +0 -0
- {pathpilot-0.7.0 → pathpilot-0.7.1}/pathpilot/_file/__init__.py +0 -0
- {pathpilot-0.7.0 → pathpilot-0.7.1}/pathpilot/_file/_utils.py +0 -0
- {pathpilot-0.7.0 → pathpilot-0.7.1}/pathpilot/_file/base/__init__.py +0 -0
- {pathpilot-0.7.0 → pathpilot-0.7.1}/pathpilot/_file/base/_decorators.py +0 -0
- {pathpilot-0.7.0 → pathpilot-0.7.1}/pathpilot/_file/base/_temp.py +0 -0
- {pathpilot-0.7.0 → pathpilot-0.7.1}/pathpilot/_file/base/core.py +0 -0
- {pathpilot-0.7.0 → pathpilot-0.7.1}/pathpilot/_file/base/df_dispatch_file.py +0 -0
- {pathpilot-0.7.0 → pathpilot-0.7.1}/pathpilot/_file/kinds/__init__.py +0 -0
- {pathpilot-0.7.0 → pathpilot-0.7.1}/pathpilot/_file/kinds/_csv.py +0 -0
- {pathpilot-0.7.0 → pathpilot-0.7.1}/pathpilot/_file/kinds/_parquet.py +0 -0
- {pathpilot-0.7.0 → pathpilot-0.7.1}/pathpilot/_file/kinds/_pickle.py +0 -0
- {pathpilot-0.7.0 → pathpilot-0.7.1}/pathpilot/_file/kinds/_sqlite.py +0 -0
- {pathpilot-0.7.0 → pathpilot-0.7.1}/pathpilot/_file/kinds/_text.py +0 -0
- {pathpilot-0.7.0 → pathpilot-0.7.1}/pathpilot/_file/kinds/_zip.py +0 -0
- {pathpilot-0.7.0 → pathpilot-0.7.1}/pathpilot/_file/utils.py +0 -0
- {pathpilot-0.7.0 → pathpilot-0.7.1}/pathpilot/_folder/__init__.py +0 -0
- {pathpilot-0.7.0 → pathpilot-0.7.1}/pathpilot/_folder/backup.py +0 -0
- {pathpilot-0.7.0 → pathpilot-0.7.1}/pathpilot/_folder/folder/__init__.py +0 -0
- {pathpilot-0.7.0 → pathpilot-0.7.1}/pathpilot/_folder/folder/_contents/__init__.py +0 -0
- {pathpilot-0.7.0 → pathpilot-0.7.1}/pathpilot/_folder/folder/_contents/base.py +0 -0
- {pathpilot-0.7.0 → pathpilot-0.7.1}/pathpilot/_folder/folder/_contents/files.py +0 -0
- {pathpilot-0.7.0 → pathpilot-0.7.1}/pathpilot/_folder/folder/_contents/subfolders.py +0 -0
- {pathpilot-0.7.0 → pathpilot-0.7.1}/pathpilot/_folder/folder/core.py +0 -0
- {pathpilot-0.7.0 → pathpilot-0.7.1}/pathpilot/_folder/utils.py +0 -0
- {pathpilot-0.7.0 → pathpilot-0.7.1}/pathpilot/_utils.py +0 -0
- {pathpilot-0.7.0 → pathpilot-0.7.1}/pathpilot/config.py +0 -0
- {pathpilot-0.7.0 → pathpilot-0.7.1}/pathpilot/core.py +0 -0
- {pathpilot-0.7.0 → pathpilot-0.7.1}/pathpilot/decorators.py +0 -0
- {pathpilot-0.7.0 → pathpilot-0.7.1}/pathpilot/exceptions.py +0 -0
- {pathpilot-0.7.0 → pathpilot-0.7.1}/pathpilot/path.py +0 -0
- {pathpilot-0.7.0 → pathpilot-0.7.1}/pathpilot/utils.py +0 -0
|
@@ -33,9 +33,9 @@ class ExcelFile(DfDispatchFile):
|
|
|
33
33
|
--------------------
|
|
34
34
|
writer : ExcelWriter
|
|
35
35
|
pd.ExcelWriter instance
|
|
36
|
-
|
|
36
|
+
_active_sheet : xlsxwriter.worksheet.Worksheet
|
|
37
37
|
The active worksheet
|
|
38
|
-
|
|
38
|
+
_sheet_cache : dict
|
|
39
39
|
Dictionary where the keys are worksheet names and values are the
|
|
40
40
|
worksheet objects. It is important to note that the keys are the
|
|
41
41
|
original sheet names passed by the user as opposed to the actual name
|
|
@@ -49,14 +49,14 @@ class ExcelFile(DfDispatchFile):
|
|
|
49
49
|
{'bold': True}}. These are intended to be frequently used formats that
|
|
50
50
|
can be both used individually and as building blocks for more complex
|
|
51
51
|
formats (see self.add_format for more information.)
|
|
52
|
-
|
|
52
|
+
_format_cache : dict
|
|
53
53
|
keys are hashes of sorted dictionaries containing format parameters
|
|
54
54
|
and values are xlsxwriter.format.Format. This is done so that only one
|
|
55
55
|
format instance will be created per unique format used.
|
|
56
|
-
|
|
56
|
+
_number_tabs : bool
|
|
57
57
|
if True, tabs in the workbook will have a number prefix. For example,
|
|
58
58
|
'MyTab' would be appear as '1 - MyTab' in the workbook.
|
|
59
|
-
|
|
59
|
+
_page : int
|
|
60
60
|
keeps track of the current tab number
|
|
61
61
|
|
|
62
62
|
Note:
|
|
@@ -137,20 +137,20 @@ class ExcelFile(DfDispatchFile):
|
|
|
137
137
|
if isinstance(key, (int, slice)):
|
|
138
138
|
return self.sheets[key]
|
|
139
139
|
elif isinstance(key, str):
|
|
140
|
-
return self.
|
|
140
|
+
return self._sheet_cache[key]
|
|
141
141
|
else:
|
|
142
142
|
raise TypeError
|
|
143
143
|
|
|
144
144
|
|
|
145
145
|
def __iter__(self):
|
|
146
146
|
''' iterate through worksheet objects '''
|
|
147
|
-
for key, sheet in self.
|
|
147
|
+
for key, sheet in self._sheet_cache.items():
|
|
148
148
|
yield key, sheet
|
|
149
149
|
|
|
150
150
|
|
|
151
151
|
def __contains__(self, key):
|
|
152
152
|
''' returns True if worksheet exists in workbook '''
|
|
153
|
-
return key in self.
|
|
153
|
+
return key in self._sheet_cache
|
|
154
154
|
|
|
155
155
|
|
|
156
156
|
#╭-------------------------------------------------------------------------╮
|
|
@@ -475,13 +475,13 @@ class ExcelFile(DfDispatchFile):
|
|
|
475
475
|
def sheet_name_map(self):
|
|
476
476
|
''' dictionary mapping user's worksheet names to their truncated
|
|
477
477
|
counterparts '''
|
|
478
|
-
return {k: v.name for k, v in self.
|
|
478
|
+
return {k: v.name for k, v in self._sheet_cache.items()}
|
|
479
479
|
|
|
480
480
|
|
|
481
481
|
@property
|
|
482
482
|
def sheets(self):
|
|
483
483
|
''' list of worksheet objects '''
|
|
484
|
-
return list(self.
|
|
484
|
+
return list(self._sheet_cache.values())
|
|
485
485
|
|
|
486
486
|
|
|
487
487
|
@property
|
|
@@ -501,8 +501,8 @@ class ExcelFile(DfDispatchFile):
|
|
|
501
501
|
call_wrapped=True,
|
|
502
502
|
)
|
|
503
503
|
def active_sheet(self, value):
|
|
504
|
-
if value in self.
|
|
505
|
-
self._active_sheet = self.
|
|
504
|
+
if value in self._sheet_cache:
|
|
505
|
+
self._active_sheet = self._sheet_cache[value]
|
|
506
506
|
else:
|
|
507
507
|
self.create_worksheet(value)
|
|
508
508
|
|
|
@@ -524,9 +524,9 @@ class ExcelFile(DfDispatchFile):
|
|
|
524
524
|
|
|
525
525
|
key = name[:]
|
|
526
526
|
|
|
527
|
-
if key in self.
|
|
527
|
+
if key in self._sheet_cache:
|
|
528
528
|
raise ValueError(
|
|
529
|
-
f
|
|
529
|
+
f'A worksheet with name {name!r} was already created.'
|
|
530
530
|
)
|
|
531
531
|
|
|
532
532
|
if self.number_tabs:
|
|
@@ -550,7 +550,7 @@ class ExcelFile(DfDispatchFile):
|
|
|
550
550
|
name = f'{name[:index]}{counter}'
|
|
551
551
|
counter += 1
|
|
552
552
|
|
|
553
|
-
self.
|
|
553
|
+
self._sheet_cache[key] = self.workbook.add_worksheet(name)
|
|
554
554
|
self.active_sheet = key
|
|
555
555
|
|
|
556
556
|
|
|
@@ -1354,10 +1354,10 @@ class ExcelFile(DfDispatchFile):
|
|
|
1354
1354
|
|
|
1355
1355
|
key = sha256(str(sorted(list(arg.items()))))
|
|
1356
1356
|
|
|
1357
|
-
if key not in self.
|
|
1358
|
-
self.
|
|
1357
|
+
if key not in self._format_cache:
|
|
1358
|
+
self._format_cache[key] = self.workbook.add_format(arg)
|
|
1359
1359
|
|
|
1360
|
-
return self.
|
|
1360
|
+
return self._format_cache[key]
|
|
1361
1361
|
|
|
1362
1362
|
|
|
1363
1363
|
def _read_with_pandas(self, **kwargs):
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
[project]
|
|
2
|
-
name = "pathpilot"
|
|
3
|
-
version = "0.7.
|
|
4
|
-
description = "Simplifies file and folder manipulation"
|
|
5
|
-
authors = [
|
|
6
|
-
{ name = "Zachary Einck", email = "zacharyeinck@gmail.com" }
|
|
7
|
-
]
|
|
8
|
-
license = { text = "MIT" }
|
|
9
|
-
readme = "README.md"
|
|
10
|
-
requires-python = ">=3.13"
|
|
11
|
-
dependencies = [
|
|
12
|
-
"cachegrab>=0.2.3",
|
|
13
|
-
"clockwork>=0.7.0",
|
|
14
|
-
"fastexcel>=0.19.0",
|
|
15
|
-
"numpy>=2.4.4",
|
|
16
|
-
"oddments>=0.10.0",
|
|
17
|
-
"openpyxl>=3.1.5",
|
|
18
|
-
"pandas>=3.0.2",
|
|
19
|
-
"polars>=1.39.3",
|
|
20
|
-
"xlsxwriter>=3.2.9",
|
|
21
|
-
]
|
|
22
|
-
|
|
23
|
-
[project.urls]
|
|
24
|
-
repository = "https://github.com/zteinck/pathpilot"
|
|
25
|
-
homepage = "https://github.com/zteinck/pathpilot"
|
|
26
|
-
|
|
27
|
-
[build-system]
|
|
28
|
-
requires = ["hatchling"]
|
|
29
|
-
build-backend = "hatchling.build"
|
|
1
|
+
[project]
|
|
2
|
+
name = "pathpilot"
|
|
3
|
+
version = "0.7.1"
|
|
4
|
+
description = "Simplifies file and folder manipulation"
|
|
5
|
+
authors = [
|
|
6
|
+
{ name = "Zachary Einck", email = "zacharyeinck@gmail.com" }
|
|
7
|
+
]
|
|
8
|
+
license = { text = "MIT" }
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.13"
|
|
11
|
+
dependencies = [
|
|
12
|
+
"cachegrab>=0.2.3",
|
|
13
|
+
"clockwork>=0.7.0",
|
|
14
|
+
"fastexcel>=0.19.0",
|
|
15
|
+
"numpy>=2.4.4",
|
|
16
|
+
"oddments>=0.10.0",
|
|
17
|
+
"openpyxl>=3.1.5",
|
|
18
|
+
"pandas>=3.0.2",
|
|
19
|
+
"polars>=1.39.3",
|
|
20
|
+
"xlsxwriter>=3.2.9",
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
[project.urls]
|
|
24
|
+
repository = "https://github.com/zteinck/pathpilot"
|
|
25
|
+
homepage = "https://github.com/zteinck/pathpilot"
|
|
26
|
+
|
|
27
|
+
[build-system]
|
|
28
|
+
requires = ["hatchling"]
|
|
29
|
+
build-backend = "hatchling.build"
|
|
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
|
|
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
|