Skip to content

Commit

Permalink
Add minimal installation option using MINIMAL_KATS
Browse files Browse the repository at this point in the history
As commented on
facebookresearch#101 (comment),
having an environment variable that's exclusive for `kats` avoids
installation issues on projects that have multiple other dependencies,
and install them using commands like `pip install -r requirements.txt`.

In that scenario, setting `MINIMAL_KATS` avoids unintended side effects
on any other dependency that understands the `MINIMAL` environment
variable.
  • Loading branch information
adamantike committed Oct 20, 2021
1 parent 3626eb0 commit e1cf0cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pip install kats

If you need only a small subset of Kats, you can install a minimal version of Kats with
```bash
MINIMAL=1 pip install kats
MINIMAL_KATS=1 pip install kats
```
which omits many dependencies (everything in `test_requirements.txt`).
However, this will disable many functionalities and cause `import kats` to log
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
with open("requirements.txt", "r") as f:
install_requires = f.read().splitlines()

# optional dependencies skipped when MINIMAL=1
# optional dependencies skipped when MINIMAL_KATS=1
with open("test_requirements.txt", "r") as f:
extra_requires = f.read().splitlines()

if not os.environ.get("MINIMAL", False):
if not os.environ.get("MINIMAL_KATS", False):
install_requires += extra_requires


Expand Down

0 comments on commit e1cf0cb

Please sign in to comment.