Skip to content

Commit

Permalink
update build_examples without file-local yml lsp config
Browse files Browse the repository at this point in the history
  • Loading branch information
jmbuhr committed Oct 25, 2023
1 parent a4ea59e commit 656ec36
Show file tree
Hide file tree
Showing 14 changed files with 2 additions and 42 deletions.
2 changes: 1 addition & 1 deletion example/alanine_hat_naive/kimmdy.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# yaml-language-server: $schema=../../src/kimmdy/kimmdy-yaml-schema.json
dryrun: false
name: 'alanine_hat_000'
max_tasks: 100
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:
Expand Down
2 changes: 0 additions & 2 deletions example/charged_peptide_homolysis_hat_naive/kimmdy.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# yaml-language-server: $schema=../../src/kimmdy/kimmdy-yaml-schema.json

name: 'kimmdy_001'
dryrun: false
max_tasks: 100
Expand Down
2 changes: 0 additions & 2 deletions example/hexalanine_homolysis/kimmdy.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# yaml-language-server: $schema=../../src/kimmdy/kimmdy-yaml-schema.json

dryrun: false
name: 'hexalanine_homolysis_000'
max_tasks: 100
Expand Down
2 changes: 0 additions & 2 deletions example/hexalanine_single_reaction/kimmdy.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 0 additions & 2 deletions example/triplehelix_pull/kimmdy.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# yaml-language-server: $schema=../../src/kimmdy/kimmdy-yaml-schema.json

name: 'kimmdy_001'
dryrun: false
max_tasks: 10
Expand Down
18 changes: 1 addition & 17 deletions src/kimmdy/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# yaml-language-server: $schema=../../../../src/kimmdy/kimmdy-yaml-schema.json

dryrun: false
name: 'alanine_hat_000'
max_tasks: 100
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# yaml-language-server: $schema=../../../../src/kimmdy/kimmdy-yaml-schema.json

name: 'kimmdy_001'
dryrun: false
max_tasks: 100
Expand Down
2 changes: 0 additions & 2 deletions tests/test_files/test_integration/emptyrun/kimmdy.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# yaml-language-server: $schema=../../../../src/kimmdy/kimmdy-yaml-schema.json

name: 'emptyrun_001'
dryrun: false
max_tasks: 0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# yaml-language-server: $schema=../../../../src/kimmdy/kimmdy-yaml-schema.json

dryrun: false
name: 'hexalanine_homolysis_000'
max_tasks: 100
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# yaml-language-server: $schema=../../../../src/kimmdy/kimmdy-yaml-schema.json

name: 'minimal'
dryrun: true
max_tasks: 0
Expand Down
2 changes: 0 additions & 2 deletions tests/test_files/test_integration/triplehelix_pull/kimmdy.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# yaml-language-server: $schema=../../../../src/kimmdy/kimmdy-yaml-schema.json

name: 'kimmdy_001'
dryrun: false
max_tasks: 10
Expand Down
2 changes: 0 additions & 2 deletions tests/test_files/test_schema/kimmdy.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# yaml-language-server: $schema=../../../src/kimmdy/kimmdy-yaml-schema.json

name: 'kimmdy_001'
dryrun: false
max_tasks: 100
Expand Down

0 comments on commit 656ec36

Please sign in to comment.