Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update workflows, bindings, and versions #261

Merged
merged 2 commits into from
Mar 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
* text eol=lf

examples/crlf-line-endings.py eol=crlf
examples/python2-grammar-crlf.py eol=crlf
examples/python3-grammar-crlf.py eol=crlf

src/*.json linguist-generated
src/parser.c linguist-generated
src/tree_sitter/* linguist-generated
Expand All @@ -8,3 +12,4 @@ bindings/** linguist-generated
binding.gyp linguist-generated
setup.py linguist-generated
Makefile linguist-generated
Package.swift linguist-generated
19 changes: 9 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,21 @@ jobs:
node-version: ${{vars.NODE_VERSION}}
- name: Set up examples
run: |-
git clone https://github.com/numpy/numpy examples/numpy --depth=1 --filter=blob:none
git clone https://github.com/django/django examples/django --depth=1 --filter=blob:none
git clone https://github.com/pallets/flask examples/flask --depth=1 --filter=blob:none
git clone https://github.com/python/cpython examples/cpython --depth=1 --filter=blob:none
git clone https://github.com/numpy/numpy examples/numpy --single-branch --depth=1 --filter=blob:none
git clone https://github.com/django/django examples/django --single-branch --depth=1 --filter=blob:none
git clone https://github.com/pallets/flask examples/flask --single-branch --depth=1 --filter=blob:none
git clone https://github.com/python/cpython examples/cpython --single-branch --depth=1 --filter=blob:none
- name: Run tests
uses: tree-sitter/parser-test-action@v1.1
uses: tree-sitter/parser-test-action@v1.2
with:
lint: true
lint: ${{runner.os == 'Linux'}}
test-library: ${{runner.os == 'Linux'}}
examples: |
corpus-files: |
examples/**/*.py
!examples/cpython/Lib/test/badsyntax_3131.py
!examples/cpython/Lib/test/badsyntax_future8.py
!examples/cpython/Lib/test/test_compile.py
!examples/cpython/Lib/test/tokenizedata/badsyntax_3131.py
!examples/cpython/Tools/build/generate_re_casefix.py
invalid-files: |
examples/cpython/Lib/test/tokenizedata/badsyntax_3131.py
fuzz:
name: Fuzz parser
runs-on: ubuntu-latest
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,8 @@ jobs:
crates:
uses: tree-sitter/workflows/.github/workflows/package-crates.yml@main
secrets:
CARGO_REGISTRY_TOKEN: ${{secrets.CARGO_TOKEN}}
CARGO_REGISTRY_TOKEN: ${{secrets.CARGO_REGISTRY_TOKEN}}
pypi:
uses: tree-sitter/workflows/.github/workflows/package-pypi.yml@main
secrets:
PYPI_API_TOKEN: ${{secrets.PYPI_API_TOKEN}}
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "tree-sitter-python"
description = "Python grammar for tree-sitter"
version = "0.20.4"
version = "0.21.0"
authors = [
"Max Brunsfeld <[email protected]>",
"Amaan Qureshi <[email protected]>",
Expand Down
12 changes: 10 additions & 2 deletions Makefile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Package.swift

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
[![matrix][matrix]](https://matrix.to/#/#tree-sitter-chat:matrix.org)
[![crates][crates]](https://crates.io/crates/tree-sitter-python)
[![npm][npm]](https://www.npmjs.com/package/tree-sitter-python)
[![pypi][pypi]](https://pypi.org/project/tree-sitter-python/)

Python grammar for [tree-sitter][].

Expand All @@ -20,3 +21,4 @@ Python grammar for [tree-sitter][].
[matrix]: https://img.shields.io/matrix/tree-sitter-chat%3Amatrix.org?logo=matrix&label=matrix
[npm]: https://img.shields.io/npm/v/tree-sitter-python?logo=npm
[crates]: https://img.shields.io/crates/v/tree-sitter-python?logo=rust
[pypi]: https://img.shields.io/pypi/v/tree-sitter-python?logo=pypi&logoColor=ffd242
7 changes: 3 additions & 4 deletions binding.gyp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bindings/go/binding.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 13 additions & 22 deletions bindings/node/binding.cc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions bindings/node/index.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 3 additions & 15 deletions bindings/node/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading