From 656ec36523ad26070a8a1cf0cd206b7c55f5a206 Mon Sep 17 00:00:00 2001 From: Jannik Buhr Date: Wed, 25 Oct 2023 12:50:58 +0200 Subject: [PATCH] update build_examples without file-local yml lsp config --- example/alanine_hat_naive/kimmdy.yml | 2 +- .../kimmdy.yml | 2 -- example/hexalanine_homolysis/kimmdy.yml | 2 -- example/hexalanine_single_reaction/kimmdy.yml | 2 -- example/triplehelix_pull/kimmdy.yml | 2 -- src/kimmdy/tools.py | 18 +----------------- .../alanine_hat_naive/kimmdy.yml | 2 -- .../kimmdy.yml | 2 -- .../test_integration/emptyrun/kimmdy.yml | 2 -- .../hexalanine_homolysis/kimmdy.yml | 2 -- .../hexalanine_single_reaction/kimmdy.yml | 2 -- .../minimal_input_files/kimmdy.yml | 2 -- .../triplehelix_pull/kimmdy.yml | 2 -- tests/test_files/test_schema/kimmdy.yml | 2 -- 14 files changed, 2 insertions(+), 42 deletions(-) diff --git a/example/alanine_hat_naive/kimmdy.yml b/example/alanine_hat_naive/kimmdy.yml index 7b2f5ff8..68adc78f 100644 --- a/example/alanine_hat_naive/kimmdy.yml +++ b/example/alanine_hat_naive/kimmdy.yml @@ -1,4 +1,3 @@ -# yaml-language-server: $schema=../../src/kimmdy/kimmdy-yaml-schema.json dryrun: false name: 'alanine_hat_000' max_tasks: 100 @@ -6,6 +5,7 @@ gromacs_alias: 'gmx' gmx_mdrun_flags: -maxh 24 -dlb yes -nt 8 -npme 0 -ntmpi 1 ff: 'amber99sb-star-ildnp.ff' # optional, dir endinng with .ff by default top: 'Ala_out.top' +gro: 'npt.gro' ndx: 'index.ndx' mds: equilibrium: diff --git a/example/charged_peptide_homolysis_hat_naive/kimmdy.yml b/example/charged_peptide_homolysis_hat_naive/kimmdy.yml index c8f83b9e..783e3f66 100644 --- a/example/charged_peptide_homolysis_hat_naive/kimmdy.yml +++ b/example/charged_peptide_homolysis_hat_naive/kimmdy.yml @@ -1,5 +1,3 @@ -# yaml-language-server: $schema=../../src/kimmdy/kimmdy-yaml-schema.json - name: 'kimmdy_001' dryrun: false max_tasks: 100 diff --git a/example/hexalanine_homolysis/kimmdy.yml b/example/hexalanine_homolysis/kimmdy.yml index 897fbc7a..a34f4d18 100644 --- a/example/hexalanine_homolysis/kimmdy.yml +++ b/example/hexalanine_homolysis/kimmdy.yml @@ -1,5 +1,3 @@ -# yaml-language-server: $schema=../../src/kimmdy/kimmdy-yaml-schema.json - dryrun: false name: 'hexalanine_homolysis_000' max_tasks: 100 diff --git a/example/hexalanine_single_reaction/kimmdy.yml b/example/hexalanine_single_reaction/kimmdy.yml index 0effcd37..b1b4b83c 100644 --- a/example/hexalanine_single_reaction/kimmdy.yml +++ b/example/hexalanine_single_reaction/kimmdy.yml @@ -1,5 +1,3 @@ -# yaml-language-server: $schema=../../src/kimmdy/kimmdy-yaml-schema.json - dryrun: false name: 'single_reaction_000' gmx_mdrun_flags: -maxh 24 -dlb yes -nt 8 -npme 0 -ntmpi 1 diff --git a/example/triplehelix_pull/kimmdy.yml b/example/triplehelix_pull/kimmdy.yml index 9019f8cd..ce7c7cfe 100644 --- a/example/triplehelix_pull/kimmdy.yml +++ b/example/triplehelix_pull/kimmdy.yml @@ -1,5 +1,3 @@ -# yaml-language-server: $schema=../../src/kimmdy/kimmdy-yaml-schema.json - name: 'kimmdy_001' dryrun: false max_tasks: 10 diff --git a/src/kimmdy/tools.py b/src/kimmdy/tools.py index f86695db..3a050c24 100644 --- a/src/kimmdy/tools.py +++ b/src/kimmdy/tools.py @@ -50,23 +50,7 @@ def build_examples(restore: str): assets_path / "amber99sb-star-ildnp.ff", target_is_directory=True, ) - kimmdy_yml_schema_path = dest / "kimmdy.yml" - if kimmdy_yml_schema_path.exists(): - schema_path = ( - Path("..") / ".." / "src" / "kimmdy" / "kimmdy-yaml-schema.json" - ) - first_line = f"# yaml-language-server: $schema={schema_path}\n" - with open(kimmdy_yml_schema_path, "r+") as f: - lines = f.readlines() - if lines[0][:22] == "# yaml-language-server": - lines[0] = first_line - else: - lines = [first_line] + lines - f.seek(0) - f.writelines(lines) - f.truncate() - - print("done") + print("done building examples") except FileExistsError as e: raise FileExistsError( f"Could not build example directory {directory} because it already exists. Try the --restore option to still build it." diff --git a/tests/test_files/test_integration/alanine_hat_naive/kimmdy.yml b/tests/test_files/test_integration/alanine_hat_naive/kimmdy.yml index a96be940..68adc78f 100644 --- a/tests/test_files/test_integration/alanine_hat_naive/kimmdy.yml +++ b/tests/test_files/test_integration/alanine_hat_naive/kimmdy.yml @@ -1,5 +1,3 @@ -# yaml-language-server: $schema=../../../../src/kimmdy/kimmdy-yaml-schema.json - dryrun: false name: 'alanine_hat_000' max_tasks: 100 diff --git a/tests/test_files/test_integration/charged_peptide_homolysis_hat_naive/kimmdy.yml b/tests/test_files/test_integration/charged_peptide_homolysis_hat_naive/kimmdy.yml index 0e1d9815..783e3f66 100644 --- a/tests/test_files/test_integration/charged_peptide_homolysis_hat_naive/kimmdy.yml +++ b/tests/test_files/test_integration/charged_peptide_homolysis_hat_naive/kimmdy.yml @@ -1,5 +1,3 @@ -# yaml-language-server: $schema=../../../../src/kimmdy/kimmdy-yaml-schema.json - name: 'kimmdy_001' dryrun: false max_tasks: 100 diff --git a/tests/test_files/test_integration/emptyrun/kimmdy.yml b/tests/test_files/test_integration/emptyrun/kimmdy.yml index 00a69037..3945ee34 100644 --- a/tests/test_files/test_integration/emptyrun/kimmdy.yml +++ b/tests/test_files/test_integration/emptyrun/kimmdy.yml @@ -1,5 +1,3 @@ -# yaml-language-server: $schema=../../../../src/kimmdy/kimmdy-yaml-schema.json - name: 'emptyrun_001' dryrun: false max_tasks: 0 diff --git a/tests/test_files/test_integration/hexalanine_homolysis/kimmdy.yml b/tests/test_files/test_integration/hexalanine_homolysis/kimmdy.yml index 0af64e37..a34f4d18 100644 --- a/tests/test_files/test_integration/hexalanine_homolysis/kimmdy.yml +++ b/tests/test_files/test_integration/hexalanine_homolysis/kimmdy.yml @@ -1,5 +1,3 @@ -# yaml-language-server: $schema=../../../../src/kimmdy/kimmdy-yaml-schema.json - dryrun: false name: 'hexalanine_homolysis_000' max_tasks: 100 diff --git a/tests/test_files/test_integration/hexalanine_single_reaction/kimmdy.yml b/tests/test_files/test_integration/hexalanine_single_reaction/kimmdy.yml index fb892bef..b1b4b83c 100644 --- a/tests/test_files/test_integration/hexalanine_single_reaction/kimmdy.yml +++ b/tests/test_files/test_integration/hexalanine_single_reaction/kimmdy.yml @@ -1,5 +1,3 @@ -# yaml-language-server: $schema=../../../../src/kimmdy/kimmdy-yaml-schema.json - dryrun: false name: 'single_reaction_000' gmx_mdrun_flags: -maxh 24 -dlb yes -nt 8 -npme 0 -ntmpi 1 diff --git a/tests/test_files/test_integration/minimal_input_files/kimmdy.yml b/tests/test_files/test_integration/minimal_input_files/kimmdy.yml index cdcef849..9d8743b5 100644 --- a/tests/test_files/test_integration/minimal_input_files/kimmdy.yml +++ b/tests/test_files/test_integration/minimal_input_files/kimmdy.yml @@ -1,5 +1,3 @@ -# yaml-language-server: $schema=../../../../src/kimmdy/kimmdy-yaml-schema.json - name: 'minimal' dryrun: true max_tasks: 0 diff --git a/tests/test_files/test_integration/triplehelix_pull/kimmdy.yml b/tests/test_files/test_integration/triplehelix_pull/kimmdy.yml index c7759fc7..ce7c7cfe 100644 --- a/tests/test_files/test_integration/triplehelix_pull/kimmdy.yml +++ b/tests/test_files/test_integration/triplehelix_pull/kimmdy.yml @@ -1,5 +1,3 @@ -# yaml-language-server: $schema=../../../../src/kimmdy/kimmdy-yaml-schema.json - name: 'kimmdy_001' dryrun: false max_tasks: 10 diff --git a/tests/test_files/test_schema/kimmdy.yml b/tests/test_files/test_schema/kimmdy.yml index 696e21ba..4f614ada 100644 --- a/tests/test_files/test_schema/kimmdy.yml +++ b/tests/test_files/test_schema/kimmdy.yml @@ -1,5 +1,3 @@ -# yaml-language-server: $schema=../../../src/kimmdy/kimmdy-yaml-schema.json - name: 'kimmdy_001' dryrun: false max_tasks: 100