feilian 1.2.3__py3-none-any.whl → 1.2.4__py3-none-any.whl

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.

Potentially problematic release.


This version of feilian might be problematic. Click here for more details.

feilian/_dist_ver.py CHANGED
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # file generated by setuptools_scm
3
3
  # don't change, don't track in version control
4
- VERSION = (1, 2, 3)
5
- __version__ = '1.2.3'
4
+ VERSION = (1, 2, 4)
5
+ __version__ = '1.2.4'
feilian/process.py CHANGED
@@ -61,11 +61,13 @@ class BaseProcessor(abc.ABC):
61
61
  self.save_result(output_path or input_path, result)
62
62
 
63
63
  class DataframeProcessor(BaseProcessor, abc.ABC):
64
- def __init__(self, input_dtype=None, progress=False, read_args: Dict[str, Any] = None):
64
+ def __init__(self, input_dtype=None, progress=False, read_args: Dict[str, Any] = None,
65
+ write_args: Dict[str, Any] = None):
65
66
  self.progress = progress
66
67
  self.read_args = read_args or {}
67
68
  if input_dtype is not None:
68
69
  self.read_args['dtype'] = input_dtype
70
+ self.write_args = write_args or {}
69
71
 
70
72
  def read_single_file(self, filepath: str) -> pd.DataFrame:
71
73
  return read_dataframe(filepath, **self.read_args)
@@ -77,7 +79,7 @@ class DataframeProcessor(BaseProcessor, abc.ABC):
77
79
  return super().read_data(filepath)
78
80
 
79
81
  def save_result(self, filepath: str, result: pd.DataFrame):
80
- save_dataframe(filepath, result)
82
+ save_dataframe(filepath, result, **self.write_args)
81
83
 
82
84
  @abc.abstractmethod
83
85
  def process_row(self, i: Hashable, row: pd.Series) -> Optional[Dict[str, Any]]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: feilian
3
- Version: 1.2.3
3
+ Version: 1.2.4
4
4
  Summary: General data processing tool.
5
5
  Author-email: darkpeath <darkpeath@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/darkpeath/feilian
@@ -1,15 +1,15 @@
1
1
  feilian/__init__.py,sha256=97Rvz2O6LknvCWInAjINH4GeqG4-QPPcep9n-V7KD8k,911
2
- feilian/_dist_ver.py,sha256=WDsMjivFi6Plqpo4JtGV48YaZNQnJ56AduVgKWA5Klo,148
2
+ feilian/_dist_ver.py,sha256=TGdOX8xyOAjxGzF3EzzykrQBIQOf5UL-RdO-kNZ39qg,148
3
3
  feilian/arg.py,sha256=n2nIcmC_3rb9A6BOzm9C5z3-T4lnubaGzH2sFhtqwZQ,8402
4
4
  feilian/dataframe.py,sha256=BtW6IQrXTF9hQCeccIXkedSjrpfuSKkzWGxd0VxiVHU,11390
5
5
  feilian/datetime.py,sha256=IONvWhLeGEy9IVe6GWKEW3FhrfRrShyhGP8-RTf9r3c,763
6
6
  feilian/io.py,sha256=aYN3QwWcLoRKzhGMNutqdkmxArVcXfeWXzxCB07LcFc,155
7
7
  feilian/json.py,sha256=1FkQ6e4JmbccpxhMobXpsGg-f7uVrTtUmu6jDCXCFTQ,1406
8
- feilian/process.py,sha256=3uig0s_X_espK26tD1cKkapi1gatT1M3zoiFwAws6PU,3153
8
+ feilian/process.py,sha256=XEasezmaTHc1GNmB-v0sAbtwqMO3sOMLNRDD4GGxYp4,3267
9
9
  feilian/string.py,sha256=G_X3dnR0Oxmi4hXF-6E5jm5M7GPjGoMYrSMyI1dj6Z4,370
10
10
  feilian/utils.py,sha256=pzzGEgngidVkYvuNJWY7KWjkdgGRuH5_ENaLS6kxBtk,2648
11
11
  feilian/version.py,sha256=oH_DvE7jRCWlCCX9SSadwxwRJXFas_rIisYLBGPYZn4,350
12
- feilian-1.2.3.dist-info/METADATA,sha256=1yull6iP_bypv8etP-9wxoc0zOMdYgXwvlixByFN4xs,3722
13
- feilian-1.2.3.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
14
- feilian-1.2.3.dist-info/top_level.txt,sha256=1Q2-B6KJrcTr7drW_kik35PTVEUJLPP4wVrn0kYKwGw,8
15
- feilian-1.2.3.dist-info/RECORD,,
12
+ feilian-1.2.4.dist-info/METADATA,sha256=CNWtizgtCFtVf_C82O7rQVDI-DZUqTrHFW3ayVaz0RI,3722
13
+ feilian-1.2.4.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
14
+ feilian-1.2.4.dist-info/top_level.txt,sha256=1Q2-B6KJrcTr7drW_kik35PTVEUJLPP4wVrn0kYKwGw,8
15
+ feilian-1.2.4.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (72.1.0)
2
+ Generator: setuptools (74.1.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5