pyrsb3 0.1.0__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.
@@ -0,0 +1,41 @@
1
+ name: ci
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+
7
+ jobs:
8
+ rust:
9
+ name: fmt and clippy
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+ - uses: dtolnay/rust-toolchain@stable
14
+ with:
15
+ components: rustfmt, clippy
16
+ - run: cargo fmt --check
17
+ - run: cargo clippy --all-targets -- -D warnings
18
+
19
+ test:
20
+ name: test (${{ matrix.os }}, python ${{ matrix.python }})
21
+ runs-on: ${{ matrix.os }}
22
+ strategy:
23
+ fail-fast: false
24
+ matrix:
25
+ os: [ubuntu-latest, macos-latest, windows-latest]
26
+ python: ["3.10", "3.13"]
27
+ steps:
28
+ - uses: actions/checkout@v4
29
+ - uses: actions/setup-python@v5
30
+ with:
31
+ python-version: ${{ matrix.python }}
32
+ - uses: dtolnay/rust-toolchain@stable
33
+ - name: Build and install
34
+ run: pip install ".[test]"
35
+ - name: Test
36
+ run: pytest -v
37
+ - name: Type stubs match the module
38
+ if: matrix.os == 'ubuntu-latest' && matrix.python == '3.13'
39
+ run: |
40
+ pip install mypy pyarrow-stubs
41
+ python -m mypy.stubtest rsb3._rsb3 --ignore-disjoint-bases --allowlist stubtest-allowlist.txt
@@ -0,0 +1,90 @@
1
+ name: release
2
+
3
+ # The file name workflow.yml is the one registered on PyPI as trusted
4
+ # publisher: do not rename it.
5
+ #
6
+ # Wheels for every platform on demand; on a tag vX.Y.Z they are also
7
+ # published to PyPI by trusted publishing (the project must be registered as
8
+ # a trusted publisher on pypi.org, environment "pypi").
9
+
10
+ on:
11
+ push:
12
+ tags: ["v*"]
13
+ workflow_dispatch:
14
+
15
+ permissions:
16
+ contents: read
17
+
18
+ jobs:
19
+ # a tag has to name the version that Cargo.toml declares
20
+ version:
21
+ if: startsWith(github.ref, 'refs/tags/v')
22
+ runs-on: ubuntu-latest
23
+ steps:
24
+ - uses: actions/checkout@v4
25
+ - run: |
26
+ declared=$(grep -m1 '^version' Cargo.toml | cut -d'"' -f2)
27
+ test "v$declared" = "$GITHUB_REF_NAME" || { echo "tag $GITHUB_REF_NAME, Cargo.toml $declared"; exit 1; }
28
+
29
+ wheels:
30
+ name: wheel (${{ matrix.os }}, ${{ matrix.target }})
31
+ runs-on: ${{ matrix.os }}
32
+ strategy:
33
+ fail-fast: false
34
+ matrix:
35
+ include:
36
+ - { os: ubuntu-latest, target: x86_64 }
37
+ - { os: ubuntu-latest, target: aarch64 }
38
+ - { os: macos-latest, target: aarch64 }
39
+ - { os: macos-latest, target: x86_64 }
40
+ - { os: windows-latest, target: x64 }
41
+ steps:
42
+ - uses: actions/checkout@v4
43
+ - uses: PyO3/maturin-action@v1
44
+ with:
45
+ target: ${{ matrix.target }}
46
+ args: --release --out dist
47
+ manylinux: auto
48
+ - uses: actions/setup-python@v5
49
+ with:
50
+ python-version: "3.12"
51
+ - name: Test the wheel
52
+ # only where the wheel runs on the machine that built it
53
+ if: (matrix.os == 'ubuntu-latest' && matrix.target == 'x86_64') || (matrix.os == 'macos-latest' && matrix.target == 'aarch64') || matrix.os == 'windows-latest'
54
+ shell: bash
55
+ run: |
56
+ python -m pip install pytest
57
+ # sem --no-index: a dependência pyarrow vem do PyPI, o pyrsb3 de dist/
58
+ python -m pip install --find-links dist pyrsb3
59
+ python -m pytest -q
60
+ - uses: actions/upload-artifact@v4
61
+ with:
62
+ name: wheel-${{ matrix.os }}-${{ matrix.target }}
63
+ path: dist
64
+
65
+ sdist:
66
+ runs-on: ubuntu-latest
67
+ steps:
68
+ - uses: actions/checkout@v4
69
+ - uses: PyO3/maturin-action@v1
70
+ with:
71
+ command: sdist
72
+ args: --out dist
73
+ - uses: actions/upload-artifact@v4
74
+ with:
75
+ name: sdist
76
+ path: dist
77
+
78
+ publish:
79
+ if: startsWith(github.ref, 'refs/tags/v')
80
+ needs: [version, wheels, sdist]
81
+ runs-on: ubuntu-latest
82
+ environment: pypi
83
+ permissions:
84
+ id-token: write
85
+ steps:
86
+ - uses: actions/download-artifact@v4
87
+ with:
88
+ path: dist
89
+ merge-multiple: true
90
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,11 @@
1
+ /target
2
+ Cargo.lock
3
+ __pycache__/
4
+ *.so
5
+ *.pyd
6
+ .venv/
7
+ dist/
8
+ .pytest_cache/
9
+ .mypy_cache/
10
+ .DS_Store
11
+ .claude/
@@ -0,0 +1,7 @@
1
+ # Changelog
2
+
3
+ ## [0.1.0] — 2026-10-29
4
+
5
+ Primeira versão: `fetch`, `parse`, `parse_bytes`, `load`, `to_parquet`,
6
+ `schema` e `file_name` sobre o crate `rsb3` 0.2.0; saída como `pyarrow.Table`
7
+ no esquema v1; exceções `LayoutError`, `RecordError` e `DownloadError`.
@@ -0,0 +1,28 @@
1
+ cff-version: 1.2.0
2
+ message: "If you use this package, please cite it as below."
3
+ title: "pyrsb3: B3 public files as Arrow (Python bindings of the rsb3 Rust crate)"
4
+ type: software
5
+ license: MIT
6
+ repository-code: "https://github.com/milkway/pyrsb3"
7
+ url: "https://pypi.org/project/pyrsb3/"
8
+ authors:
9
+ - family-names: Leite
10
+ given-names: André
11
+ email: leite@castlab.org
12
+ orcid: "https://orcid.org/0000-0002-4718-9766"
13
+ version: "0.1.0"
14
+ date-released: "2026-10-29"
15
+ keywords:
16
+ - B3
17
+ - Bovespa
18
+ - COTAHIST
19
+ - finance
20
+ - Arrow
21
+ - Python
22
+ - Rust
23
+ abstract: >-
24
+ pyrsb3 is the Python binding of rsb3, a Rust crate that downloads, validates
25
+ and converts the public files of B3, the Brazilian stock exchange, into
26
+ Arrow. The COTAHIST parser reads the official 245-byte fixed-width historical
27
+ quotes file strictly, keeps prices as integer cents and hands the result to
28
+ Python as a pyarrow.Table through the Arrow C Data Interface.