mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-21 13:50:20 +08:00
using the following command: ``` autopep8 -i -r --exclude $(sed -e 's|^|./|' -e 's|/$||' .ci/flake8_blacklist.txt | paste -sd,) --select E201,E202 . ```
24 lines
600 B
Python
24 lines
600 B
Python
""" This script parses Galaxy or Tool Shed config file for database connection
|
|
and then delegates to sqlalchemy_migrate shell main function in
|
|
migrate.versioning.shell. """
|
|
import os.path
|
|
import sys
|
|
|
|
from migrate.versioning.shell import main
|
|
|
|
sys.path.insert(1, os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, 'lib')))
|
|
|
|
from galaxy.model.orm.scripts import get_config
|
|
|
|
|
|
def invoke_migrate_main():
|
|
config = get_config(sys.argv)
|
|
db_url = config['db_url']
|
|
repo = config['repo']
|
|
|
|
main(repository=repo, url=db_url)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
invoke_migrate_main()
|