From c5549fd6de8c1162583eb17bead48a714637b5cf Mon Sep 17 00:00:00 2001 From: Elifarley <519940+elifarley@users.noreply.github.com> Date: Mon, 18 Nov 2024 00:50:44 -0300 Subject: [PATCH 1/2] Main link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4daeab2..e594511 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0) -`CEDARScript Editor (Python)` is a [CEDARScript](https://github.com/CEDARScript/cedarscript-grammar#readme) runtime +`CEDARScript Editor (Python)` is a [CEDARScript](https://bit.ly/cedarscript) runtime for interpreting `CEDARScript` scripts and performing code analysis and modification operations on a codebase. CEDARScript enables offloading _low-level code syntax and structure concerns_, such as indentation and line counting, From 34311fb76c136fb3fd701ec20e3801ed1b8ab21f Mon Sep 17 00:00:00 2001 From: Elifarley <519940+elifarley@users.noreply.github.com> Date: Tue, 19 Nov 2024 02:03:28 -0300 Subject: [PATCH 2/2] Github action --- .github/workflows/publish.yml | 74 +++++++++++++++++++++++++++++++++++ Makefile | 3 +- pyproject.toml | 2 +- 3 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..dabfd80 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,74 @@ +name: Publish to PyPI + +on: + push: + tags: + - '[0-9]+.[0-9]+.[0-9]+' # Matches semantic versioning tags + - '[0-9]+.[0-9]+.[0-9]+-test.*' # Test releases + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.12'] + + steps: + - uses: actions/checkout@v3 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies and run CI + run: | + python -m pip install --upgrade pip + pip install build pytest pytest-cov setuptools_scm + make ci + + publish: + needs: test + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.12' + + - name: Verify tag version matches package version + run: | + python -m pip install --upgrade pip + pip install build pytest pytest-cov setuptools_scm twine + PACKAGE_VERSION=$(python -m setuptools_scm) + TAG_VERSION=${GITHUB_REF#refs/tags/} # Remove 'refs/tags/' prefix + if [ "$PACKAGE_VERSION" != "$TAG_VERSION" ]; then + echo "Package version ($PACKAGE_VERSION) does not match tag version ($TAG_VERSION)" + exit 1 + fi + + - name: Publish to TestPyPI + if: contains(github.ref, 'test') + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }} + run: make all && twine upload --repository testpypi dist/* + + - name: Publish to PyPI + if: "!contains(github.ref, 'test')" + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} + run: make dist + + - name: Create Release + uses: softprops/action-gh-release@v1 + with: + files: dist/* + generate_release_notes: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/Makefile b/Makefile index db627a6..b6fba03 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ .PHONY: all dist d clean c version v install i test t build b -all: clean install test build version +ci: clean install test +all: ci build version dist d: all scripts/check-version.sh diff --git a/pyproject.toml b/pyproject.toml index 704d16d..479924b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,7 @@ classifiers = [ ] keywords = ["cedarscript", "code-editing", "refactoring", "code-analysis", "sql-like", "ai-assisted-development"] dependencies = [ - "cedarscript-ast-parser>=0.5.4", + "cedarscript-ast-parser>=0.5.6", "grep-ast==0.3.3", # https://github.com/tree-sitter/py-tree-sitter/issues/303 # https://github.com/grantjenks/py-tree-sitter-languages/issues/64 pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy