Skip to content

Fix non-git edge cases#429

Merged
gtrevisan merged 6 commits intodevfrom
fix-non-git
Apr 3, 2025
Merged

Fix non-git edge cases#429
gtrevisan merged 6 commits intodevfrom
fix-non-git

Conversation

@gtrevisan
Copy link
Copy Markdown
Member

  • make the log header more resilient to non-git runs
  • avoid importing the tests module which is unavailable for non-git installs
  • log critical error if no shots or no processors

@gtrevisan gtrevisan requested review from AlexSaperstein and yumouwei and removed request for AlexSaperstein and yumouwei April 3, 2025 15:28
@gtrevisan
Copy link
Copy Markdown
Member Author

gtrevisan commented Apr 3, 2025

I tested that I could run the simple example with a non-git installation by creating a small PEP-723 script:

#!/usr/bin/env python3
# /// script
# requires-python = ">=3.11,<4.0"
# dependencies = ["disruption-py"]
# [tool.uv.sources]
# disruption-py = { git = "https://github.com/MIT-PSFC/disruption-py/", branch = "fix-non-git" }
# ///
from disruption_py.workflow import cli
cli()

and then running it with on-the-fly-venv creation with uv:

uv run test.py

indeed, if one uses the branch dev, instead, then the test fails with:

ModuleNotFoundError: No module named 'tests'

@gtrevisan gtrevisan merged commit 7200a60 into dev Apr 3, 2025
11 checks passed
@gtrevisan gtrevisan deleted the fix-non-git branch April 3, 2025 15:50
@gtrevisan gtrevisan mentioned this pull request Apr 3, 2025
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