Skip to content

Commit

Permalink
Add minimal installation option using MINIMAL_KATS (#158)
Browse files Browse the repository at this point in the history
Summary:
As commented on #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.

Pull Request resolved: #158

Reviewed By: iamxiaodong

Differential Revision: D31793955

Pulled By: michaelbrundage

fbshipit-source-id: 6311993fc1784bf4bcc8255c4e47ee9c6a747b52
  • Loading branch information
adamantike authored and facebook-github-bot committed Oct 21, 2021
1 parent 0cb0e1f commit 569ce01
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 569ce01

Please sign in to comment.