ffwf 0.1.0rc1__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.
- ffwf-0.1.0rc1/.gitattributes +2 -0
- ffwf-0.1.0rc1/.github/workflows/ci.yml +72 -0
- ffwf-0.1.0rc1/.github/workflows/release.yml +75 -0
- ffwf-0.1.0rc1/.gitignore +32 -0
- ffwf-0.1.0rc1/Cargo.lock +894 -0
- ffwf-0.1.0rc1/Cargo.toml +24 -0
- ffwf-0.1.0rc1/PKG-INFO +17 -0
- ffwf-0.1.0rc1/README.md +184 -0
- ffwf-0.1.0rc1/data/error_handling.fwf +3 -0
- ffwf-0.1.0rc1/data/long_strings.fwf +2 -0
- ffwf-0.1.0rc1/data/multithreading.fwf +10 -0
- ffwf-0.1.0rc1/data/streaming_test.fwf +10 -0
- ffwf-0.1.0rc1/data/test_data.fwf +3 -0
- ffwf-0.1.0rc1/data/utf8_test.fwf +2 -0
- ffwf-0.1.0rc1/ffwf/__init__.py +220 -0
- ffwf-0.1.0rc1/ffwf/pandas.py +65 -0
- ffwf-0.1.0rc1/ffwf/polars.py +707 -0
- ffwf-0.1.0rc1/plots/agg_benchmark.png +0 -0
- ffwf-0.1.0rc1/plots/pipeline_benchmark.png +0 -0
- ffwf-0.1.0rc1/plots/read_benchmark.png +0 -0
- ffwf-0.1.0rc1/pyproject.toml +26 -0
- ffwf-0.1.0rc1/src/core.rs +402 -0
- ffwf-0.1.0rc1/src/lib.rs +283 -0
- ffwf-0.1.0rc1/tests/benchmarks/benchmark.py +323 -0
- ffwf-0.1.0rc1/tests/benchmarks/generate_large_fwf.py +133 -0
- ffwf-0.1.0rc1/tests/benchmarks/perf_write.py +43 -0
- ffwf-0.1.0rc1/tests/test_aliases.py +26 -0
- ffwf-0.1.0rc1/tests/test_arrow.py +45 -0
- ffwf-0.1.0rc1/tests/test_nan.py +46 -0
- ffwf-0.1.0rc1/tests/test_negative_zero.py +66 -0
- ffwf-0.1.0rc1/tests/test_oom.py +47 -0
- ffwf-0.1.0rc1/tests/test_pandas.py +31 -0
- ffwf-0.1.0rc1/tests/test_python.py +59 -0
- ffwf-0.1.0rc1/tests/test_streaming.py +46 -0
- ffwf-0.1.0rc1/tests/test_validation.py +64 -0
- ffwf-0.1.0rc1/tests/test_write.py +231 -0
- ffwf-0.1.0rc1/uv.lock +1701 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, master]
|
|
6
|
+
paths:
|
|
7
|
+
- "ffwf/**"
|
|
8
|
+
- "src/**"
|
|
9
|
+
- "pyproject.toml"
|
|
10
|
+
- "Cargo.toml"
|
|
11
|
+
- "Cargo.lock"
|
|
12
|
+
- "tests/**"
|
|
13
|
+
pull_request:
|
|
14
|
+
branches: [main, master]
|
|
15
|
+
types: [opened, synchronize, reopened, ready_for_review]
|
|
16
|
+
paths:
|
|
17
|
+
- "ffwf/**"
|
|
18
|
+
- "src/**"
|
|
19
|
+
- "pyproject.toml"
|
|
20
|
+
- "Cargo.toml"
|
|
21
|
+
- "Cargo.lock"
|
|
22
|
+
- "tests/**"
|
|
23
|
+
|
|
24
|
+
# Cancel in-progress runs when a new push is made to the same branch/PR
|
|
25
|
+
concurrency:
|
|
26
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
27
|
+
cancel-in-progress: true
|
|
28
|
+
|
|
29
|
+
jobs:
|
|
30
|
+
test:
|
|
31
|
+
name: ${{ matrix.os }} / py-${{ matrix.python-version }}
|
|
32
|
+
# Only run if the PR is not a draft
|
|
33
|
+
if: github.event.pull_request.draft == false || github.event_name == 'push'
|
|
34
|
+
runs-on: ${{ matrix.os }}
|
|
35
|
+
strategy:
|
|
36
|
+
fail-fast: false
|
|
37
|
+
matrix:
|
|
38
|
+
os: [ubuntu-latest, macos-latest, windows-latest, ubuntu-24.04-arm]
|
|
39
|
+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
|
|
40
|
+
|
|
41
|
+
steps:
|
|
42
|
+
- uses: actions/checkout@v4
|
|
43
|
+
|
|
44
|
+
- name: Install uv
|
|
45
|
+
uses: astral-sh/setup-uv@v5
|
|
46
|
+
with:
|
|
47
|
+
enable-cache: true
|
|
48
|
+
|
|
49
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
50
|
+
run: uv python install ${{ matrix.python-version }}
|
|
51
|
+
|
|
52
|
+
- name: Install Rust
|
|
53
|
+
uses: dtolnay/rust-toolchain@stable
|
|
54
|
+
|
|
55
|
+
- name: Cache Rust
|
|
56
|
+
uses: Swatinem/rust-cache@v2
|
|
57
|
+
- name: Build and install
|
|
58
|
+
run: |
|
|
59
|
+
# Adding native flags to squeeze performance in tests
|
|
60
|
+
export RUSTFLAGS="-C target-cpu=native"
|
|
61
|
+
uv venv
|
|
62
|
+
echo "VIRTUAL_ENV=.venv" >> $GITHUB_ENV
|
|
63
|
+
echo "PATH=.venv/bin:$PATH" >> $GITHUB_PATH
|
|
64
|
+
uv pip install maturin
|
|
65
|
+
uv run maturin develop --release
|
|
66
|
+
shell: bash
|
|
67
|
+
|
|
68
|
+
- name: Run tests
|
|
69
|
+
run: |
|
|
70
|
+
uv pip install -e ".[dev]"
|
|
71
|
+
uv run pytest --ignore=tests/test_oom.py
|
|
72
|
+
shell: bash
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build_wheels:
|
|
10
|
+
name: Build wheels on ${{ matrix.os }}
|
|
11
|
+
runs-on: ${{ matrix.os }}
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
- name: Build wheels
|
|
19
|
+
uses: PyO3/maturin-action@v1
|
|
20
|
+
with:
|
|
21
|
+
target: ${{ matrix.target }}
|
|
22
|
+
args: --release --out dist --find-interpreter
|
|
23
|
+
sccache: "true"
|
|
24
|
+
manylinux: auto
|
|
25
|
+
- name: Upload wheels
|
|
26
|
+
uses: actions/upload-artifact@v4
|
|
27
|
+
with:
|
|
28
|
+
name: wheels-${{ matrix.os }}-${{ strategy.job-index }}
|
|
29
|
+
path: dist
|
|
30
|
+
|
|
31
|
+
build_sdist:
|
|
32
|
+
name: Build sdist
|
|
33
|
+
runs-on: ubuntu-latest
|
|
34
|
+
steps:
|
|
35
|
+
- uses: actions/checkout@v4
|
|
36
|
+
- name: Build sdist
|
|
37
|
+
uses: PyO3/maturin-action@v1
|
|
38
|
+
with:
|
|
39
|
+
command: sdist
|
|
40
|
+
args: --out dist
|
|
41
|
+
- name: Upload sdist
|
|
42
|
+
uses: actions/upload-artifact@v4
|
|
43
|
+
with:
|
|
44
|
+
name: sdist
|
|
45
|
+
path: dist
|
|
46
|
+
|
|
47
|
+
publish:
|
|
48
|
+
name: 🚀 Publish to PyPI
|
|
49
|
+
runs-on: ubuntu-latest
|
|
50
|
+
needs: [build_wheels, build_sdist]
|
|
51
|
+
# This environment should have "Required Reviewers" enabled in GitHub Settings
|
|
52
|
+
environment: pypi
|
|
53
|
+
permissions:
|
|
54
|
+
id-token: write
|
|
55
|
+
contents: write
|
|
56
|
+
steps:
|
|
57
|
+
- name: Download all artifacts
|
|
58
|
+
uses: actions/download-artifact@v4
|
|
59
|
+
with:
|
|
60
|
+
path: dist
|
|
61
|
+
merge-multiple: true
|
|
62
|
+
|
|
63
|
+
- name: List files (for manual verification in logs)
|
|
64
|
+
run: ls -R dist/
|
|
65
|
+
|
|
66
|
+
- name: Publish to PyPI
|
|
67
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
68
|
+
with:
|
|
69
|
+
packages-dir: dist
|
|
70
|
+
|
|
71
|
+
- name: Create GitHub Release
|
|
72
|
+
uses: softprops/action-gh-release@v2
|
|
73
|
+
with:
|
|
74
|
+
files: dist/*
|
|
75
|
+
generate_release_notes: true
|
ffwf-0.1.0rc1/.gitignore
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Rust
|
|
2
|
+
/target
|
|
3
|
+
Cargo.lock
|
|
4
|
+
|
|
5
|
+
# Python
|
|
6
|
+
__pycache__/
|
|
7
|
+
*.py[cod]
|
|
8
|
+
*$py.class
|
|
9
|
+
*.so
|
|
10
|
+
.venv/
|
|
11
|
+
venv/
|
|
12
|
+
ENV/
|
|
13
|
+
env/
|
|
14
|
+
build/
|
|
15
|
+
dist/
|
|
16
|
+
*.egg-info/
|
|
17
|
+
.pytest_cache/
|
|
18
|
+
.ruff_cache/
|
|
19
|
+
.mypy_cache/
|
|
20
|
+
.coverage
|
|
21
|
+
htmlcov/
|
|
22
|
+
|
|
23
|
+
# Local data & benchmarks
|
|
24
|
+
data/*.fwf
|
|
25
|
+
# plots/*.png
|
|
26
|
+
|
|
27
|
+
# IDEs & OS
|
|
28
|
+
.vscode/
|
|
29
|
+
.idea/
|
|
30
|
+
.DS_Store
|
|
31
|
+
*.swp
|
|
32
|
+
*.swo
|