Commit Graph
1866 Commits
Author SHA1 Message Date
John Davis 503adcdf3b Override script name to display correct usage in cli help 2022-09-28 15:32:16 -04:00
John Davis dfd32a2ee8 Add type hints 2022-09-28 15:32:01 -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 d8e8a8efb6 Add --raiseerr option; hide error traceback by default 2022-09-28 15:25:14 -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 0c9b087543 Add init command 2022-09-28 15:24:09 -04:00
John Davis ab1854f3a7 Test against 1 or 2 databases 2022-09-28 15:23:50 -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 06c9475683 Merge pull request #14537 from jdavcs/dev_managedb_cli
A replacement for manage_db.sh + rewrite of migration system documentation
2022-09-22 10:06:45 -04:00
John Davis 6d1ee9d4f3 Remove duplication 2022-09-16 00:39:44 -04:00
John Davis 1eb4d15f38 Split script into admin and dev
TODO: remove duplication between db.py and db_dev.py (split into
multiple commits is intentional)
2022-09-16 00:39:44 -04:00
John Davis ad7f7f9268 Remove run_alembic.sh from root; user scripts/run_alembic.py instead.
Rationale: move developer-focused scripts out of galaxy root.
2022-09-16 00:39:44 -04:00
John Davis b6a5286487 Rename db.sh > manage_db.sh, following code review feedback 2022-09-16 00:39:44 -04:00
John Davis 2aaf6b8896 Override script name to display correct usage in cli help 2022-09-16 00:39:03 -04:00
John Davis 372d4af0b8 Add type hints 2022-09-16 00:39:03 -04:00
John Davis 5b7d46efe6 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-16 00:39:03 -04:00
John Davis 9b66c57fe0 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-16 00:39:03 -04:00
John Davis 6bb29939e2 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-16 00:39:03 -04:00
John Davis 7e238bf591 Add --raiseerr option; hide error traceback by default 2022-09-16 00:39:03 -04:00
John Davis 330d2043c1 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-16 00:39:03 -04:00
John Davis 1f25c6ee96 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-16 00:39:03 -04:00
John Davis de856e825a Add init command 2022-09-16 00:39:03 -04:00
John Davis 0a798ea536 Test against 1 or 2 databases 2022-09-16 00:39:03 -04:00
John Davis 811392b468 Add logging to script 2022-09-16 00:39:03 -04:00
John Davis a69ab407a6 Add initial draft 2022-09-16 00:39:03 -04:00
John Chilton b0a230b8f0 Script for finding unused mypy.ini entries. 2022-09-15 13:20:04 -04:00
Nicola Soranzo 0df5c9a5fb Updates for Poetry 1.2.0
Also:
- Export only dev requirements to `lib/galaxy/dependencies/dev-requirements.txt` .
- Packages don't have a `requirements.txt` file.
2022-09-05 17:23:18 +01:00
John Davis c25ce6f217 Enable logging for manage_db.sh 2022-08-24 16:00:38 -04:00
mvdbeek 68d07cb890 Merge branch 'release_22.05' into dev 2022-08-24 15:24:04 +02:00
mvdbeek 2468629452 Update release.sh script for new packaging layout 2022-08-23 16:04:24 +02:00
mvdbeek f208df3edc Merge branch 'release_22.05' into dev 2022-08-22 22:00:03 +02:00
mvdbeek 18a9a39d97 Write admin announce, add deferred datasets to user announcement 2022-08-19 16:11:41 +02:00
mvdbeek 857c598065 Update a couple PR titles, strip trailing . from PR titles 2022-08-19 12:29:25 +02:00
Nicola Soranzo 3378348d5e Merge branch 'release_22.05' into dev 2022-08-17 01:07:02 +01:00
Nicola Soranzo 961472cfff Merge branch 'release_22.01' into release_22.05 2022-08-16 23:25:42 +01:00
Nicola Soranzo 69defb7a20 Doc fixes 2022-08-15 19:15:02 +01:00
Nicola Soranzo 575a1d8358 Merge pull request #14430 from bernt-matthias/unlink-job-template
Deprecate `cluster_files_directory` and store DRMAA job template and PBS shell, error and out files in job working directory
2022-08-13 01:00:10 +01:00
Matthias Bernt b81b2f827e remove more leftover references to cluster_files_directory 2022-08-12 16:07:35 +02:00
mvdbeek a351bd1ce9 Merge branch 'release_22.05' into dev 2022-08-09 15:12:15 +02:00
mvdbeek da334f1e42 Fix first startup when only python3 is on PATH 2022-08-08 16:28:26 +02:00
John Davis af81f2a01d Verify db initialization before running upgrade script 2022-07-13 16:38:11 -04:00
Nicola Soranzo a382eacc58 Fix B023 warnings from flake8-bugbear 22.7.1
The new flake8-bugbear 22.7.1 warns if a function defined inside a loop uses
a variable redefined in the loop, due to the late-binding closure gotcha:
https://docs.python-guide.org/writing/gotchas/#late-binding-closures

When possible/sensible, I've moved the function definition before the loop
(adding the variable(s) as parameters) which is clearly also a speed-up.

Most other cases are false alarms, e.g. if the function is used and
discarded within the loop iteration that defines it. In such cases, I've
annotated the offending lines with a `# noqa: B023`.

The only file where I've applied the suggested workaround of immediately
binding arguments is in `lib/galaxy/visualization/plugins/config_parser.py`

Also:
- Small refactorings, in particular to `scripts/apply_tags.py`
2022-07-05 12:28:37 +01:00
Nicola Soranzo db16bc2478 Update lists of non-passing CWL conformance tests
from the cwl-1.0 branch.
2022-07-04 14:15:01 +01:00
mvdbeek 0a8eb4d711 Merge branch 'release_22.05' into dev 2022-07-02 18:32:28 +02:00
mvdbeek acb321bfd8 Merge branch 'release_22.01' into release_22.05 2022-07-02 18:07:38 +02:00
Nate Coraor a4e2af92b3 Fixes for the tus resumable upload command line script 2022-06-29 08:42:24 -04:00