-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revisit dependencies, add "server" extra
Remove the following (unused) dependencies: - appmode - jupyterlab - numpy Moved the following dependencies to the new `server` extra: - ase - voila Any non-native OPTIMADE adapter formats have been demoted to only be included if the package is installed. This means the download format widget can be used without having ASE installed. For a more complete experience, ASE is kept as a dependency for the `server` extra. Make the CLI work if Voilà is not installed. Update README with new dependency setup. Create `Contribute` section in README.
- Loading branch information
Showing
7 changed files
with
128 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,8 @@ | ||
appdirs~=1.4.4 | ||
appmode~=0.8.0 | ||
ase~=3.20 | ||
cachecontrol[filecache]~=0.12.6 | ||
ipywidgets~=7.5 | ||
jupyterlab~=2.2 | ||
nglview~=2.7 | ||
numpy~=1.19 | ||
optimade~=0.12.1 | ||
pandas~=1.1 | ||
requests~=2.24 | ||
voila~=0.2.3 | ||
widget_periodictable~=2.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ase~=3.20 | ||
voila~=0.2.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import pytest | ||
|
||
try: | ||
import voila as _ | ||
except ImportError: | ||
VOILA_PACKAGE_EXISTS = False | ||
else: | ||
VOILA_PACKAGE_EXISTS = True | ||
|
||
|
||
@pytest.mark.skipif( | ||
not VOILA_PACKAGE_EXISTS, | ||
reason="Voilà is not installed. This test is rendered invalid.", | ||
) | ||
def test_default(run_cli): | ||
"""Run `optimade-client` with default settings""" | ||
output = run_cli() | ||
assert "[Voila] Voilà is running at:" in output, f"output:\n{output}" | ||
|
||
|
||
@pytest.mark.skipif( | ||
VOILA_PACKAGE_EXISTS, reason="Voilà is installed. This test is rendered invalid." | ||
) | ||
def test_voila_not_installed(run_cli): | ||
"""Ensure the CLI can handle Voilà not being installed.""" | ||
output = run_cli(raises=True) | ||
exit_text = ( | ||
"Voilà is not installed.\nPlease run:\n\n pip install optimade-client[server]\n\n" | ||
"Or the equivalent, matching the installation in your environment, to install Voilà " | ||
"(and ASE for a larger download format selection)." | ||
) | ||
assert exit_text in output | ||
assert "[Voila]" not in output |