feilian 1.1.3__tar.gz → 1.1.4__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.
Potentially problematic release.
This version of feilian might be problematic. Click here for more details.
- {feilian-1.1.3/feilian.egg-info → feilian-1.1.4}/PKG-INFO +1 -1
- {feilian-1.1.3 → feilian-1.1.4}/feilian/arg.py +5 -1
- {feilian-1.1.3 → feilian-1.1.4}/feilian/dataframe.py +6 -3
- {feilian-1.1.3 → feilian-1.1.4}/feilian/json.py +2 -0
- feilian-1.1.4/feilian/string.py +13 -0
- {feilian-1.1.3 → feilian-1.1.4/feilian.egg-info}/PKG-INFO +1 -1
- {feilian-1.1.3 → feilian-1.1.4}/feilian.egg-info/SOURCES.txt +2 -5
- feilian-1.1.3/.github/workflows/publish.yml +0 -40
- feilian-1.1.3/.github/workflows/release.yml +0 -21
- feilian-1.1.3/.gitignore +0 -31
- feilian-1.1.3/feilian.egg-info/top_level.txt +0 -1
- {feilian-1.1.3 → feilian-1.1.4}/README.md +0 -0
- {feilian-1.1.3 → feilian-1.1.4}/feilian/__init__.py +0 -0
- {feilian-1.1.3 → feilian-1.1.4}/feilian/datetime.py +0 -0
- {feilian-1.1.3 → feilian-1.1.4}/feilian/io.py +0 -0
- {feilian-1.1.3 → feilian-1.1.4}/feilian/version.py +0 -0
- {feilian-1.1.3 → feilian-1.1.4}/feilian.egg-info/dependency_links.txt +0 -0
- {feilian-1.1.3 → feilian-1.1.4}/feilian.egg-info/requires.txt +0 -0
- {feilian-1.1.3 → feilian-1.1.4}/packaging.sh +0 -0
- {feilian-1.1.3 → feilian-1.1.4}/requirements.txt +0 -0
- {feilian-1.1.3 → feilian-1.1.4}/setup.cfg +0 -0
- {feilian-1.1.3 → feilian-1.1.4}/setup.py +0 -0
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
|
|
3
|
-
from typing import Union, List, Any, Iterable, Callable, Set, Optional, Tuple,
|
|
3
|
+
from typing import Union, List, Any, Iterable, Callable, Set, Optional, Tuple, Dict, Hashable
|
|
4
|
+
try:
|
|
5
|
+
from typing import Literal
|
|
6
|
+
except ImportError:
|
|
7
|
+
from typing_extensions import Literal
|
|
4
8
|
|
|
5
9
|
_build_in_na_checkers = {
|
|
6
10
|
'always_na': lambda x: True,
|
|
@@ -4,10 +4,13 @@
|
|
|
4
4
|
Encapsulate methods for pandas `DataFrame`.
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
|
-
from typing import Union, Iterable, Dict,
|
|
8
|
-
|
|
9
|
-
import
|
|
7
|
+
from typing import Union, Iterable, Dict, List, Any, Sequence, Callable, Tuple, Hashable
|
|
8
|
+
try:
|
|
9
|
+
from typing import Literal
|
|
10
|
+
except ImportError:
|
|
11
|
+
from typing_extensions import Literal
|
|
10
12
|
|
|
13
|
+
import os
|
|
11
14
|
import pandas as pd
|
|
12
15
|
import random
|
|
13
16
|
import collections
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from typing import Dict, List, Union, Any
|
|
4
4
|
import json
|
|
5
|
+
from .io import ensure_parent_dir_exist
|
|
5
6
|
|
|
6
7
|
def read_json(filepath: str, encoding='utf-8', **kwargs):
|
|
7
8
|
"""
|
|
@@ -15,5 +16,6 @@ def save_json(filepath: str, data: Union[Dict[str, Any], List[Any]],
|
|
|
15
16
|
"""
|
|
16
17
|
An agent for `json.dump()` with some default value.
|
|
17
18
|
"""
|
|
19
|
+
ensure_parent_dir_exist(filepath)
|
|
18
20
|
with open(filepath, 'w', encoding=encoding, newline=newline) as f:
|
|
19
21
|
json.dump(data, f, indent=indent, ensure_ascii=ensure_ascii, **kwargs)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
|
|
3
|
+
from typing import Any, Callable
|
|
4
|
+
|
|
5
|
+
def join_values(*values: Any, sep='', func: Callable[[Any], str] = str, do_trim=False, ignore_empty=False):
|
|
6
|
+
def f():
|
|
7
|
+
for x in values:
|
|
8
|
+
s = func(x)
|
|
9
|
+
if do_trim:
|
|
10
|
+
s = s.strip()
|
|
11
|
+
if s or not ignore_empty:
|
|
12
|
+
yield s
|
|
13
|
+
return sep.join(f())
|
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
.gitignore
|
|
2
1
|
README.md
|
|
3
2
|
packaging.sh
|
|
4
3
|
requirements.txt
|
|
5
4
|
setup.py
|
|
6
|
-
.github/workflows/publish.yml
|
|
7
|
-
.github/workflows/release.yml
|
|
8
5
|
feilian/__init__.py
|
|
9
6
|
feilian/arg.py
|
|
10
7
|
feilian/dataframe.py
|
|
11
8
|
feilian/datetime.py
|
|
12
9
|
feilian/io.py
|
|
13
10
|
feilian/json.py
|
|
11
|
+
feilian/string.py
|
|
14
12
|
feilian/version.py
|
|
15
13
|
feilian.egg-info/PKG-INFO
|
|
16
14
|
feilian.egg-info/SOURCES.txt
|
|
17
15
|
feilian.egg-info/dependency_links.txt
|
|
18
|
-
feilian.egg-info/requires.txt
|
|
19
|
-
feilian.egg-info/top_level.txt
|
|
16
|
+
feilian.egg-info/requires.txt
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# This workflow will upload a Python Package using Twine when a release is created
|
|
2
|
-
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
|
|
3
|
-
|
|
4
|
-
# This workflow uses actions that are not certified by GitHub.
|
|
5
|
-
# They are provided by a third-party and are governed by
|
|
6
|
-
# separate terms of service, privacy policy, and support
|
|
7
|
-
# documentation.
|
|
8
|
-
|
|
9
|
-
name: Publish to PyPI.org
|
|
10
|
-
|
|
11
|
-
on:
|
|
12
|
-
push:
|
|
13
|
-
tags:
|
|
14
|
-
- v[0-9]+.*
|
|
15
|
-
|
|
16
|
-
permissions:
|
|
17
|
-
contents: read
|
|
18
|
-
|
|
19
|
-
jobs:
|
|
20
|
-
pypi:
|
|
21
|
-
runs-on: ubuntu-latest
|
|
22
|
-
steps:
|
|
23
|
-
- name: Checkout
|
|
24
|
-
uses: actions/checkout@v3
|
|
25
|
-
- name: Set up Python
|
|
26
|
-
uses: actions/setup-python@v3
|
|
27
|
-
with:
|
|
28
|
-
python-version: '3.x'
|
|
29
|
-
- name: Install dependencies
|
|
30
|
-
run: |
|
|
31
|
-
python -m pip install --upgrade pip
|
|
32
|
-
python -m pip install --upgrade build wheel
|
|
33
|
-
python -m pip install -r requirements.txt
|
|
34
|
-
- name: Build package
|
|
35
|
-
run: python -m build --no-isolation
|
|
36
|
-
- name: Publish package
|
|
37
|
-
uses: pypa/gh-action-pypi-publish@release/v1
|
|
38
|
-
with:
|
|
39
|
-
user: __token__
|
|
40
|
-
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
name: Release
|
|
2
|
-
|
|
3
|
-
permissions:
|
|
4
|
-
contents: write
|
|
5
|
-
|
|
6
|
-
on:
|
|
7
|
-
push:
|
|
8
|
-
tags:
|
|
9
|
-
- v[0-9]+.*
|
|
10
|
-
|
|
11
|
-
jobs:
|
|
12
|
-
create-release:
|
|
13
|
-
runs-on: ubuntu-latest
|
|
14
|
-
steps:
|
|
15
|
-
- name: Checkout
|
|
16
|
-
uses: actions/checkout@v3
|
|
17
|
-
- name: Create release
|
|
18
|
-
uses: taiki-e/create-gh-release-action@v1
|
|
19
|
-
with:
|
|
20
|
-
# (Required) GitHub token for creating GitHub Releases.
|
|
21
|
-
token: ${{ secrets.GITHUB_TOKEN }}
|
feilian-1.1.3/.gitignore
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# idea ignore
|
|
2
|
-
.idea/
|
|
3
|
-
*.ipr
|
|
4
|
-
*.iml
|
|
5
|
-
*.iws
|
|
6
|
-
|
|
7
|
-
# temp ignore
|
|
8
|
-
*.log
|
|
9
|
-
*.cache
|
|
10
|
-
*.diff
|
|
11
|
-
*.patch
|
|
12
|
-
*.tmp
|
|
13
|
-
*.swp
|
|
14
|
-
|
|
15
|
-
# system ignore
|
|
16
|
-
*.DS_Store
|
|
17
|
-
Thumbs.db
|
|
18
|
-
hs_err_pid*
|
|
19
|
-
|
|
20
|
-
# pyc ignore
|
|
21
|
-
*.pyc
|
|
22
|
-
|
|
23
|
-
# test ignore
|
|
24
|
-
_trial_temp/
|
|
25
|
-
|
|
26
|
-
# build ignore
|
|
27
|
-
build/
|
|
28
|
-
*.egg-info/
|
|
29
|
-
|
|
30
|
-
# package files
|
|
31
|
-
dist/
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
feilian
|
|
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
|