Commit Graph
167 Commits
Author SHA1 Message Date
John Davis 0c895d1409 Wrap session.flush in admin_cleanup_datasets script 2023-06-09 13:05:26 -04:00
John Davis e7408dcd98 Wrap session.flush in populate_uuid script 2023-06-09 13:05:26 -04:00
John Davis 96e534122d Wrap session.flush in cleanup_datasets script 2023-06-09 13:05:26 -04:00
Nicola Soranzo c655360e4e Merge branch 'release_23.0' into dev 2023-04-05 12:39:43 +01:00
Nicola Soranzo bee3d2e7ac Merge branch 'release_22.05' into release_23.0 2023-04-03 16:31:48 +01:00
Nicola Soranzo c3139f246d Fix UP031 errors reported by ruff 2023-03-29 08:55:54 +01:00
Dannon Baker 9b1301e6ae Apply black to forward merge 2023-03-27 10:51:25 -04:00
Dannon Baker caaa3e4f62 Joinedload replaces eagerload 22.05 forward 2023-03-27 10:17:11 -04:00
Dannon Baker f959f05b97 Merge remote-tracking branch 'upstream/release_22.01' into release_22.05 2023-03-27 10:01:59 -04:00
mvdbeek 756d047e1c Merge branch 'release_23.0' into dev 2023-03-06 18:08:05 +01:00
mvdbeek d97adf6359 Fix slugified dataset display
Fixes https://github.com/galaxyproject/galaxy/issues/15676.
2023-03-03 18:39:34 +01:00
John Chilton 6d91292beb Lint fixes... 2023-02-21 14:18:57 -05:00
John Chilton f7a4992b4b Implement quota tracking options per ObjectStore. 2023-02-19 10:33:21 -05:00
Nicola Soranzo 30f60493c3 Format Python code with black 23.1.0
with manual fixes to 3 files to make them compatible with black 22.12.0 .

We need to keep black pinned at `<23` until we vendorise `packaging`, since
the new version of black depends on `packaging >=22.0` which is the version
where `LegacyVersion` (which we use for tool lineages) was removed.
2023-02-01 23:51:03 +00:00
John Davis dd553e805f Fix maintenance script bug 2022-12-16 10:15:21 -05:00
Sergey Golitsynskiy 158b9f0a70 s/eagerload/joinedload (SQLAlchemy 2.0)
Ref: https://docs.sqlalchemy.org/en/14/orm/loading_relationships.html?highlight=eagerload#sqlalchemy.orm.eagerload
2022-03-16 16:48:33 -04:00
Nicola Soranzo a62e86fc2e Merge branch 'release_22.01' into dev 2022-03-04 17:02:22 +00:00
Nicola Soranzo e886d38171 Merge branch 'release_21.09' into release_22.01 2022-03-04 16:16:15 +00:00
Nicola Soranzo 7f04b5d698 Merge branch 'release_22.01' into dev 2022-03-02 20:08:55 +00:00
Nate Coraor 6a20106694 Fix typo with metadata_file 2022-03-02 14:23:46 -05:00
Nate Coraor a9b4b632a9 Fix pgcleanup.py for datasets stored by UUID 2022-03-02 14:18:31 -05:00
mvdbeek 034f518e43 Move init_models_from_config to galaxy.model.mapping 2022-03-01 16:50:06 +01:00
mvdbeek c08a12f553 Drop get_database_url helper
I don't see an advantage over accessing the config attribute instead.
2022-03-01 16:50:06 +01:00
Dannon Baker 623a5e165a Apply black formatting.
Apply isort.
2022-02-03 07:42:20 -05:00
mvdbeek bab12662a9 Drop old sqlalchemy patterns 2021-12-16 12:30:49 +01:00
Nicola Soranzo 90a729e431 New pyupgrade fixes
Found by running `ack --type=python -f | grep -v '^tools/' | xargs pyupgrade --py36-plus`
2021-10-24 12:10:34 +01:00
mvdbeek ecc54ba00c Merge branch 'release_21.05' into dev 2021-08-09 18:45:05 +02:00
Nate Coraor 038045a600 Add a GDPR-friendly user purge to pgcleanup. 2021-07-23 14:55:54 -04:00
Sergey Golitsynskiy 680db562f7 Do not use legacy string interpolation on URL obj
This fixes the pgcleanup script and an integration test.

The test fails because of an error in the script.
The error is caused by incorrect string formatting.
The new SQLAlchemy URL object extends collections.namedtuple, and a
tuple is incompatible with printf-style formating.

Ref:
https://github.com/sqlalchemy/sqlalchemy/blob/18dbd6aa12a7eca0acb1e2c4f752088e24d6adae/lib/sqlalchemy/engine/url.py#L36
https://docs.python.org/3/library/stdtypes.html#printf-style-string-formatting
2021-05-18 19:00:55 -04:00
mvdbeek 9e9343ccd2 Fix cleanup_datasets.py script 2021-05-11 18:34:30 +02:00
Nicola Soranzo d26b3d9848 Fix all E203, E741 and W504 flake8 errors 2021-01-18 10:35:41 +00:00
Gianmauro CuccuruandNicola Soranzo 9ebde5f1e9 Update scripts/cleanup_datasets/pgcleanup.py
Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com>
2020-12-01 15:32:06 +01:00
Gianmauro Cuccuru 7ceeb70f75 Add an option to the pgcleanup script to redirect logging to a different log file 2020-12-01 14:11:32 +01:00
Gianmauro Cuccuru 90e228cf91 Add an option to the pgcleanup script to redirect logging to stdout 2020-10-31 05:27:31 +01:00
Nicola Soranzo 9d74bba7fb Drop support for retired Python 3.5
Upgrade syntax using `pyupgrade --py36-plus` .

Manually drop several `six` imports.

Also:
- Remove broken pr_cache in scripts/bootstrap_history.py
- Fix broken prefix removal in lib/galaxy/tool_util/deps/mulled/mulled_build.py
2020-10-07 11:52:13 +01:00
Nicola Soranzo 56450de8a9 Print help if no action is selected 2020-03-05 13:26:28 +01:00
Nicola Soranzo 3525cf7a8e Remove broken script
None of the 3 other scripts called by this one exists anymore.
2020-02-03 18:48:57 +00:00
Nicola Soranzo f5cd88465e Make str.join()s more efficient
by using generator expressions and tuples instead of lists.
2020-01-23 11:06:32 +00:00
Nicola Soranzo 303f9ec871 Merge pull request #8908 from bernt-matthias/topic/pgcleanup-also-delete
make pgcleanup also delete HDAs
2019-11-04 10:21:04 +00:00
Sergey Golitsynskiy a855e2ca64 Fix TypeError in logging commands
Fix the following exception:

```
TypeError: not all arguments converted during string formatting
```

Also, make other log format strings more consistent: %d for numeric object IDs.
2019-11-03 21:35:07 +00:00
M Bernt 6f010bd49c make pgcleanup also delete HDAs
follow up to https://github.com/galaxyproject/galaxy/pull/3572
2019-10-30 13:42:31 +01:00
John Chilton e611797a77 Merge pull request #8470 from erasche/fix-975
Fix #975
2019-08-16 14:42:24 -04:00
Helena Rasche 5f615168bc Fix #975 2019-08-16 15:11:15 +02:00
Helena Rasche b316bab722 Remove scripts deprecated since 1 year 2019-08-15 14:30:53 +02:00
M Bernt f6ff679d63 cleanup: use logging instead of print 2019-08-01 09:25:13 +02:00
Nicola Soranzo 90a6c6d46b Fix issues reported by ShellCheck 2019-06-13 12:53:26 +01:00
Nate Coraor bd06628a3d Fix use of pgcleanup's purge_deleted_users when there are no users to
purge
2019-05-17 16:37:19 -04:00
Nate Coraor fc027182f7 Fix variable name for work mem in pgcleanup.py 2019-05-17 11:30:40 -04:00
Nate Coraor e72d52c6df Lint 2018-10-15 16:07:14 -04:00
Nate Coraor e1a197676e Refactor repetitive HDA purging stuff and add a function to purge HDAs
with null history_ids
2018-10-15 14:59:15 -04:00