Skip to content

feat(scripts): convert release scripts from Python to Jac#5599

Open
SandeepaHWP wants to merge 32 commits intojaseci-labs:mainfrom
SandeepaHWP:feat/convert-scripts-py-to-jac
Open

feat(scripts): convert release scripts from Python to Jac#5599
SandeepaHWP wants to merge 32 commits intojaseci-labs:mainfrom
SandeepaHWP:feat/convert-scripts-py-to-jac

Conversation

@SandeepaHWP
Copy link
Copy Markdown
Collaborator

@SandeepaHWP SandeepaHWP commented Apr 17, 2026

Summary

Converted all Python scripts in scripts/ to Jac (.jac) files and removed the original .py files.

Converted files:

  • scripts/release_utils.pyrelease_utils.jac
  • scripts/release.pyrelease.jac
  • scripts/collect_release_notes.pycollect_release_notes.jac
  • scripts/parse_release.pyparse_release.jac
  • scripts/validate_release.pyvalidate_release.jac
  • scripts/validate_fragments.pyvalidate_fragments.jac
  • scripts/wait_for_pypi.pywait_for_pypi.jac

Removed:

Workflow changes (.github/workflows/):

  • Added pip install -e ./jac steps before every jac run call in publish-release.yml and create-release-pr.yml
  • Updated all script references from .py to .jac

Pre-commit changes (.pre-commit-config.yaml):

  • validate-fragments hook now runs via bash -c with a unique JAC_DATA_PATH temp dir per invocation, preventing SQLite lock errors in parallel CI environments

SandeepaHWP and others added 22 commits April 17, 2026 20:07
Converted all Python scripts in scripts/ to Jac equivalents using
py2jac, then fixed conversion bugs (escaped ## in f-strings, corrupted
lambda, wrong `delete()` for del, invalid backticks on non-keywords,
NamedTuple class body using `with entry {}` instead of `has` fields,
and `new` as identifier which is unsupported in Jac). Updated all
docstring usage examples from `python scripts/*.py` to `jac run scripts/*.jac`.
…runtime SQLite lock

jac run always initializes a SQLite graph database context even for scripts
that don't use graph features. Pre-commit.ci runs jobs in parallel on shared
filesystem causing concurrent SQLite writes and database lock errors.
validate_fragments.py is kept as a lightweight Python-only hook runner.
…oid Jac runtime SQLite lock"

This reverts commit 4017e3f.
Script compared Lark vs RD parser ASTs during migration (PR jaseci-labs#4517).
The Lark parser was deleted in PR jaseci-labs#4557, making this script permanently
broken and unused. No CI or other script references it.
Adds a --no-persist flag to jac run that calls set_base_path(None)
before creating the execution context, preventing TieredMemory from
creating the L3 SQLite layer entirely. Useful for non-graph scripts
like pre-commit hooks that do not need persistence.

Updates the validate-fragments pre-commit hook to use the clean
jac run --no-persist entry instead of the JAC_DATA_PATH workaround.
Adds a --no-persist flag to jac run that calls set_base_path(None)
before creating the execution context, preventing TieredMemory from
creating the L3 SQLite layer entirely. Useful for non-graph scripts
like pre-commit hooks that do not need persistence.

Updates the validate-fragments pre-commit hook to use the clean
jac run --no-persist entry instead of the JAC_DATA_PATH workaround.
Comment thread scripts/wait_for_pypi.jac Outdated
Comment thread scripts/wait_for_pypi.jac Outdated
@kugesan1105
Copy link
Copy Markdown
Member

hey all these jac files needs to be changed to jactastic

@SupulHeshan can guide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants