diff --git a/MANIFEST.in b/MANIFEST.in index 4ff79e87..a0519430 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -38,6 +38,8 @@ recursive-include rapidfireai/evals/utils *.py # Include tutorial notebooks (including datasets) recursive-include tutorial_notebooks * +recursive-include tests/notebooks * +recursive-include tests/staging/tutorial_notebooks * # Explicitly exclude unwanted files and directories - be very specific exclude rapidfireai/frontend/node_modules diff --git a/pyproject.toml b/pyproject.toml index d7a96faa..2b6bf2cc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -298,7 +298,7 @@ rapidfireai = [ "../setup/evals/requirements-*.txt", "../tutorial_notebooks/**/*", "../tests/notebooks/*", - + "../tests/staging/tutorial_notebooks/**/*", ] diff --git a/rapidfireai/cli.py b/rapidfireai/cli.py index 1dbb22e9..962153c4 100644 --- a/rapidfireai/cli.py +++ b/rapidfireai/cli.py @@ -438,14 +438,25 @@ def copy_test_notebooks(): test_path = os.getenv("RF_TEST_PATH", os.path.join(".", "tutorial_notebooks", "tests")) site_packages_path = site.getsitepackages()[0] source_path = os.path.join(site_packages_path, "tests", "notebooks") - print(f"Copying test notebooks from {source_path} to {test_path}...") + print(f"Copying test tutorial notebooks from {source_path} to {test_path}...") os.makedirs(test_path, exist_ok=True) shutil.copytree(source_path, test_path, dirs_exist_ok=True) - print(f"✅ Successfully copied test notebooks to {test_path}") + print(f"✅ Successfully copied test tutorial notebooks to {test_path}") except Exception as e: - print(f"❌ Failed to copy test notebooks to {test_path} from {source_path}") + print(f"❌ Failed to copy test tutorial notebooks to {test_path} from {source_path}") print(f" Error: {e}") - print(" You may need to copy test notebooks manually") + print(" You may need to copy test tutorial notebooks manually") + return 1 + try: + dest_path = os.getenv("RF_TEST_PATH", os.path.join(".", "tutorial_notebooks")) + source_path = os.path.join(site_packages_path, "tests", "staging", "tutorial_notebooks") + print(f"Copying staging tutorial notebooks from {source_path} to {dest_path}...") + shutil.copytree(source_path, dest_path, dirs_exist_ok=True) + print(f"✅ Successfully copied staging tutorial notebooks to {dest_path}") + except Exception as e: + print(f"❌ Failed to copy staging tutorial notebooks to {dest_path} from {source_path}") + print(f" Error: {e}") + print(" You may need to copy staging tutorial notebooks manually") return 1 return 0 diff --git a/setup/bump_version.sh b/setup/bump_version.sh index 1661479e..0350dbf0 100755 --- a/setup/bump_version.sh +++ b/setup/bump_version.sh @@ -203,6 +203,16 @@ update_constants_tsx_file() { fi } +copy_staging_tutorial_notebooks() { + print_info "Copying staging tutorial notebooks..." + cp -rf "$PROJECT_ROOT/tests/staging/tutorial_notebooks/." "$PROJECT_ROOT/tutorial_notebooks" + if [ $? -ne 0 ]; then + print_error "Failed to copy staging tutorial notebooks" + exit 1 + fi + print_success "✅ Successfully copied staging tutorial notebooks to $PROJECT_ROOT/tutorial_notebooks" +} + # Get the project root directory (parent of setup/fit/) SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" @@ -347,10 +357,12 @@ update_requirements_txt_file "$NEW_VERSION" print_success "Version updated to $NEW_VERSION" +copy_staging_tutorial_notebooks + if ! is_github_actions; then # Commit the changes print_info "Committing version bump..." - git add pyproject.toml requirements.txt rapidfireai/version.py rapidfireai/frontend/src/common/constants.tsx docs/BUILD.md README.md + git add pyproject.toml requirements.txt rapidfireai/version.py rapidfireai/frontend/src/common/constants.tsx docs/BUILD.md README.md tutorial_notebooks git commit -m "Bump version to $NEW_VERSION" # Create and push tag