annotate update_db.py @ 0:2d21809749f2 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meningotype commit b4e0bbb9a2a23cbac9137a96d59bc1775c23c8a5
author iuc
date Tue, 13 Jun 2023 11:04:13 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
2d21809749f2 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meningotype commit b4e0bbb9a2a23cbac9137a96d59bc1775c23c8a5
iuc
parents:
diff changeset
1 #!/usr/bin/env python3
2d21809749f2 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meningotype commit b4e0bbb9a2a23cbac9137a96d59bc1775c23c8a5
iuc
parents:
diff changeset
2
2d21809749f2 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meningotype commit b4e0bbb9a2a23cbac9137a96d59bc1775c23c8a5
iuc
parents:
diff changeset
3 import pathlib
2d21809749f2 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meningotype commit b4e0bbb9a2a23cbac9137a96d59bc1775c23c8a5
iuc
parents:
diff changeset
4 import shutil
2d21809749f2 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meningotype commit b4e0bbb9a2a23cbac9137a96d59bc1775c23c8a5
iuc
parents:
diff changeset
5 import subprocess
2d21809749f2 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meningotype commit b4e0bbb9a2a23cbac9137a96d59bc1775c23c8a5
iuc
parents:
diff changeset
6
2d21809749f2 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meningotype commit b4e0bbb9a2a23cbac9137a96d59bc1775c23c8a5
iuc
parents:
diff changeset
7 import meningotype
2d21809749f2 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meningotype commit b4e0bbb9a2a23cbac9137a96d59bc1775c23c8a5
iuc
parents:
diff changeset
8
2d21809749f2 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meningotype commit b4e0bbb9a2a23cbac9137a96d59bc1775c23c8a5
iuc
parents:
diff changeset
9 if __name__ == '__main__':
2d21809749f2 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meningotype commit b4e0bbb9a2a23cbac9137a96d59bc1775c23c8a5
iuc
parents:
diff changeset
10 db_path = 'db'
2d21809749f2 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meningotype commit b4e0bbb9a2a23cbac9137a96d59bc1775c23c8a5
iuc
parents:
diff changeset
11 original_db_path = pathlib.Path(meningotype.__file__).parent / 'db'
2d21809749f2 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meningotype commit b4e0bbb9a2a23cbac9137a96d59bc1775c23c8a5
iuc
parents:
diff changeset
12 shutil.copytree(original_db_path, db_path)
2d21809749f2 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meningotype commit b4e0bbb9a2a23cbac9137a96d59bc1775c23c8a5
iuc
parents:
diff changeset
13 cmd = ["meningotype", "--updatedb", "--db", db_path]
2d21809749f2 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meningotype commit b4e0bbb9a2a23cbac9137a96d59bc1775c23c8a5
iuc
parents:
diff changeset
14 subprocess.run(cmd)