prelude-parser 0.3.0__tar.gz → 0.3.2__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.
Files changed (34) hide show
  1. {prelude_parser-0.3.0 → prelude_parser-0.3.2}/.github/workflows/pypi_publish.yml +4 -4
  2. {prelude_parser-0.3.0 → prelude_parser-0.3.2}/.github/workflows/testing.yml +13 -22
  3. {prelude_parser-0.3.0 → prelude_parser-0.3.2}/.pre-commit-config.yaml +4 -4
  4. {prelude_parser-0.3.0 → prelude_parser-0.3.2}/CONTRIBUTING.md +17 -13
  5. {prelude_parser-0.3.0 → prelude_parser-0.3.2}/Cargo.lock +96 -199
  6. {prelude_parser-0.3.0 → prelude_parser-0.3.2}/Cargo.toml +4 -4
  7. {prelude_parser-0.3.0 → prelude_parser-0.3.2}/PKG-INFO +6 -3
  8. {prelude_parser-0.3.0 → prelude_parser-0.3.2}/README.md +2 -0
  9. prelude_parser-0.3.2/prelude_parser/_prelude_parser.pyi +20 -0
  10. {prelude_parser-0.3.0 → prelude_parser-0.3.2}/prelude_parser/pandas.py +12 -2
  11. {prelude_parser-0.3.0 → prelude_parser-0.3.2}/prelude_parser/parser.py +8 -4
  12. {prelude_parser-0.3.0 → prelude_parser-0.3.2}/prelude_parser/polars.py +3 -2
  13. {prelude_parser-0.3.0 → prelude_parser-0.3.2}/pyproject.toml +3 -2
  14. prelude_parser-0.3.2/requirements-dev.txt +8 -0
  15. {prelude_parser-0.3.0 → prelude_parser-0.3.2}/src/lib.rs +47 -35
  16. prelude_parser-0.3.2/tests/assets/test4.xml +14 -0
  17. {prelude_parser-0.3.0 → prelude_parser-0.3.2}/tests/conftest.py +5 -0
  18. {prelude_parser-0.3.0 → prelude_parser-0.3.2}/tests/test_pandas.py +20 -2
  19. {prelude_parser-0.3.0 → prelude_parser-0.3.2}/tests/test_parser.py +28 -0
  20. {prelude_parser-0.3.0 → prelude_parser-0.3.2}/tests/test_polars.py +11 -0
  21. prelude_parser-0.3.0/prelude_parser/_prelude_parser.pyi +0 -16
  22. prelude_parser-0.3.0/requirements-dev.txt +0 -8
  23. {prelude_parser-0.3.0 → prelude_parser-0.3.2}/.github/dependabot.yml +0 -0
  24. {prelude_parser-0.3.0 → prelude_parser-0.3.2}/.github/release-draft-template.yml +0 -0
  25. {prelude_parser-0.3.0 → prelude_parser-0.3.2}/.github/workflows/release-drafter.yml +0 -0
  26. {prelude_parser-0.3.0 → prelude_parser-0.3.2}/.gitignore +0 -0
  27. {prelude_parser-0.3.0 → prelude_parser-0.3.2}/LICENSE +0 -0
  28. {prelude_parser-0.3.0 → prelude_parser-0.3.2}/justfile +0 -0
  29. {prelude_parser-0.3.0 → prelude_parser-0.3.2}/prelude_parser/__init__.py +0 -0
  30. {prelude_parser-0.3.0 → prelude_parser-0.3.2}/prelude_parser/py.typed +0 -0
  31. {prelude_parser-0.3.0 → prelude_parser-0.3.2}/tests/__init__.py +0 -0
  32. {prelude_parser-0.3.0 → prelude_parser-0.3.2}/tests/assets/test1.xml +0 -0
  33. {prelude_parser-0.3.0 → prelude_parser-0.3.2}/tests/assets/test2.xml +0 -0
  34. {prelude_parser-0.3.0 → prelude_parser-0.3.2}/tests/assets/test3.xml +0 -0
@@ -15,7 +15,7 @@ jobs:
15
15
  matrix:
16
16
  target: [x86_64, x86, aarch64, armv7, s390x, ppc64le]
17
17
  steps:
18
- - uses: actions/checkout@v3
18
+ - uses: actions/checkout@v4
19
19
  - uses: actions/setup-python@v4
