fpathlib 0.1.4.dev16__tar.gz → 0.1.5__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.
- {fpathlib-0.1.4.dev16/src/fpathlib.egg-info → fpathlib-0.1.5}/PKG-INFO +1 -1
- {fpathlib-0.1.4.dev16 → fpathlib-0.1.5}/conda-recipe/meta.yaml +2 -2
- {fpathlib-0.1.4.dev16 → fpathlib-0.1.5}/scripts/pypi.sh +8 -1
- {fpathlib-0.1.4.dev16 → fpathlib-0.1.5}/src/fpathlib/_version.py +3 -3
- {fpathlib-0.1.4.dev16 → fpathlib-0.1.5}/src/fpathlib/expand.py +19 -14
- {fpathlib-0.1.4.dev16 → fpathlib-0.1.5}/src/fpathlib/ext/polars.py +1 -1
- {fpathlib-0.1.4.dev16 → fpathlib-0.1.5/src/fpathlib.egg-info}/PKG-INFO +1 -1
- fpathlib-0.1.5/src/fpathlib.egg-info/scm_version.json +8 -0
- fpathlib-0.1.4.dev16/src/fpathlib.egg-info/scm_version.json +0 -8
- {fpathlib-0.1.4.dev16 → fpathlib-0.1.5}/.gitignore +0 -0
- {fpathlib-0.1.4.dev16 → fpathlib-0.1.5}/LICENSE +0 -0
- {fpathlib-0.1.4.dev16 → fpathlib-0.1.5}/MANIFEST.in +0 -0
- {fpathlib-0.1.4.dev16 → fpathlib-0.1.5}/README.md +0 -0
- {fpathlib-0.1.4.dev16 → fpathlib-0.1.5}/TODO.txt +0 -0
- {fpathlib-0.1.4.dev16 → fpathlib-0.1.5}/docs/Makefile +0 -0
- {fpathlib-0.1.4.dev16 → fpathlib-0.1.5}/docs/make.bat +0 -0
- {fpathlib-0.1.4.dev16 → fpathlib-0.1.5}/docs/source/api.rst +0 -0
- {fpathlib-0.1.4.dev16 → fpathlib-0.1.5}/docs/source/conf.py +0 -0
- {fpathlib-0.1.4.dev16 → fpathlib-0.1.5}/docs/source/index.rst +0 -0
- {fpathlib-0.1.4.dev16 → fpathlib-0.1.5}/pyproject.toml +0 -0
- {fpathlib-0.1.4.dev16 → fpathlib-0.1.5}/scripts/conda.sh +0 -0
- {fpathlib-0.1.4.dev16 → fpathlib-0.1.5}/scripts/deploy.sh +0 -0
- {fpathlib-0.1.4.dev16 → fpathlib-0.1.5}/scripts/docs.sh +0 -0
- {fpathlib-0.1.4.dev16 → fpathlib-0.1.5}/scripts/tag.sh +0 -0
- {fpathlib-0.1.4.dev16 → fpathlib-0.1.5}/setup.cfg +0 -0
- {fpathlib-0.1.4.dev16 → fpathlib-0.1.5}/src/fpathlib/__init__.py +0 -0
- {fpathlib-0.1.4.dev16 → fpathlib-0.1.5}/src/fpathlib/ext/__init__.py +0 -0
- {fpathlib-0.1.4.dev16 → fpathlib-0.1.5}/src/fpathlib/fpath.py +0 -0
- {fpathlib-0.1.4.dev16 → fpathlib-0.1.5}/src/fpathlib/path.py +0 -0
- {fpathlib-0.1.4.dev16 → fpathlib-0.1.5}/src/fpathlib/utils.py +0 -0
- {fpathlib-0.1.4.dev16 → fpathlib-0.1.5}/src/fpathlib.egg-info/SOURCES.txt +0 -0
- {fpathlib-0.1.4.dev16 → fpathlib-0.1.5}/src/fpathlib.egg-info/dependency_links.txt +0 -0
- {fpathlib-0.1.4.dev16 → fpathlib-0.1.5}/src/fpathlib.egg-info/requires.txt +0 -0
- {fpathlib-0.1.4.dev16 → fpathlib-0.1.5}/src/fpathlib.egg-info/scm_file_list.json +0 -0
- {fpathlib-0.1.4.dev16 → fpathlib-0.1.5}/src/fpathlib.egg-info/top_level.txt +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{% set name = "fpathlib" %}
|
|
2
|
-
{% set version = "0.1.
|
|
2
|
+
{% set version = "0.1.4" %}
|
|
3
3
|
|
|
4
4
|
package:
|
|
5
5
|
name: {{ name|lower }}
|
|
@@ -7,7 +7,7 @@ package:
|
|
|
7
7
|
|
|
8
8
|
source:
|
|
9
9
|
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/fpathlib-{{ version }}.tar.gz
|
|
10
|
-
sha256:
|
|
10
|
+
sha256: 8ff44332a465c2adb5c45f94d6ee79c958fb50c39e896b16734d0d8208026c77
|
|
11
11
|
|
|
12
12
|
build:
|
|
13
13
|
noarch: python
|
|
@@ -21,7 +21,14 @@ python3 -m build
|
|
|
21
21
|
# 0.1.3/0.1.2 tag-collision incident slipped past a git-describe check even
|
|
22
22
|
# though the build itself came out as a .devN), inspect what actually got
|
|
23
23
|
# built. This is the real signal of whether the release is clean.
|
|
24
|
-
|
|
24
|
+
#
|
|
25
|
+
# `grep -c` exits 1 (not just prints "0") when it finds zero matches --
|
|
26
|
+
# with `set -e` active (deploy.sh sets it, and this script is sourced into
|
|
27
|
+
# that same shell), that silently killed the whole deploy right here for
|
|
28
|
+
# every *clean* release build (the exact case with 0 .dev files), before
|
|
29
|
+
# ever reaching twine upload. `|| true` keeps the count without letting
|
|
30
|
+
# grep's "no matches" exit status abort the script.
|
|
31
|
+
dev_artifacts=$(ls dist/ | grep -c '\.dev[0-9]' || true)
|
|
25
32
|
if [ $allow_dev -eq 0 ] && [ "$dev_artifacts" != "0" ]
|
|
26
33
|
then
|
|
27
34
|
echo "built version is a dev version (tag doesn't point at a clean, distinct commit -- check 'git describe --tags --long' and 'git status'), not uploading to pypi"
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '0.1.
|
|
22
|
-
__version_tuple__ = version_tuple = (0, 1,
|
|
21
|
+
__version__ = version = '0.1.5'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 1, 5)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'gae98b27f0'
|
|
@@ -63,7 +63,7 @@ def iexpand_fpath(fpath, *, exclude_path_patterns=None, require_metadata=True, e
|
|
|
63
63
|
)
|
|
64
64
|
|
|
65
65
|
|
|
66
|
-
def expand_fpath_decorator(f=None, require_expandable=
|
|
66
|
+
def expand_fpath_decorator(f=None, require_expandable=False, post_process=None):
|
|
67
67
|
"""
|
|
68
68
|
Decorator for :func:`.expand_fpath`.
|
|
69
69
|
|
|
@@ -71,6 +71,11 @@ def expand_fpath_decorator(f=None, require_expandable=True, post_process=None):
|
|
|
71
71
|
----------
|
|
72
72
|
f : :obj:`callable`
|
|
73
73
|
A function that takes an :obj:`.ExpandedFPath` as its first argument.
|
|
74
|
+
require_expandable : :obj:`bool`
|
|
75
|
+
Whether to require `fpath` to have {} named captures. If False
|
|
76
|
+
(the default), a plain literal path or glob is passed straight
|
|
77
|
+
through to `f` unexpanded, with `post_process` skipped -- there's
|
|
78
|
+
no ExpandedFPath to hand it in that case. (Default: False)
|
|
74
79
|
post_process : :obj:`callable`
|
|
75
80
|
A function that takes the output of `f` and the :obj:`.ExpandedFPath`.
|
|
76
81
|
(Default: None).
|
|
@@ -84,18 +89,8 @@ def expand_fpath_decorator(f=None, require_expandable=True, post_process=None):
|
|
|
84
89
|
expanded_fpath = fpath
|
|
85
90
|
result = f(fpath, *args, **kwargs)
|
|
86
91
|
|
|
87
|
-
#
|
|
88
|
-
|
|
89
|
-
# What happens if fpath is not expandable?
|
|
90
|
-
# If require_expandable is True, raise an error.
|
|
91
|
-
# Otherwise, just call f with the original fpath.
|
|
92
|
-
if not is_expandable(fpath):
|
|
93
|
-
if require_expandable:
|
|
94
|
-
msg = f"fpath not expandable: '{fpath}'"
|
|
95
|
-
raise ValueError(msg)
|
|
96
|
-
return f(fpath, *args, **kwargs)
|
|
97
|
-
|
|
98
|
-
# We know fpath is expandable, so we can expand it and call f
|
|
92
|
+
# Expand fpath if it is expandable.
|
|
93
|
+
elif is_expandable(fpath):
|
|
99
94
|
exclude_path_patterns = kwargs.pop("exclude_path_patterns", None)
|
|
100
95
|
require_metadata = kwargs.pop("require_metadata", True)
|
|
101
96
|
expanded_fpath = expand_fpath(
|
|
@@ -105,7 +100,17 @@ def expand_fpath_decorator(f=None, require_expandable=True, post_process=None):
|
|
|
105
100
|
)
|
|
106
101
|
result = f(expanded_fpath, *args, **kwargs)
|
|
107
102
|
|
|
108
|
-
#
|
|
103
|
+
# fpath has no {} captures, so there's no ExpandedFPath to
|
|
104
|
+
# build -- nothing for post_process (e.g. join_metadata) to
|
|
105
|
+
# join metadata from. Call f directly and return immediately,
|
|
106
|
+
# skipping post_process entirely, rather than falling through
|
|
107
|
+
# to it with no expanded_fpath to give it.
|
|
108
|
+
else:
|
|
109
|
+
if require_expandable:
|
|
110
|
+
msg = f"fpath not expandable: '{fpath}'"
|
|
111
|
+
raise ValueError(msg)
|
|
112
|
+
return f(fpath, *args, **kwargs)
|
|
113
|
+
|
|
109
114
|
if post_process is not None:
|
|
110
115
|
result = post_process(result, expanded_fpath)
|
|
111
116
|
|
|
@@ -160,7 +160,7 @@ def scan_parquet(expanded_fpath, *args, **kwargs):
|
|
|
160
160
|
|
|
161
161
|
|
|
162
162
|
# TODO rename expanded_fpath as source
|
|
163
|
-
@expand_fpath_decorator(
|
|
163
|
+
@expand_fpath_decorator(post_process=join_metadata)
|
|
164
164
|
def scan_txt(
|
|
165
165
|
expanded_fpath,
|
|
166
166
|
filter_expr=None,
|
|
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
|