[PR #1876] [MERGED] fix CI: add [tool.nbdev] to pyproject.toml so nbdev finds its config without falling back to settings.ini #33429

Closed
opened 2026-07-13 12:03:57 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/harvard-edge/cs249r_book/pull/1876
Author: @Shashank-Tripathi-07
Created: 6/16/2026
Status: Merged
Merged: 6/16/2026
Merged by: @profvjreddi

Base: mainHead: fix/remove-settings-ini-nbdev-conflict


📝 Commits (1)

  • 2d92b42 add [tool.nbdev] to pyproject.toml so nbdev finds its config without falling back

📊 Changes

3 files changed (+16 additions, -5 deletions)

View changed files

📝 tinytorch/pyproject.toml (+13 -0)
📝 tinytorch/tito/commands/dev/export.py (+3 -4)
📝 tinytorch/tito/commands/system/update.py (+0 -1)

📄 Description

What was wrong

nbdev walks up from cwd looking for a pyproject.toml with a [tool.nbdev] section. If it finds none, it falls through to a legacy check: if settings.ini exists anywhere in the parent chain it raises a hard error: Found old settings.ini. Migrate to pyproject.toml.

tinytorch/pyproject.toml existed but had no [tool.nbdev] section. Every call to nb_export() hit that fallback, found settings.ini, and raised blocking Stage 1 on every CI run and cascading to fail all downstream stages.

Why not just delete settings.ini

The first version of this PR deleted settings.ini. That was wrong. The release workflow (tinytorch-publish-live.yml) still writes the version number into settings.ini on every release via sed and commits it. Deleting it would break the next release. The PR was force-pushed to replace that approach with the correct fix.

What the fix actually does

Adds [tool.nbdev] to pyproject.toml with the canonical fields (lib_path, nbs_path, doc_path, branch, etc.) migrated from settings.ini. nbdev finds the section on its first walk and never reaches the settings.ini check. settings.ini is kept intact so the release workflow continues to work unchanged.

Also removes two stale settings.ini references in export.py (directory detection heuristic and error message) and removes settings.ini from UpdateCommand.UPDATE_FILES since pyproject.toml is now the authoritative nbdev config.

Test plan

  • CI Stage 1 passes -- no more Found old settings.ini error
  • All downstream CI stages unblocked
  • settings.ini is untouched -- release workflow still works on next version bump
  • tito system update no longer lists settings.ini as a file it manages

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/harvard-edge/cs249r_book/pull/1876 **Author:** [@Shashank-Tripathi-07](https://github.com/Shashank-Tripathi-07) **Created:** 6/16/2026 **Status:** ✅ Merged **Merged:** 6/16/2026 **Merged by:** [@profvjreddi](https://github.com/profvjreddi) **Base:** `main` ← **Head:** `fix/remove-settings-ini-nbdev-conflict` --- ### 📝 Commits (1) - [`2d92b42`](https://github.com/harvard-edge/cs249r_book/commit/2d92b42db85b59219718f142d7ddd5b34f95d051) add [tool.nbdev] to pyproject.toml so nbdev finds its config without falling back ### 📊 Changes **3 files changed** (+16 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `tinytorch/pyproject.toml` (+13 -0) 📝 `tinytorch/tito/commands/dev/export.py` (+3 -4) 📝 `tinytorch/tito/commands/system/update.py` (+0 -1) </details> ### 📄 Description ## What was wrong nbdev walks up from cwd looking for a pyproject.toml with a [tool.nbdev] section. If it finds none, it falls through to a legacy check: if settings.ini exists anywhere in the parent chain it raises a hard error: Found old settings.ini. Migrate to pyproject.toml. tinytorch/pyproject.toml existed but had no [tool.nbdev] section. Every call to nb_export() hit that fallback, found settings.ini, and raised blocking Stage 1 on every CI run and cascading to fail all downstream stages. ## Why not just delete settings.ini The first version of this PR deleted settings.ini. That was wrong. The release workflow (tinytorch-publish-live.yml) still writes the version number into settings.ini on every release via sed and commits it. Deleting it would break the next release. The PR was force-pushed to replace that approach with the correct fix. ## What the fix actually does Adds [tool.nbdev] to pyproject.toml with the canonical fields (lib_path, nbs_path, doc_path, branch, etc.) migrated from settings.ini. nbdev finds the section on its first walk and never reaches the settings.ini check. settings.ini is kept intact so the release workflow continues to work unchanged. Also removes two stale settings.ini references in export.py (directory detection heuristic and error message) and removes settings.ini from UpdateCommand.UPDATE_FILES since pyproject.toml is now the authoritative nbdev config. ## Test plan - [ ] CI Stage 1 passes -- no more Found old settings.ini error - [ ] All downstream CI stages unblocked - [ ] settings.ini is untouched -- release workflow still works on next version bump - [ ] tito system update no longer lists settings.ini as a file it manages --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-07-13 12:03:57 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/cs249r_book#33429