Commit Graph
61979 Commits
Author SHA1 Message Date
Marius van den Beek f0254ddf2f Merge pull request #14726 from jdavcs/release_22.05_managedb_cli
[22.05] Improved migration scripts, documentation
2022-09-30 10:56:35 +02:00
Marius van den Beek ef0e7b3888 Merge pull request #14738 from nsoranzo/release_22.05_backport_14728
[22.05] Backport #14728
2022-09-30 10:54:36 +02:00
Nicola Soranzo b3bbef0496 Use loc file that actually exists in the param validators of test tool
Previously, the ``validation_dataset_metadata_in_file`` test tool was failing
to load and was not tested at all during framework tests on GitHub Actions.
2022-09-30 01:19:43 +01:00
Nicola Soranzo db6edfe3d5 Improve error messages when parsing param validators 2022-09-30 01:19:19 +01:00
Nicola Soranzo 96a50bb70d Make `metadata_name` a required attribute of certain validators 2022-09-30 01:17:48 +01:00
Nicola Soranzo 7143e7d0db Fix typos 2022-09-30 01:17:30 +01:00
Björn Grüning d742987043 Merge pull request #14733 from mvdbeek/fix_subworkflow_upgrade_Step
[22.05] Fix subworkflow upgrade
2022-09-29 19:49:36 +02:00
John Davis 8538ab7fcb Fix same error in sample code in the rst doc file 2022-09-29 12:23:28 -04:00
mvdbeek 38d04a2d3a Fix subworkflow upgrade
Fixes https://github.com/galaxyproject/galaxy/pull/14718
2022-09-29 18:05:50 +02:00
John DavisandDavid López 5ea65e6c0e Fix error in sample code
Co-authored-by: David López <46503462+davelopez@users.noreply.github.com>
2022-09-29 12:04:57 -04:00
John Davis 98218ac236 Point to init command as safer way to initialize empty database 2022-09-28 15:45:00 -04:00
John Davis 61c4933947 Split documentation into admin and dev sections 2022-09-28 15:45:00 -04:00
John Davis f1dc53e51e Remove duplication 2022-09-28 15:45:00 -04:00
John Davis bd56131ebd Split script into admin and dev
TODO: remove duplication between db.py and db_dev.py (split into
multiple commits is intentional)
2022-09-28 15:45:00 -04:00
John Davis 6c64a44a10 Remove run_alembic.sh from root; user scripts/run_alembic.py instead.
Rationale: move developer-focused scripts out of galaxy root.
2022-09-28 15:45:00 -04:00
John Davis e43552fdc5 Rename db.sh > manage_db.sh, following code review feedback 2022-09-28 15:45:00 -04:00
John DavisandMarius van den Beek 170e4a4be2 Update lib/galaxy/model/migrations/README.md
Co-authored-by: Marius van den Beek <m.vandenbeek@gmail.com>

Update lib/galaxy/model/migrations/README.md

Co-authored-by: Marius van den Beek <m.vandenbeek@gmail.com>

Update lib/galaxy/model/migrations/README.md

Co-authored-by: Marius van den Beek <m.vandenbeek@gmail.com>

Update lib/galaxy/model/migrations/README.md

Co-authored-by: Marius van den Beek <m.vandenbeek@gmail.com>
2022-09-28 15:44:41 -04:00
John Davis f049a38683 Rewrite migrations documentation 2022-09-28 15:35:51 -04:00
John Davis 503adcdf3b Override script name to display correct usage in cli help 2022-09-28 15:32:16 -04:00
John Davis 0c348a5759 Update test comments 2022-09-28 15:32:10 -04:00
John Davis dfd32a2ee8 Add type hints 2022-09-28 15:32:01 -04:00
John Davis 5902cadf7f Remove duplicate migration code 2022-09-28 15:31:52 -04:00
John Davis 6fcc58a85c Drop LegacyScripts: no longer used 2022-09-28 15:31:25 -04:00
John Davis b0a3c013ab Remove manage_db_adapter.py
We no longer need to translate the arguments of manage_db.sh into
arguments for alembic. The new facade script for alembic (db.sh)
accesses the alembic api programmatically.
2022-09-28 15:27:50 -04:00
John Davis 5e8add0e46 Rename migrate_db.py > run_alembic.py
This is consistent with other similar pairs of files:
[script-name].sh invoking scripts/[script-name].py (check_model, create_roolshed_db, db)

Also, the python file does not require exec permissions.
2022-09-28 15:25:51 -04:00
John Davis 5d376fdacc Drop create_db.sh, create_db.py (see note)
For ToolShed, we have create_toolshed_db.sh.

For galaxy and toolshed install databases (gxy and tsi branches under
alembic), we use the `init` subcommand of the `db.sh` script (`./db.sh
init`), which has exactly the same functionality as these deleted
scripts.

To the best of my knowledge, these are not used anywhere else (unlike,
for example, scripts/manage_db.py, which is called from the
ansible-galaxy role).
2022-09-28 15:25:43 -04:00
John Davis ed1f6702e5 Rename manage_db.sh to manage_toolshed_db.sh. Limit to TS operations.
Becuase everything else is handled via db.sh or run_alembic.sh
2022-09-28 15:25:31 -04:00
John Davis dc823d589c Misc edits to db.sh 2022-09-28 15:25:21 -04:00
John Davis d8e8a8efb6 Add --raiseerr option; hide error traceback by default 2022-09-28 15:25:14 -04:00
John Davis b4b76c91a2 Add missing tests 2022-09-28 15:25:06 -04:00
John Davis 40249133cc Revise db.sh cli command aliases
1. Remove aliases from subcommands that change things (upgrade, downgrade,
revision, init) to reduce risk of accidental usage.

2. Add aliases to readonly subcommands (history, show, version,
   dbversion)

3. Minor edits
2022-09-28 15:24:57 -04:00
John Davis 889a8445bd Change parsing of --galaxy-config option
Rationale: alternate config file applies to all subcommands, so, I
think, it is more correct to run this:

> ./db.sh -c mygalaxy.yml upgrade some-revision-id

than this:

> ./db.sh upgrade some-revision-id -c mygalaxy.yml

That's also consistent with how alembic handles this option.
2022-09-28 15:24:49 -04:00
John Davis bf83b4347a Fix mypy by asserting object before accessing its attributes 2022-09-28 15:24:40 -04:00
John Davis e0e30a5744 Fix packages tests: script is one level up 2022-09-28 15:24:26 -04:00
John Davis 3be7c53eb9 Fix linting 2022-09-28 15:24:16 -04:00
John Davis 0c9b087543 Add init command 2022-09-28 15:24:09 -04:00
John Davis 103210cc73 Set dburl in alembic config 2022-09-28 15:24:01 -04:00
John Davis ab1854f3a7 Test against 1 or 2 databases 2022-09-28 15:23:50 -04:00
John Davis 887b882ff0 Add inline testing documentation 2022-09-28 15:23:42 -04:00
John Davis d1c9342eca Add logging to script 2022-09-28 15:23:32 -04:00
John Davis b64fda7478 Add initial draft 2022-09-28 15:23:21 -04:00
John Davis 4cd3291598 Refactor get_alembic_cfg: make available to other code 2022-09-28 15:23:09 -04:00
Dannon 4ee6b34240 Merge pull request #14715 from jdavcs/release_22.05_migration_docs
Move database migration documentation to Galaxy docs
2022-09-28 06:24:26 -04:00
John Davis ab40d01ceb Link readme to docs, don't duplicate content. 2022-09-27 15:08:41 -04:00
John Davis 84f22bac77 Add db migration documentation to docs 2022-09-27 15:03:12 -04:00
John Davis 5a748bb867 Display 'Config Options' as subheading of 'Galaxy Configuration'
This corrects a (supposedly) typo that prevented this to be displayed as
a subheading on this page: https://docs.galaxyproject.org/en/master/admin/index.html
2022-09-27 15:03:03 -04:00
John Chilton ace1e13da3 Merge pull request #14641 from mvdbeek/fix_optional_data_input_submission_expanded_tool_form
[22.05] Fix delayed optional data input handling
2022-09-22 18:08:58 -04:00
mvdbeek 17f3647a6f Test that subworkflows with disconnected optional inputs are scheduled correctly 2022-09-21 19:31:42 +02:00
mvdbeek 9a7c23335f Regression test for unspecified optional data inputs 2022-09-21 19:31:42 +02:00
mvdbeek 64cb245ddd Fix running subworkflows with disconnected optional/default inputs 2022-09-21 19:31:41 +02:00