John Chilton
5f3f792f6f
Unification of Galaxy configuration parsing for scripts/*
2018-03-23 16:14:49 -04: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
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
1d17a29c79
Fixes for pycodestyle 2.2.0
2016-11-15 16:56:50 +00:00
Nicola Soranzo
cc336f61c0
Make some files compatible with Python3
...
Also enlarge the set of files tested with flake8 under Python3
2016-06-03 19:24:46 +01:00
Nicola Soranzo
6ba6f798ec
Fix more E203 flake8 errors
2016-05-17 23:53:16 +01:00
Nicola Soranzo
8a43b2b492
Python 3: use "as" instead of comma in except clause
2016-05-17 23:53:16 +01:00
Nicola Soranzo
d85db9daa6
Use __file__ when adding paths to sys.path instead of os.getcwd() .
...
Also insert additional paths in position 1 unless strictly necessary.
2016-02-18 15:45:15 +00:00
Nate Coraor
c893afda00
Merge branch 'dev' into smash_eggs
2015-10-19 11:46:58 -04:00
Dannon Baker
b77496ec63
Update other quota manipulations to use the new user.adjust_quota_usage function.
2015-10-13 13:53:15 -04:00
Nate Coraor
0469ed29e0
Remove egg cruft from scripts/
2015-09-21 15:55:07 -04:00
Nicola Soranzo
0f883ef776
Merge branch 'release_15.07' into dev
...
Conflicts:
lib/galaxy/model/__init__.py
2015-08-20 14:12:27 +01:00
Nicola Soranzo
a34f13a9f6
Merge branch 'release_15.05' into release_15.07
2015-08-20 14:07:09 +01:00
Nicola Soranzo
238d908cce
Fix purging datasets whose total_size is None.
...
Fix the error:
Removing disk, file /opt/galaxy/database/files/000/dataset_192.dat
Error attempting to purge data file: /opt/galaxy/database/files/000/dataset_192.dat error: unsupported operand type(s) for -=: 'Decimal' and 'NoneType'
when running:
python scripts/cleanup_datasets/cleanup_datasets.py config/galaxy.ini -d 10 -3 -r
2015-08-19 15:33:54 +01:00
Nicola Soranzo
cc9b0bed85
Fix all E712 errors. Standardize sqlalchemy imports.
2015-07-14 20:49:34 +01:00
Nicola Soranzo
6569c2dcc3
Partially lint scripts/ .
2015-07-13 20:13:28 +01:00
John Chilton
732abcc0db
Merge remote-tracking branch 'jmchilton/release_15.05' into dev
2015-06-08 14:04:28 -04:00
Nicola Soranzo
292d16a593
Mark also HDAs as purged when purging datasets via cleanup script.
...
This will make purged datasets be shown as purged in histories,
preventing them to be undeleted through the UI.
This will not fix datasets previously purged through this script,
scripts/cleanup_datasets/pgcleanup.py may be used for that.
2015-06-04 18:06:01 +01:00
dpryan79
4c20494011
Make python scripts executable. Tweak remove_renamed_datasets_from_disk.py.
2015-05-12 18:25:32 +02:00
dpryan79
a092aa2f59
Start providing usage information for the various cleanup scripts
2015-05-12 17:53:18 +02:00
Dave Bouvier
5bdb75aa82
Correct usage of "it's" versus "its".
2014-04-17 15:49:32 -04:00
Lance Parsons
91ba836a00
Fix unicode issue when printing history names in cleanup_datasets.py script
2013-07-22 14:24:13 -04:00
Nate Coraor
35dd4e1ef9
Fix for cleanup_datasets.py when database_connection is the uncommented default in the config file.
2012-04-16 10:07:10 -04:00
Nate Coraor
9aed5a36d8
Fix for dataset cleanup scripts and object store.
2012-01-31 14:07:14 -05:00
Nate Coraor
3a1526ac8a
Decrease user disk usage when files are removed from disk by the cleanup_datasets.py.
2011-08-22 16:19:49 -04:00
Greg Von Kuster
581c3d9c67
Another patch from Assaf Gordon for the cleanup_datasets.py script.
...
This patch adds messages for the "purge histories" step:
1. A message is printed when processing a new history (so that the user can tell to which history the following dataset/hda messages belong).
2. in "info_only" mode, a message is printed about each deleted history
3. in "info_only" mode, a message is printed for each HDA that is checked
4. The message for HDA is changed to include the associated dataset id.
2011-07-14 15:58:06 -04:00
Greg Von Kuster
8eb0033904
Add patch from Assaf Gordon to the cleanup_datasets.py script. The changes are:
...
1. If a dataset is skipped (because it's shared/cloned and was already process), no message is printed at all.
2. If a dataset can not be deleted because it is shared, and one instance is not marked as "deleted", a proper message is printed.
3. If a dataset has metadata files, the message is changed depending on "info_only" and "remove_from_disk" flags.
4. The final summary message is slightly changed.
2011-07-13 09:39:02 -04:00
Greg Von Kuster
40d02d1e7b
Add patch from Assaf Gordon to fix the cleanup_dataset.py script, correcting the behavior of setting the info_only flag to True when running delete_datasets.sh and purge_datasets.sh.
2011-07-06 09:52:28 -04:00
Greg Von Kuster
b0b5df4e93
Add a purged column to the LibraryDataset table - a LibraryDataset is marked purged when all associated LibraryDatasetDatasetAssociations are marked deleted. Fix the cleanup_datasets.py script to more correclty handle the lifecycle of LibraryDatasets.
2011-02-09 15:42:09 -05:00
Kanwei Li
7736a34123
Add default file_path to cleanup_datasets.py script. Closes #376
2010-10-07 14:15:19 -04:00
Greg Von Kuster
91d97585c1
Fix for cleanup_datasets.py - add app param to the _purge_dataset method signature.
2009-11-14 20:32:41 -05:00
Greg Von Kuster
8f6e8213a0
Fix most of the db flushes to be compatibel with sqlalchemy 05. Add the _monkeypatch_query_method() back into assignmapper due to a single object.get() method in the MetadataCollection class since Metadata has no current hook into mapping.context ( the sqlalchemy session ). There a 4 flushes in metadata,py and 20 flushes in model.__init__.py that still use the _monkeypatch_session_method in assignmapper due to the same issue, but all other flushes are fixed.
2009-11-11 15:59:41 -05:00
Greg Von Kuster
1c4070ea92
Eliminate printing PYTHONPATH to stderr in the cleanup_datasets.py script.
2009-11-04 13:09:37 -05:00
Greg Von Kuster
da149187b4
Bug fix for cleanup_datasets.py - use app.sa_session instead of self.sa_session.
2009-11-02 09:54:18 -05:00
Greg Von Kuster
29b55b8707
Make sqlalchemy queries use sa_session.query( object ) rather than object.query(). This eliminates the need for the _monkeypatch_query_method() in assignmapper.py. Also eliminate the need for the _monkeypatch_session_method() for everything except object.flush() - I just ran out of time and will handle flush() asap. I also eliminated the .all() call on several queries where it was not necessary - should improve performance. I fixed several bugs I found as well.
2009-10-22 23:02:28 -04:00
Greg Von Kuster
18c95bb622
Improve logging for cleanup_datasets.py script.
2009-09-24 21:17:32 -04:00
Greg Von Kuster
947491b270
More improvement in cleanup_datasets script - will take significantly less disk, and may be faster.
2009-09-24 16:52:15 -04:00
Greg Von Kuster
a40bf886f1
Performance improvements in delete_datasets method in cleanup_datasets script ( hopefully enough ).
2009-09-24 12:21:41 -04:00
Nate Coraor
2abf463a95
More fixes for cleanup_datasets.py
2009-09-15 12:57:17 -04:00
Nate Coraor
f11dcd9781
Fix path mangling in cleanup_datasets.py
2009-09-14 12:23:16 -04:00
Greg Von Kuster
5665f1dbaf
Fix for cleanup_datasets.py script.
2009-09-11 11:26:26 -04:00
Daniel Blankenberg
52d1bc065a
Enable the cleanup_datasets script to purge Dataset Instances (HDAs, LDDAs) and mark base datasets as deleted without requiring the container (history, library/folder) to be deleted.
2009-08-10 11:53:28 -04:00
Daniel Blankenberg
f4a7dbc436
Add a new flag -f/--force_retry to cleanup_datasets.py. This flag will cause the script to attempt to perform the requestion action on objects regardless if it has been performed before.
...
This is useful, i.e. if purge_datasets was called with out using --remove_from_disk, but it is later decided to remove these files: the purge_datasets script should be called with both -r and -f.
2009-07-30 12:56:16 -04:00
Greg Von Kuster
0090622f59
Add ability to share histories with multiple users, along with bug fixes and more functional test coverage for history features.
2009-06-05 11:15:25 -04:00
Nate Coraor
9113ceb29f
Fix the cleanup_datasets script
2009-05-28 15:18:49 -04:00