20
20
  with:
21
21
  python-version: '3.11'
@@ -38,7 +38,7 @@ jobs:
38
38
  matrix:
39
39
  target: [x64, x86]
40
40
  steps:
41
- - uses: actions/checkout@v3
41
+ - uses: actions/checkout@v4
42
42
  - uses: actions/setup-python@v4
43
43
  with:
44
44
  python-version: '3.11'
@@ -61,7 +61,7 @@ jobs:
61
61
  matrix:
62
62
  target: [x86_64, aarch64]
63
63
  steps:
64
- - uses: actions/checkout@v3
64
+ - uses: actions/checkout@v4
65
65
  - uses: actions/setup-python@v4
66
66
  with:
67
67
  python-version: '3.11'
@@ -80,7 +80,7 @@ jobs:
80
80
  sdist:
81
81
  runs-on: ubuntu-latest
82
82
  steps:
83
- - uses: actions/checkout@v3
83
+ - uses: actions/checkout@v4
84
84
  - name: Build sdist
85
85
  uses: PyO3/maturin-action@v1
86
86
  with:
@@ -13,44 +13,35 @@ jobs:
13
13
  name: Clippy
14
14
  runs-on: ubuntu-latest
15
15
  steps:
16
- - uses: actions/checkout@v3
17
- - uses: actions-rs/toolchain@v1
18
- with:
19
- profile: minimal
20
- toolchain: stable
21
- override: true
22
- components: clippy
16
+ - uses: actions/checkout@v4
17
+ - name: Install Rust
18
+ run: |
19
+ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
23
20
  - name: Cache dependencies
24
- uses: Swatinem/rust-cache@v2.4.0
21
+ uses: Swatinem/rust-cache@v2.7.0
25
22
  - name: Run cargo clippy
26
- uses: actions-rs/cargo@v1
27
- with:
28
- command: clippy
29
- args: --all-targets -- --deny warnings
23
+ run: cargo clippy --all-targets -- --deny warnings
30
24
  fmt:
31
25
  name: Rustfmt
32
26
  runs-on: ubuntu-latest
33
27
  steps:
34
- - uses: actions/checkout@v3
35
- - uses: actions-rs/toolchain@v1
36
- with:
37
- profile: minimal
38
- toolchain: stable
39
- override: true
40
- components: rustfmt
28
+ - uses: actions/checkout@v4
29
+ - name: Install Rust
30
+ run: |
31
+ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
41
32
  - name: Cache dependencies
42
- uses: Swatinem/rust-cache@v2.4.0
33
+ uses: Swatinem/rust-cache@v2.7.0
43
34
  - name: Run cargo fmt
44
35
  run: cargo fmt --all -- --check
45
36
  test:
46
37
  strategy:
47
38
  fail-fast: false
48
39
  matrix:
49
- python-version: ["3.8", "3.9", "3.10", "3.11"]
40
+ python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
50
41
  os: [ubuntu-latest, windows-latest, macos-latest]
51
42
  runs-on: ${{ matrix.os }}
52
43
  steps:
53
- - uses: actions/checkout@v3
44
+ - uses: actions/checkout@v4
54
45
  - name: Set up Python ${{ matrix.python-version }}
55
46
  uses: actions/setup-python@v4
56
47
  with:
@@ -9,17 +9,17 @@ repos:
9
9
  - id: end-of-file-fixer
10
10
  - id: trailing-whitespace
11
11
  - repo: https://github.com/psf/black
12
- rev: 23.3.0
12
+ rev: 23.9.1
13
13
  hooks:
14
14
  - id: black
15
15
  language_version: python3
16
16
  args: [--line-length=100]
17
17
  - repo: https://github.com/pre-commit/mirrors-mypy
18
- rev: v1.3.0
18
+ rev: v1.5.1
19
19
  hooks:
20
20
  - id: mypy
21
- - repo: https://github.com/charliermarsh/ruff-pre-commit
22
- rev: v0.0.270
21
+ - repo: https://github.com/astral-sh/ruff-pre-commit
22
+ rev: v0.0.292
23
23
  hooks:
24
24
  - id: ruff
25
25
  args: [--fix, --exit-non-zero-on-fix]
@@ -2,7 +2,8 @@
2
2
 
3
3
  ## Where to start
4
4
 
5
- All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome.
5
+ All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are
6
+ welcome.
6
7
 
7
8
  The best place to start is to check the [issues](https://github.com/pbs-data-solutions/prelude-parser/issues)
8
9
  for something that interests you.
@@ -12,7 +13,8 @@ for something that interests you.
12
13
  Please include:
13
14
 
14
15
  1. A short, self-contained Python snippet reproducing the problem. You can format the code by using
15
- [GitHub markdown](https://docs.github.com/en/free-pro-team@latest/github/writing-on-github). For example:
16
+ [GitHub markdown](https://docs.github.com/en/free-pro-team@latest/github/writing-on-github). For
17
+ example:
16
18
 
17
19
  ```py
18
20
  from prelude_parser import parse_to_classes
@@ -40,7 +42,8 @@ cd prelude-parser
40
42
  git remote add upstream git@github.com:pbs-data-solutions/prelude-parser
41
43
  ```
42
44
 
43
- This creates the directory prelude-parser and connects your repository to the upstream (main project) repository.
45
+ This creates the directory prelude-parser and connects your repository to the upstream
46
+ (main project) repository.
44
47
 
45
48
  Next create a vitural environment and activate it.
46
49
 
@@ -72,8 +75,8 @@ git checkout -b my-new-feature
72
75
  ```
73
76
 
74
77
  This changes your working directory to the my-new-feature branch. Keep any changes in this branch
75
- specific to one bug or feature so the purpose is clear. You can have many `my-new-features` and switch
76
- in between them using the git checkout command.
78
+ specific to one bug or feature so the purpose is clear. You can have many `my-new-features` and
79
+ switch in between them using the git checkout command.
77
80
 
78
81
  When creating this branch, make sure your main branch is up to date with the latest upstream
79
82
  main version. To update your local main branch, you can do:
@@ -87,8 +90,8 @@ git pull upstream main --ff-only
87
90
 
88
91
  prelude-parser uses [ruff](https://github.com/charliermarsh/ruff), [Black](https://github.com/psf/black),
89
92
  and [mypy](https://mypy.readthedocs.io/en/stable/), [clippy](https://doc.rust-lang.org/clippy/), and
90
- [rustfmt](https://rust-lang.github.io/rustfmt/?version=v1.5.1&search=) to ensure consistant code
91
- formmating.
93
+ [rustfmt](https://rust-lang.github.io/rustfmt/?version=v1.5.1&search=) to ensure consistent code
94
+ formatting.
92
95
 
93
96
  You can run linting on your code at any time with:
94
97
 
@@ -113,8 +116,8 @@ pre-commit run --all-files
113
116
  ### Type Hints
114
117
 
115
118
  At a minimum all variables/arguments that receive data should contain type hints, and all
116
- functions/methods should specify the return type. For Rust functions and/or classes type stubs should
117
- be provided.
119
+ functions/methods should specify the return type. For Rust functions and/or classes type stubs
120
+ should be provided.
118
121
 
119
122
  Accepted examples:
120
123
 
@@ -123,7 +126,7 @@ def my_function(argument: str) -> None:
123
126
  ...
124
127
 
125
128
 
126
- def another_funciton(num: int) -> int:
129
+ def another_function(num: int) -> int:
127
130
  return num + 1
128
131
  ```
129
132
 
@@ -158,7 +161,8 @@ submitting a pull request.
158
161
 
159
162
  ## Committing your code
160
163
 
161
- Once you have made changes to the code on your branch you can see which files have changed by running:
164
+ Once you have made changes to the code on your branch you can see which files have changed by
165
+ running:
162
166
 
163
167
  ```sh
164
168
  git status
@@ -182,13 +186,13 @@ fix any errors. Once the errors are fixed you can run the same git commit comman
182
186
  ## Push your changes
183
187
 
184
188
  Once your changes are ready and all linting/tests are passing you can push your changes to your
185
- forked repositry:
189
+ forked repository:
186
190
 
187
191
  ```sh
188
192
  git push origin my-new-feature
189
193
  ```
190
194
 
191
- origin is the default name of your remote repositry on GitHub. You can see all of your remote
195
+ origin is the default name of your remote repository on GitHub. You can see all of your remote
192
196
  repositories by running:
193
197
 
194
198
  ```sh