pathpilot 0.4.1__tar.gz → 0.4.2__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 (36) hide show
  1. {pathpilot-0.4.1 → pathpilot-0.4.2}/PKG-INFO +1 -1
  2. {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/__init__.py +1 -1
  3. {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_file/base/df_dispatch_file.py +2 -2
  4. {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_file/kinds/_excel.py +1 -1
  5. {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_folder/folder/_contents/base.py +3 -7
  6. {pathpilot-0.4.1 → pathpilot-0.4.2}/pyproject.toml +1 -1
  7. {pathpilot-0.4.1 → pathpilot-0.4.2}/LICENSE +0 -0
  8. {pathpilot-0.4.1 → pathpilot-0.4.2}/README.md +0 -0
  9. {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_file/__init__.py +0 -0
  10. {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_file/_utils.py +0 -0
  11. {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_file/base/__init__.py +0 -0
  12. {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_file/base/_decorators.py +0 -0
  13. {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_file/base/core.py +0 -0
  14. {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_file/kinds/__init__.py +0 -0
  15. {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_file/kinds/_csv.py +0 -0
  16. {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_file/kinds/_parquet.py +0 -0
  17. {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_file/kinds/_pickle.py +0 -0
  18. {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_file/kinds/_sqlite.py +0 -0
  19. {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_file/kinds/_text.py +0 -0
  20. {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_file/kinds/_zip.py +0 -0
  21. {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_file/utils.py +0 -0
  22. {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_folder/__init__.py +0 -0
  23. {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_folder/backup.py +0 -0
  24. {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_folder/folder/__init__.py +0 -0
  25. {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_folder/folder/_contents/__init__.py +0 -0
  26. {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_folder/folder/_contents/files.py +0 -0
  27. {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_folder/folder/_contents/subfolders.py +0 -0
  28. {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_folder/folder/core.py +0 -0
  29. {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_folder/utils.py +0 -0
  30. {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_utils.py +0 -0
  31. {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/config.py +0 -0
  32. {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/core.py +0 -0
  33. {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/decorators.py +0 -0
  34. {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/exceptions.py +0 -0
  35. {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/path.py +0 -0
  36. {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pathpilot
3
- Version: 0.4.1
3
+ Version: 0.4.2
4
4
  Summary: Library that facilitates file and folder manipulation in Python.
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -21,5 +21,5 @@ from .utils import (
21
21
  get_modified_date,
22
22
  )
23
23
 
24
- __version__ = '0.4.1'
24
+ __version__ = '0.4.2'
25
25
  __author__ = 'Zachary Einck <zacharyeinck@gmail.com>'
@@ -31,7 +31,7 @@ class DfDispatchFile(File):
31
31
 
32
32
 
33
33
  @inject_df_backend
34
- def _save(self, obj, df_backend, **kwargs):
34
+ def _save(self, obj=None, df_backend=None, **kwargs):
35
35
 
36
36
  if df_backend == 'pandas':
37
37
  cast_func = odd.to_pandas_frame
@@ -40,7 +40,7 @@ class DfDispatchFile(File):
40
40
  cast_func = odd.to_polars_frame
41
41
  save_func = self._save_with_polars
42
42
 
43
- if _is_frame(obj):
43
+ if obj is not None and _is_frame(obj):
44
44
  obj = cast_func(obj)
45
45
 
46
46
  save_func(obj, **kwargs)
@@ -1515,7 +1515,7 @@ class ExcelFile(DfDispatchFile):
1515
1515
  df = normalize_if_lossless(
1516
1516
  df=df,
1517
1517
  selector=selector,
1518
- expr=((selector.round(decimals) % 1) == 0),
1518
+ expr=((selector % 1) == 0),
1519
1519
  dtype=pl.Int64
1520
1520
  )
1521
1521
 
@@ -135,8 +135,7 @@ class FolderContents(object):
135
135
  ------------
136
136
  name_pattern : str
137
137
  If not None, only object names meeting this pattern will be
138
- considered candidates. This argument is passed as the
139
- pd.Series.str.contains 'pat' argument.
138
+ considered candidates.
140
139
  name_literal
141
140
  Determines how 'name_pattern' is interpreted:
142
141
  • True → literal string
@@ -157,17 +156,14 @@ class FolderContents(object):
157
156
  There are a few scenarios to consider:
158
157
  • 'date_pattern' is None → an attempt will be made to derive
159
158
  the regex pattern using 'date_format' as the template.
160
- • 'date_pattern' is not None → 'date_format' is optional but
161
- it can be included if you do not want to rely on
162
- pd.to_datetime inferring the format.
159
+ • 'date_pattern' is not None → 'date_format' is optional.
163
160
 
164
161
  Example:
165
162
  ------------
166
163
  Dealing with the same example from above, all the following
167
164
  combinations will achieve the same result since the None values
168
165
  being inferred:
169
- • date_pattern=r'\d{4}\-\d{2}\-\d{2}',
170
- date_format='%Y-%m-%d'
166
+ • date_pattern=r'\d{4}\-\d{2}\-\d{2}', date_format='%Y-%m-%d'
171
167
  • date_pattern=None, date_format='%Y-%m-%d'
172
168
  • date_pattern=r'\d{4}\-\d{2}\-\d{2}', date_format=None
173
169
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pathpilot"
3
- version = "0.4.1"
3
+ version = "0.4.2"
4
4
  description = "Library that facilitates file and folder manipulation in Python."
5
5
  authors = ["Zachary Einck <zacharyeinck@gmail.com>"]
6
6
  license = "MIT"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes