libAtoms / testing-framework

11 stars 6 forks source link

Readme 'running tests' example fails #14

Open Sideboard opened 3 years ago

Sideboard commented 3 years ago

The example from the readme does not work. Did the arguments change?

$ mkdir -p example_run_dir/CSiGe/run_dir
$ cd example_run_dir/CSiGe/run_dir
$ ../../../scripts/run-model-test.py -s CSiGe Tersoff bulk_Si_diamond
usage: run-model-test.py [-h] [--system_label SYSTEM_LABEL] [--force]
                         [--base_model BASE_MODEL] [--no_redirect_io]
                         [--no_append_log]
                         model test
run-model-test.py: error: unrecognized arguments: -s bulk_Si_diamond

Removing the -s option creates a text file with further errors concerning paths:

$ ../../../scripts/run-model-test.py Tersoff bulk_Si_diamond
share_dir /home/u2073032/nomad/code/testing-framework/scripts/../share
$ cat model-Tersoff-test-bulk_Si_diamond.txt

###### START RUN Wed Sep 29 14:13:52 2021 ######
Model Tersoff, Test bulk_Si_diamond
Test run at 2021-09-29 14:13

model file: ../../models/Tersoff/model.py
============================================================
Traceback (most recent call last):
  File "../../../scripts/run-model-test.py", line 118, in <module>
    sys.stdout.write(open(model_file).read())
FileNotFoundError: [Errno 2] No such file or directory: '../../models/Tersoff/model.py'
bernstei commented 3 years ago

Yes, --test_set / -s became --system_label / -l, but the docs were not updated.

jameskermode commented 3 years ago

Looking at the demo notebook I think it should be -l Si rather than -s Si. If that works we should fix the README.

jameskermode commented 3 years ago

I updated the README

Sideboard commented 3 years ago

Yes, -l works. The second problem still occurs for me. Does it work for you?

jameskermode commented 3 years ago

Didn't check. Working on reviving the Binder, and then at least you'll have a working example to compare with.