Skip to content

feat: port developer tooling and build from Safe-Synthesizer repo#51

Merged
mckornfield merged 7 commits into
mainfrom
infra/pr1-foundation
Mar 27, 2026
Merged

feat: port developer tooling and build from Safe-Synthesizer repo#51
mckornfield merged 7 commits into
mainfrom
infra/pr1-foundation

Conversation

@binaryaaron
Copy link
Copy Markdown
Collaborator

Summary

Foundation infrastructure PR that ports developer tooling from Safe-Synthesizer and adapts it for Anonymizer.

Key files created/changed

  • tools/binaries/ -- bootstrap scripts for standalone tools (uv, ty, yq, gh)
  • tools/codestyle/ -- format, lint, typecheck, copyright enforcement scripts
  • ruff.toml -- extracted from pyproject.toml; stricter rules commented out for gradual adoption
  • pyproject.toml -- docs dep group, ty in dev deps, uv-dynamic-versioning, pytest markers
  • .pre-commit-config.yaml -- local hooks (format, typecheck, copyright-fix, uv-lock, DCO signoff)
  • Makefile -- new targets: bootstrap-tools, bootstrap, format, format-check, typecheck, check, lock-check, test-slow, test-e2e, build-wheel, publish-internal, publish-pypi, test-container
  • .python-version, .copyrightignore, .vscode/settings.json
  • tools/binaries/test_tool_install.sh -- container smoke test

Key decisions

  • Ruff stays as a dev dependency (unlike Safe-Synthesizer which manages it as a standalone binary). Removed from tools.yaml; available via uv run in the venv.
  • uv-dynamic-versioning replaces hardcoded version -- version derived from git tags
  • Pre-commit uses local hooks via uv run -- ensures consistent ruff/ty versions from the venv
  • .vscode/settings.json is force-added despite .vscode/ being in .gitignore (same approach as Safe-Synthesizer)
  • copyright_fixer.py uses PEP 723 inline script deps -- runs via uv run --script

Testing

  • uv sync --group dev succeeds
  • No Safe-Synthesizer references remain in ported files

Made with Cursor

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 17, 2026

All contributors have signed the DCO ✍️ ✅
Posted by the DCO Assistant Lite bot.

Comment thread tools/binaries/bootstrap_tools.sh Outdated
Comment thread Makefile Outdated
Comment thread Makefile
Comment thread Makefile Outdated
Comment thread Makefile Outdated
Comment thread tools/codestyle/copyright_fixer.py
Comment thread tools/codestyle/format.sh
Comment thread tools/diff-lockfile.py Outdated
Comment thread .pre-commit-config.yaml
Comment thread ruff.toml
@binaryaaron binaryaaron force-pushed the infra/pr1-foundation branch from 875179a to c68feb1 Compare March 20, 2026 18:31
Comment thread pyproject.toml
@mckornfield mckornfield changed the title feat: port developer tooling, pre-commit hooks, and Makefile from Safe-Synthesizer feat: port developer tooling from Safe-Synthesizer repo Mar 26, 2026
@mckornfield mckornfield changed the title feat: port developer tooling from Safe-Synthesizer repo feat: port developer tooling and build from Safe-Synthesizer repo Mar 26, 2026
binaryaaron and others added 5 commits March 26, 2026 14:08
…e-Synthesizer

Foundation infrastructure for NeMo Anonymizer:

- Port tools/binaries/ (bootstrap scripts for uv, ty, yq, gh) and
  tools/codestyle/ (format, lint, typecheck, copyright scripts)
- Extract ruff config to standalone ruff.toml with stricter rules
  commented out for future adoption
- Update pyproject.toml: add docs dep group, add ty to dev deps,
  switch to uv-dynamic-versioning for git-tag-based versioning,
  add pytest markers
- Overhaul .pre-commit-config.yaml: replace upstream ruff hooks with
  local script hooks, add DCO signoff check, uv-lock check, typecheck,
  copyright fix
- Rewrite Makefile with new targets: bootstrap-tools, bootstrap,
  format, format-check, typecheck, check, lock-check, test-slow,
  test-e2e, build-wheel, publish-internal, publish-pypi, test-container
- Create .python-version, .copyrightignore, .vscode/settings.json
- Add container smoke test (test_tool_install.sh)

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: aagonzales <aagonzales@nvidia.com>
Made-with: Cursor
- Pin ty>=0.0.23,<0.1 in dev deps
- Exclude tools/ from ty checking (PEP 723 inline-script deps)
- Make typecheck non-blocking in pre-commit (|| true) and Makefile (-)
- 41 diagnostics remain -- tracked in a follow-up issue

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: aagonzales <aagonzales@nvidia.com>
Made-with: Cursor
Address review feedback:
- Remove tools/binaries/ (bootstrap toolchain) -- dev tools come from
  uv sync --group dev, no standalone binary management needed
- Remove tools/diff-lockfile.py (not needed for small dep surface)
- Remove .vscode/settings.json (PATH prepend was for standalone bins)
- Simplify _lib.sh: remove version-checking that depended on yq/tools.yaml
- Fix format-check: was only running ruff check (lint), now also runs
  ruff format --check (formatting verification)
- Remove test-slow target (no slow-marked tests exist)
- Remove publish-internal target (no Artifactory target for Anonymizer)
- Remove test-container target (validated removed bootstrap infra)
- Add uv run prefix to typecheck invocations

Signed-off-by: aagonzales <aagonzales@nvidia.com>
Made-with: Cursor
…e CONTRIBUTING.md (#52)

- Create mkdocs.yml with material theme, mkdocstrings, gen-files,
  literate-nav, mkdocs-jupyter, griffe-pydantic, mike versioning,
  and blog plugin (devnotes/)
- Add docs/ tree: index.md, getting-started, architecture with mermaid
  diagrams, API reference pages, CSS/JS assets, devnotes blog scaffold
- Add gen_ref_pages.py for auto-generated API reference
- Add Makefile targets: install-dev-docs, docs-serve, docs-build
- Update CONTRIBUTING.md with new setup, testing, code style, and
  documentation sections



Made-with: Cursor

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: aagonzales <aagonzales@nvidia.com>
@mckornfield mckornfield force-pushed the infra/pr1-foundation branch from 13d492a to 92e4754 Compare March 26, 2026 21:08
Comment thread .pre-commit-config.yaml Outdated
Comment thread Makefile
Signed-off-by: Matt Kornfield <mkornfield@nvidia.com>
@mckornfield mckornfield marked this pull request as ready for review March 27, 2026 17:38
@mckornfield mckornfield requested review from a team as code owners March 27, 2026 17:38
Comment thread Makefile
Comment thread Makefile
Comment thread Makefile
@lipikaramaswamy
Copy link
Copy Markdown
Collaborator

re docs: temporary scaffolding looks fine, and I'll follow up with the actual Anonymizer-specific content. We do have some small dups cleanup to do tho

@mckornfield
Copy link
Copy Markdown
Contributor

believe I pushed, want to take a final look?

@mckornfield mckornfield merged commit 6f34ed0 into main Mar 27, 2026
6 checks passed
@mckornfield mckornfield deleted the infra/pr1-foundation branch March 27, 2026 18:31
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.

3 participants