Commit Graph
144 Commits
Author SHA1 Message Date
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
Nate Coraor ba83310d53 Mostly refactored pgcleanup.py 2018-10-15 14:59:15 -04:00
Nate Coraor 941d68ad35 WIP pgcleanup improvements 2018-10-15 14:59:15 -04:00
Nate Coraor 429ef96a10 WIP pgcleanup improvements 2018-10-15 14:59:15 -04:00
Nate Coraor 8dbf140cce Add a pgcleanup action to purge HDAs of purged histories 2018-09-28 16:39:30 -04:00
Nate Coraor 7b8af87091 Add a pgcleanup function for purging error HDAs 2018-09-18 18:24:02 -04:00
Nate Coraor eae35fab33 Deduplicate pgcleanup.py 2018-09-18 18:23:34 -04:00
Matthias Bernt 0c321cb86e removed config.ini parameter from cleanup scripts
fixes https://github.com/galaxyproject/galaxy/issues/5941
2018-04-23 14:58:48 +02:00
John Chilton fea7953410 Remove two scripts - dataset purging hasn't worked this way for a very long time. 2018-03-23 16:14:49 -04:00
John Chilton 16d821e12e Mark scripts/* that don't work with YAML configuraiton options as deprecated. 2018-03-23 16:14:49 -04:00
John Chilton 5f3f792f6f Unification of Galaxy configuration parsing for scripts/* 2018-03-23 16:14:49 -04:00
Nicola Soranzo 74d0bcb353 Merge branch 'release_17.09' into release_18.01 2018-03-19 17:50:57 +00:00
Nicola Soranzo 3b87dac780 Add Galaxy lib directory to Python path for 2 scripts
Also fix check introduced in commit 0763cab37a .

Fix https://github.com/galaxyproject/galaxy/issues/5722 .
2018-03-19 14:53:19 +00:00
mvdbeek 89d45416fb Import Registry directly 2018-01-19 15:27:55 +01:00
mvdbeek ca51898bc4 Fix cleanup datasets script 2018-01-19 14:50:08 +01:00
Nicola Soranzo 9b4de72ca6 Fix all E722 errors and ignore E741
Introduced in flake8 3.5.0
Fix import order.
2017-10-24 11:29:09 +01:00
Nate Coraor b8dfceb72a Merge branch 'release_17.09' into dev 2017-10-23 10:38:14 -04:00
Nate Coraor 646a8d1092 Support a log directory argument for pgcleanup.py 2017-10-20 12:43:09 -04:00
Nicola Soranzo d1bc98dfcb Python3: fix remaining print statements
Remove some debugging prints.
Fix import order.
Consolidate exception logging in ToolShed database migrations.
2017-10-12 18:34:29 +01:00
Nicola Soranzo e32ad2864f Remove container config log message from cleanup scripts logs 2017-08-18 12:35:04 +01:00
Nicola Soranzo a353b2e88f Fix E127 errors introduced by previous commit
using:
```
autopep8 -i -r --exclude $(sed -e 's|^|./|' -e 's|/$||' .ci/flake8_blacklist.txt | paste -sd,) --select E127 .
```
2017-08-17 11:35:39 +01:00
Nicola Soranzo 21b44bf348 Fix all E201 and E202 style errors
using the following command:
```
autopep8 -i -r --exclude $(sed -e 's|^|./|' -e 's|/$||' .ci/flake8_blacklist.txt | paste -sd,) --select E201,E202 .
```
2017-08-17 11:35:39 +01:00
Nicola Soranzo 3d57c22b63 Fix I201 errors from flake8-import-order
Also fix Python3 compatibility.
Remove unused method
galaxy.tools.parameters.sanitize.ToolParameterSanitizer.restore_param() .
2016-11-23 18:31:04 +00:00
Nicola Soranzo 1d17a29c79 Fixes for pycodestyle 2.2.0 2016-11-15 16:56:50 +00:00