Skip to content

refactor: move modules into modules/ subdirectory#13

Merged
ulises-jeremias merged 1 commit into
mainfrom
refactor/move-modules-to-modules-dir
May 26, 2026
Merged

refactor: move modules into modules/ subdirectory#13
ulises-jeremias merged 1 commit into
mainfrom
refactor/move-modules-to-modules-dir

Conversation

@ulises-jeremias

Copy link
Copy Markdown
Member

Summary

Aligns this repo with the layout already used by sister labs (nan-ai-engineering-labs, nan-data-engineering-labs): all 16 numbered module directories now live under modules/ instead of at the repo root. Companion PR: nanlabs/nan-ai-native-engineering-labs#36.

Changes

  • git mv 16 modules (01_python_fundamentals16_modern_security) into modules/. Renames recorded at 100% similarity — full history preserved (git log --follow works).
  • Scripts — added modules/ awareness in:
    • scripts/validate_all_modules.py (iter_modules reads repo_root / "modules")
    • scripts/audit_nan_modules.py (same)
    • scripts/validate_nan_language.py (module_path = repo_root / "modules" / args.module)
    • scripts/link_check.py (MODULES_ROOT constant)
    • scripts/progress.py (scan_modules(base_path / "modules"))
    • scripts/generate_structure.py (base_path = ... / "modules")
    • scripts/run_topic_tests.py — accepts both bare and modules/-prefixed paths via fallback
  • CLI args remain bare for ergonomics (--module 11_modern_tooling_2026, python scripts/run_topic_tests.py 11_modern_tooling_2026/...); scripts prepend modules/ internally.
  • README.md — 32 link updates to point at modules/<NN>/....
  • Workflows unchanged.github/workflows/*.yml already use globs that match under the new layout.
  • pyproject.toml unchangedtestpaths = ["tests"] is unaffected.
  • AGENTS.md, GETTING_STARTED.md, STATUS.md, CONTRIBUTING.md — no module path references found, no changes needed.

Verification (local — all green; pre-existing failures unchanged)

Gate Result
python3 scripts/validate_all_modules.py 14/16 modules passed — same as main baseline (modules 12 fastapi + 15 data-science have pre-existing X1 failures unrelated to this refactor)
python3 scripts/audit_nan_modules.py finds all 16 modules under modules/
python3 scripts/validate_nan_language.py --module 11_modern_tooling_2026 clean
python3 scripts/run_topic_tests.py 11_modern_tooling_2026/35_debugpy_remote_debugging (bare) passes via modules/ fallback
python3 scripts/run_topic_tests.py modules/11_modern_tooling_2026/... (explicit) passes
python3 scripts/link_check.py --topic <sample> 3/3 URLs OK
ast.parse(generate_structure.py) clean
Relative-link walk over README + AGENTS + STATUS + GETTING_STARTED 42/42 links resolve on disk
git log --follow modules/<NN>/<topic>/README.md history preserved

Test plan

  • All script gates green (or unchanged-vs-main for pre-existing failures)
  • All 42 internal markdown links resolve
  • git mv rename detection at 100% similarity
  • run_topic_tests.py works for both bare and modules/-prefixed CLI args
  • CI runs green on this PR before merge

Aligns this repo with the convention already used by sister labs
(nan-ai-engineering-labs, nan-data-engineering-labs): all numbered
module directories now live under modules/ instead of at the repo root.

Changes:
- git mv 16 module dirs (01_python_fundamentals .. 16_modern_security)
  into modules/, preserving full git history via rename tracking
- scripts: introduce modules/ awareness in
  validate_all_modules.py, audit_nan_modules.py,
  validate_nan_language.py, link_check.py, progress.py,
  generate_structure.py, run_topic_tests.py — CLI args remain bare
  (--module 11_modern_tooling_2026), prepended internally
- run_topic_tests.py accepts both bare and modules/-prefixed paths
- README.md: 32 link updates to point at modules/<NN>/...
- Pre-existing X1 failures in modules 12 (fastapi) and 15 (data science)
  are unchanged by this refactor (verified against main)
@ulises-jeremias ulises-jeremias merged commit e06de5a into main May 26, 2026
2 of 3 checks passed
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.

1 participant