Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ugly hack so "pip install -e ." works in conda env
This adds a pyproject.toml file. It is handwritten, but it declares poetry as its backend tool. Yet we are not (as of now) using or supporting Poetry, and that tool need not actually be installed. The actual project does have dependencies (per environment.yml), but this new handwritten pyproject.toml file does not list them. Currently, that file only exists to make the project installable, so that an editable install can be made using: "pip install -e ." That command should, of course, only be run in the conda environment. (If we later also support Poetry, then "poetry install" could be used outside the conda environment, but "pip install -e ." would still not be used.) This makes it so that "import embed" works even when run from a different directory. That's important because the current directory in a Jupyter notebook varies by application, with VS Code having it be the directory in which the notebook resides, even if that is not the folder that VS Code has open. Now we can run "pip install -e ." to make "import embed" statements in notebooks work again. A possible alternative is running "conda develop ." (or "mamba develop .") but this requires the conda-build package to be installed. We shouldn't require that it be installed in the base environment, because while that would be fine for the dev container, it would impose a requirement to make a global change on users who are running locally (without a dev container). But when conda-build is installed in the project environment, a conda bug causes test discovery to break in the VS Code test runner (beaker). See the "On the test discovery bug" paragraph and its links, in EliahKagan/palgoviz#45, for details.
- Loading branch information