posit-dev / posit-dev/py-shinylive

If a `requirements.txt` is found, only inspect those packages for dependencies

Open
#17 1 comment 0 reactions 1 assignee View on GitHub

@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.json provides. (Which is every file.) Link

It seems fair to me that if a requirements.txt is found, then only those packages are inspected.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.