posit-dev / posit-dev/py-shinylive
If a `requirements.txt` is found, only inspect those packages for dependencies
@wch is already working on this.
Since Mar 24, 2024.
- Dominant language
- Python
- Stars
- 56
- Forks
- 6
- Avg merge
- 3m
- Merged PRs (30d)
- 1
Description
Request:
Hmm, shinylive appears to scan every .py file in the directory to figure out what pyodide needs to install, even scripts that aren't used at runtime. Like sometimes I'll have a helper script that builds a database (in this case, using sqlalchemy) but the actual shiny app only needs built-in sqlite3.
I hacked around this by making a stripped-down branch and exporting that, but it could be nice if either the build process honored requirements.txt (in a minimalistic sense) or if somehow it only scanned app.py and what it imports? or some other solution to ignore certain files when figuring this out.
My reply:
... correct. py-shinylive currently scans every that
app.jsonprovides. (Which is every file.) LinkIt seems fair to me that if a
requirements.txtis found, then only those packages are inspected.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.