Skip to content
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
7 changes: 5 additions & 2 deletions .github/workflows/docs-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: CI Documentation

on: [push, pull_request]

permissions: {}
jobs:
build:
runs-on: ubuntu-24.04
Expand All @@ -13,10 +14,12 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
persist-credentials: false

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
with:
python-version: ${{ matrix.python-version }}

Expand Down
20 changes: 13 additions & 7 deletions .github/workflows/pypi-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,18 @@ on:
tags:
- "v*.*.*"

permissions: {}
jobs:
build-pypi-distribs:
name: Build and publish library to PyPI
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
with:
python-version: 3.12

Expand All @@ -40,27 +43,30 @@ jobs:
run: python -m twine check dist/*

- name: Upload built archives
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f
with:
name: pypi_archives
path: dist/*


create-gh-release:
permissions:
contents: write # to create GitHub release (softprops/action-gh-release)

name: Create GH release
needs:
- build-pypi-distribs
runs-on: ubuntu-24.04

steps:
- name: Download built archives
uses: actions/download-artifact@v4
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131
with:
name: pypi_archives
path: dist

- name: Create GH release
uses: softprops/action-gh-release@v2
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda
Comment thread
AyanSinhaMahapatra marked this conversation as resolved.
Dismissed
with:
draft: true
files: dist/*
Expand All @@ -77,11 +83,11 @@ jobs:

steps:
- name: Download built archives
uses: actions/download-artifact@v4
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131
with:
name: pypi_archives
path: dist

- name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b
24 changes: 24 additions & 0 deletions .github/workflows/zizmor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: GitHub Actions Security Analysis with zizmor 🌈

on:
push:
branches: ["main"]
pull_request:
branches: ["**"]

permissions: {}

jobs:
zizmor:
name: Run zizmor 🌈
runs-on: ubuntu-latest
permissions:
security-events: write # Required for upload-sarif (used by zizmor-action) to upload SARIF files.
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Run zizmor 🌈
uses: zizmorcore/zizmor-action@b1d7e1fb5de872772f31590499237e7cce841e8e # v0.5.3
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Changelog
=========

v0.7.2
------

- Relax version constraints and update dependencies


v0.7.1
------

Expand Down
10 changes: 10 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,13 @@ jobs:
all: |
sudo apt-get install universal-ctags gettext
venv/bin/pytest -n 2 -vvs

# - template: etc/ci/azure-posix.yml
# parameters:
# job_name: macos15_cpython
# image_name: macos-14
# python_versions: ['3.10', '3.11', '3.12', '3.13', '3.14']
# test_suites:
# all: |
# brew install universal-ctags gettext
# venv/bin/pytest -n 2 -vvs
4 changes: 4 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ install_packages() {
# be reinstalled a second time and reused from the virtualenv and this
# speeds up the installation.
# We always have the PEP517 build dependencies installed already.
"$CFG_BIN_DIR/pip" install \
--upgrade \
--no-build-isolation \
maturin

"$CFG_BIN_DIR/pip" install \
--upgrade \
Expand Down
6 changes: 3 additions & 3 deletions etc/scripts/utils_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"""
Utilities to manage requirements files and call pip.
NOTE: this should use ONLY the standard library and not import anything else
because this is used for boostrapping with no requirements installed.
because this is used for bootstrapping with no requirements installed.
"""


Expand All @@ -31,7 +31,7 @@ def load_requirements(requirements_file="requirements.txt", with_unpinned=False)

def get_required_name_versions(requirement_lines, with_unpinned=False):
"""
Yield required (name, version) tuples given a`requirement_lines` iterable of
Yield required (name, version) tuples given a `requirement_lines` iterable of
requirement text lines. Only accept requirements pinned to an exact version.
"""

Expand All @@ -47,7 +47,7 @@ def get_required_name_versions(requirement_lines, with_unpinned=False):

def get_required_name_version(requirement, with_unpinned=False):
"""
Return a (name, version) tuple given a`requirement` specifier string.
Return a (name, version) tuple given a `requirement` specifier string.
Requirement version must be pinned. If ``with_unpinned`` is True, unpinned
requirements are accepted and only the name portion is returned.

Expand Down
12 changes: 12 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
tree-sitter==0.26.0
tree-sitter-bash==0.25.1
tree-sitter-c==0.24.2
tree-sitter-cpp==0.23.4
tree-sitter-c-sharp==0.23.5
tree-sitter-go==0.25.0
tree-sitter-java==0.23.5
tree-sitter-javascript==0.25.0
tree-sitter-objc==3.0.2
tree-sitter-python==0.25.0
tree-sitter-rust==0.24.2
tree-sitter-swift==0.7.3
27 changes: 13 additions & 14 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[metadata]
name = source-inspector
license = Apache-2.0
version = 0.7.1
version = 0.7.2

# description must be on ONE line https://github.com/pypa/setuptools/issues/1390
description = source-inspector
Expand Down Expand Up @@ -43,18 +43,18 @@ install_requires =
plugincode
commoncode
typecode
tree-sitter==0.23.2
tree-sitter-bash==0.21.0
tree-sitter-c==0.21.1
tree-sitter-cpp==0.22.0
tree-sitter-c-sharp==0.23.1
tree-sitter-go==0.21.0
tree-sitter-java==0.21.0
tree-sitter-javascript==0.21.2
tree-sitter-objc==3.0.2
tree-sitter-python==0.21.0
tree-sitter-rust==0.21.2
tree-sitter-swift==0.0.1
tree-sitter>=0.23.2
tree-sitter-bash>=0.21.0
tree-sitter-c>=0.21.1
tree-sitter-cpp>=0.22.0
tree-sitter-c-sharp>=0.23.1
tree-sitter-go>=0.21.0
tree-sitter-java>=0.21.0
tree-sitter-javascript>=0.21.2
tree-sitter-objc>=3.0.2
tree-sitter-python>=0.21.0
tree-sitter-rust>=0.21.2
tree-sitter-swift>=0.0.1
pygments

[options.packages.find]
Expand Down Expand Up @@ -82,4 +82,3 @@ dev =
sphinx-autobuild
sphinx-rtd-dark-mode>=1.3.0
sphinx-copybutton

2 changes: 1 addition & 1 deletion tests/data/strings_xgettext/lineedit.c-expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"line_numbers": [
905
],
"string": "A"
"string": "e"
},
{
"line_numbers": [
Expand Down
10 changes: 3 additions & 7 deletions tests/data/symbols_tree_sitter/c/if_ath.c-expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -1634,6 +1634,7 @@
"bf",
"ATH_RXBUF_UNLOCK",
"sc",
"irqreturn_t",
"LINUX_VERSION_CODE",
"KERNEL_VERSION",
"ath_intr",
Expand Down Expand Up @@ -10374,13 +10375,6 @@
"ATH_INTMIT",
"ATH_MAXVAPS",
"ATH_SYSCTL_DECL",
"ath_sysctl_halparam",
"ctl",
"write",
"filp",
"buffer",
"lenp",
"ppos",
"sc",
"ctl",
"ah",
Expand Down Expand Up @@ -10818,10 +10812,12 @@
"sc",
"ath_static_sysctls",
"AR_DEBUG",
"ctl_name",
"CTL_AUTO",
"ath_debug",
"ath_debug",
"proc_dointvec",
"ctl_name",
"CTL_AUTO",
"ath_countrycode",
"ath_countrycode",
Expand Down
Loading