Skip to content

Commit

Permalink
chore: update everything
Browse files Browse the repository at this point in the history
  • Loading branch information
ObserverOfTime committed Feb 12, 2024
1 parent a775470 commit b5bfd8d
Show file tree
Hide file tree
Showing 10 changed files with 96 additions and 126 deletions.
42 changes: 5 additions & 37 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,10 @@ name: Build and upload to PyPI

on:
push:
tags: ['*']
tags: ["*"]

jobs:
build_wheels:
name: Build on ${{matrix.os}}
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-2019, macos-11]
steps:
- uses: actions/checkout@v4
name: Checkout repository
- uses: pypa/cibuildwheel@v2.16.2
name: Build wheels
with:
output-dir: dist
- uses: actions/upload-artifact@v3
name: Upload wheel artifacts
with:
path: dist/*.whl

upload_pypi:
name: Upload wheels to PyPI
needs: [build_wheels]
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/tree-sitter-pymanifest/
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v3
name: Download wheel artifacts
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@v1.8.10
name: Publish to PyPI
pypi:
uses: tree-sitter-grammars/.github/.github/workflows/package-pypi.yml@main
secrets:
PYPI_API_TOKEN: ${{secrets.PYPI_TOKEN}}
47 changes: 22 additions & 25 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,34 @@ name: Test grammar & Python package

on:
push:
branches: [master]
branches: ["*"]
paths:
- grammar.js
- src/**
- bindings/**
- binding.gyp
pull_request:
branches: [master]
branches: ["*"]
paths:
- grammar.js
- src/**
- bindings/**
- binding.gyp

jobs:
test-grammar:
runs-on: ubuntu-latest
name: Test the grammar
steps:
- uses: actions/checkout@v4
name: Checkout repository
- uses: actions/setup-node@v4
name: Set up NodeJS
with:
node-version: 18
- run: npm install
name: Install dependencies
- run: npm test
name: Run tests

uses: tree-sitter-grammars/.github/.github/workflows/ci.yml@main
test-package:
runs-on: ubuntu-latest
name: Test the Python package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: Checkout repository
- uses: actions/setup-python@v4
name: Set up Python
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- run: pip install -e .
name: Install dependencies
- run: test/test_package.py
name: Run tests
- name: Install dependencies
run: pip install -e .
- name: Run tests
run: test/test_package.py
4 changes: 2 additions & 2 deletions Cargo.toml

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

28 changes: 24 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
tree-sitter-pymanifest
======================

.. image:: https://badgen.net/github/checks/ObserverOfTime/tree-sitter-pymanifest?label=CI&icon=github
:target: https://github.com/ObserverOfTime/tree-sitter-pymanifest/actions/workflows/ci.yml
:alt: CI
|CI| |discord| |matrix| |pypi|

A tree-sitter parser for PyPA manifest files.

Expand Down Expand Up @@ -39,7 +37,7 @@ Usage
References
----------

* `MANIFEST.in commands <https://packaging.python.org/en/latest/guides/using-manifest-in/#manifest-in-commands>`_
* `Controlling files in the distribution <https://setuptools.pypa.io/en/latest/userguide/miscellaneous.html>`_
* `Unix filename pattern matching <https://docs.python.org/3/library/fnmatch.html>`_

Editors
Expand All @@ -48,6 +46,7 @@ Editors
| |c| Neovim
| |u| Helix
| |u| Emacs
| |u| Zed
.. |u| unicode:: U+00A0 U+00A0 U+2610
.. |c| unicode:: U+00A0 U+00A0 U+2611
Expand All @@ -56,6 +55,11 @@ Editors
Changelog
---------

v0.3.0
^^^^^^

* Move to ``tree-sitter-grammars`` org

v0.2.1
^^^^^^

Expand All @@ -72,3 +76,19 @@ v0.1.1
^^^^^^

* Bundle queries in the package

.. |CI| image:: https://img.shields.io/github/actions/workflow/status/tree-sitter-grammars/tree-sitter-pymanifest/test.yml?logo=github&label=CI
:target: https://github.com/tree-sitter-grammars/tree-sitter-pymanifest/actions/workflows/test.yml
:alt: CI

.. |discord| image:: https://img.shields.io/discord/1063097320771698699?logo=discord&label=tree-sitter
:target: https://discord.gg/w7nTvsVJhm
:alt: discord

.. |matrix| image:: https://img.shields.io/matrix/nvim-treesitter%3Amatrix.org?logo=matrix&label=nvim-treesitter
:target: https://matrix.to/#/#nvim-treesitter:matrix.org
:alt: matrix

.. |pypi| image:: https://img.shields.io/pypi/v/tree-sitter-pymanifest?logo=pypi&logoColor=ffd242
:target: https://pypi.org/project/tree-sitter-pymanifest/
:alt: pypi
7 changes: 5 additions & 2 deletions binding.gyp

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

30 changes: 2 additions & 28 deletions bindings/rust/build.rs

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

16 changes: 8 additions & 8 deletions bindings/rust/lib.rs

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "tree-sitter-pymanifest",
"version": "0.2.1",
"version": "0.3.0",
"license": "MIT",
"description": "PyPA manifest grammar for tree-sitter",
"repository": "ObserverOfTime/tree-sitter-pymanifest",
"repository": "tree-sitter-grammars/tree-sitter-pymanifest",
"author": {
"name": "ObserverOfTime",
"email": "chronobserver@disroot.org",
Expand All @@ -25,7 +25,7 @@
"nan": "^2.18.0"
},
"devDependencies": {
"tree-sitter-cli": "^0.20.8"
"tree-sitter-cli": "~0.21.0-pre-release-1"
},
"tree-sitter": [
{
Expand Down
26 changes: 14 additions & 12 deletions src/parser.c

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

0 comments on commit b5bfd8d

Please sign in to comment.