Ahmed Awan
b80f41816c
Merge remote-tracking branch 'upstream/release_24.2' into dev
2025-03-31 10:35:43 -05:00
John Davis
1bf72997a0
Handle "%" character in raw SQL
...
This statement is prepared for SQLAlchemy but executed via psycopg2 in
the `pgcleanup.py` script. For psycopg2, the "%" character should be replaced
with %% (see docs
https://www.psycopg.org/docs/usage.html#passing-parameters-to-sql-queries ).
SQLAlchemy already takes care of it automatically.
2025-03-28 15:08:21 +00:00
Nicola Soranzo
5fe5b53bf3
Fix new ruff 0.11.0 errors
...
Also:
- Add and fix type annotations
- Fix call of `object_store_allows_id_selection()` method
2025-03-15 17:12:02 +00:00
Nicola Soranzo
9477c7773e
Use model classes from `galaxy.model instead of app.model` object
...
for proper type annotation of query results.
Also:
- Drop unused code from `lib/tool_shed/webapp/controllers/user.py`
- Drop Galaxy model code from
`lib/tool_shed/util/admin_util.py:Admin.purge_user()`
2025-02-26 12:41:40 +00:00
Nicola Soranzo
dd80698e4b
Removed deprecated `current` attribute of scoped_session
2025-02-21 09:29:41 +00:00
John Davis and Nicola Soranzo
7886de0dd8
Fix typo
...
Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com >
2025-01-23 11:39:25 -05:00
John Davis
896d0848c2
Remove transaction helper from scripts
2025-01-23 11:39:25 -05:00
Nicola Soranzo
26a4e146e0
Fix UP031 errors
...
reported by ruff 0.8.0 .
2024-11-24 21:35:23 +00:00
Nicola Soranzo
534010a8cb
Enable flake8-implicit-str-concat ruff rules
...
See https://docs.astral.sh/ruff/rules/#flake8-implicit-str-concat-isc
2024-04-29 13:37:54 +01:00
Nicola Soranzo
0629908541
Fix new UP031 errors from ruff 0.4.2
2024-04-29 00:09:38 +01:00
John Davis
0e61d61f47
Fix SA2.0 error: joinedload does not take str args
2024-04-02 10:08:53 -04:00
Nicola Soranzo
a2018a5e60
Enable flake8-comprehensions ruff rules
...
but allow `dict()` calls that make use of keyword arguments (e.g.,
`dict(a=1, b=2)`).
2024-03-09 19:11:20 +00:00
Nate Coraor
90a0df5d48
Fix the purge historyless HDAs pgcleanup action
2024-01-29 11:25:30 -05:00
John Davis
f91693dc6e
Merge pull request #16783 from SergeyYakubov/get-rid-of-filename-property
...
Replace file_name property with get_file_name function
2023-11-08 17:19:40 -05:00
Yakubov, Sergey
c30a4c06c2
Replace file_name property with get_file_name function
2023-11-08 17:17:14 -05:00
John Chilton
360b327de6
Augment pgcleanup to allow periodically deleting old datasets.
...
... and restricting operations to specific object store ids.
2023-09-25 15:10:13 -04:00
John Chilton
da8ce00d88
Cleanup docs in admin_cleanup_datasets.py.
2023-09-25 14:49:45 -04:00
John Davis
09fe7b9a54
Fix select stmts in scripts
2023-07-19 11:05:55 -04:00
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 Cuccuru and Nicola 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