Commit Graph
1747 Commits
Author SHA1 Message Date
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
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
Nicola Soranzo 14b1730eb2 Combine "as" imports with other "from" imports 2022-06-20 20:06:30 +01:00
Nicola Soranzo 2e2403e1e2 Prefer venv module over virtualenv
if it's installed as part of the Python standard library.
2022-06-17 00:33:14 +01:00
Dannon 4644922783 Merge pull request #13655 from mvdbeek/metadata_embed
Create data_fetch and set_metadata celery tasks
2022-06-07 10:27:06 -04:00
John Chilton 1c795891e3 Tour validation. 2022-06-02 14:53:55 -04:00
Sergey Golitsynskiy 7f09898636 Update inline documentation in scripts 2022-05-31 10:30:30 -04:00
mvdbeek ec939cc9f7 Fix a typo in celery_shell.py 2022-05-25 19:46:47 +02:00
Nicola Soranzo abb75416a3 Drop uncredit pull requestor list
and give credit to everyone, as in GitHub auto-generated release
notes.
2022-05-13 12:40:48 +01:00
Nicola Soranzo 1ec8652313 Fix type annotation and simplify script
Use f-strings
2022-05-12 16:38:12 +01:00
Nicola Soranzo 4bc75e4179 Replace committer name and GitHub username
Follow up on commit 559b0d1245 .

Also:
- Remove former devteam members from uncredited pull requestor list.
2022-05-12 16:38:12 +01:00
Nicola Soranzo 9dec207a52 Respect GRAVITY_STATE_DIR when activating venv
So that:

export GRAVITY_STATE_DIR=/srv/galaxy/gravity
./run.sh

writes gravity state/log files to the right place.
2022-05-10 15:57:42 +02:00
Nicola Soranzo 8afac1afd5 Use `load_app_properties()` to load Galaxy config file
instead of directly loading it as YAML.
Will make it easier to uniformly deal with changes of format (e.g.
we are deprecating ini now).

Fix traceback:

```
Traceback (most recent call last):
  File "scripts/config_parse.py", line 31, in <module>
    main(args.config_file, args.setting)
  File "scripts/config_parse.py", line 16, in main
    gx_config = GalaxyAppConfiguration(**yaml.safe_load(open(config))["galaxy"])
  File "/home/berntm/.planemo/gx_venv_3/lib/python3.8/site-packages/yaml/__init__.py", line 125, in safe_load
    return load(stream, SafeLoader)
  File "/home/berntm/.planemo/gx_venv_3/lib/python3.8/site-packages/yaml/__init__.py", line 81, in load
    return loader.get_single_data()
  File "/home/berntm/.planemo/gx_venv_3/lib/python3.8/site-packages/yaml/constructor.py", line 49, in get_single_data
    node = self.get_single_node()
  File "/home/berntm/.planemo/gx_venv_3/lib/python3.8/site-packages/yaml/composer.py", line 39, in get_single_node
    if not self.check_event(StreamEndEvent):
  File "/home/berntm/.planemo/gx_venv_3/lib/python3.8/site-packages/yaml/parser.py", line 98, in check_event
    self.current_event = self.state()
  File "/home/berntm/.planemo/gx_venv_3/lib/python3.8/site-packages/yaml/parser.py", line 171, in parse_document_start
    raise ParserError(None, None,
yaml.parser.ParserError: expected '<document start>', but found '<scalar>'
  in "/tmp/tmpsffm7of5/galaxy.ini", line 3, column 1
```

when starting Galaxy with a `galaxy.ini` config file (though Galaxy startup
will still fail later).
2022-04-26 09:48:18 +01:00
Björn Grüning 8885c3107d Merge pull request #13657 from dannon/configurable-plugin-dir
Add support for gulp build process to use a configurable directory
2022-04-12 15:16:30 +02:00
mvdbeek 6f3bdd39d9 Merge branch 'release_22.01' into dev 2022-04-08 10:13:24 +02:00
Nicola Soranzo 6d53620a52 Respect GRAVITY_STATE_DIR when activating venv
So that:

export GRAVITY_STATE_DIR=/srv/galaxy/gravity
./run.sh

writes gravity state/log files to the right place.
2022-04-06 23:48:18 +01:00
Nicola Soranzo 7ecd7f0cb8 Remove --wait startup option
Follow-up on https://github.com/galaxyproject/galaxy/pull/13071 .
2022-04-05 19:15:23 +01:00
Dannon Baker 274fcf3bb3 Isort 2022-04-05 13:42:32 -04:00
Dannon Baker 04ed93d81f Make sure config actually exists. Exits silently if nothing found or
no matches.
2022-04-05 09:34:11 -04:00
mvdbeek 89e06a06cc Update supervisor config when starting galaxy via run.sh 2022-04-05 11:14:11 +02:00
Dannon Baker fdcf8c086e Actually pass plugin path through to invoked build process 2022-04-04 15:15:10 -04:00