Repository navigation
feat: runtime-requirements map (Python/Node floors, services, GPU, OS, Docker) - #5
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a new deterministic map to the project overview: what kind of machine and services this project needs to run. It answers the question a non-programmer asks before installing anything — how new your Python/Node must be, whether a database or other background service has to be running, whether an NVIDIA GPU is expected, whether the OS matters, and whether a Dockerfile offers the easy way out.
How it works
backend/services/runreqs.py: a pure scanner over the already-loaded file contents.requires-python(pyproject[project]),python_requires(setup.cfg/setup.py), Pipfile[requires],runtime.txt,.python-version;engines.nodein package.json,.nvmrc/.node-version..cusources, or explicit"cuda"device strings._content_analysesasProjectMeta.run_requirements, a new card on the overview page ("跑起来需要什么环境 / What it needs to run"), types inapi.ts.Tests
tests/test_runreqs.py: 18 unit tests (floors from each manifest shape, manifest-only vs imported services, GPU via dep/.cu/device-string, OS signals, container, ordering, empty project).ruff check .clean,ruff formatapplied to the new files. Frontendnpm run buildclean.