Skip to content

Commit

Permalink
Merge pull request #10145 from gem/check_dependencies
Browse files Browse the repository at this point in the history
Moved the test on check_dependencies
  • Loading branch information
micheles authored Nov 14, 2024
2 parents a3f660c + 7babc89 commit 99cd2c2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 0 additions & 1 deletion bin/run-demos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ fi

oq info venv
oq info cfg
oq webui start & # test extract_dependencies

# create .tmp.ini files with oqparam.to_ini()
python -m openquake.calculators.checkers "$1"
Expand Down
6 changes: 5 additions & 1 deletion openquake/baselib/tests/general_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from openquake.baselib.general import (
block_splitter, split_in_blocks, assert_close, rmsdiff,
deprecated, DeprecationWarning, cached_property,
compress, decompress, random_choice, get_duplicates)
compress, decompress, random_choice, get_duplicates, check_dependencies)


class BlockSplitterTestCase(unittest.TestCase):
Expand Down Expand Up @@ -234,3 +234,7 @@ def test_get_duplicates():
arr = numpy.array(lst, dtlist)
dic = get_duplicates(arr, 'lon', 'lat')
assert dic == {(2.1, 1.0): 2}, dic


def test_check_dependencies():
check_dependencies()
1 change: 0 additions & 1 deletion openquake/commands/webui.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ def main(cmd, hostport='127.0.0.1:8800', skip_browser: bool = False):
if os.path.isfile(dbpath) and not os.access(dbpath, os.W_OK):
sys.exit('This command must be run by the proper user: '
'see the documentation for details')
general.check_dependencies()
dbserver.ensure_on() # start the dbserver in a subprocess
# reset any computation left in the 'executing' state
db.actions.reset_is_running(dbserver.db)
Expand Down

0 comments on commit 99cd2c2

Please sign in to comment.