Commit Graph
19 Commits
Author SHA1 Message Date
Greg Von Kuster c3e009142a merging from central 2008-12-02 10:55:17 -05:00
Greg Von Kuster ffa719a9ab Call set_size() before set_peek() on datasets, changes to set_peek() to not read entire files for some datatypes. 2008-12-02 10:50:54 -05:00
Daniel Blankenberg ec188a33cb Resolve a bunch of merge conflicts. 2008-10-31 11:28:09 -04:00
Daniel Blankenberg 35168f40a5 Fixes for dealing with UnvalidatedValues (i.e. when running workflows) and also when passing None trans to dynamic options. 2008-10-31 11:00:50 -04:00
Nate Coraor dfdbef9d36 Reintroduce roles. Unfinished stuff: setting default user and history
permissions, user-side permissions settings on datasets, viewing
associated datasets under the role page in the admin controler (is this
even necessary?), filtering out roles by type.  I haven't addressed
tests, so the security-related functional tests will fail.  I haven't
looked at history sharing yet either.  Cleanup to remove unused methods
is needed in the admin controller.  And the admin templates are a
bit messy.
2008-10-09 17:05:57 -04:00
Nate Coraor 3802816b69 User interface to permissions, and a bunch of changes to ensure that
both permitted_actions and groups are set appropriately on datasets.
Somewhat tested and mostly working, but needs more testing.

Greg: If a userless session has a history, if that user logs in,
the DefaultHistoryGroupAssociation for the current history as well
as the datasets in that history are supposed to be updated with the
permissions in DefaultUserGroupAssociation, but this isn't happening.
Possibly because the default permissions on userless histories create
datasets in the public group with only the DATASET_ACCESS permission
(or possibly for another reason).  What are the implications of giving
public users DATASET_MANAGE_PERMISSIONS?
2008-08-20 18:11:04 -04:00
Greg Von Kuster 85909a2aad Eliminated Roles and all associated components from dataset security implementation. Additional testing, possible cleanup needed - see TODO comments in code. Committing so Nate can take over... 2008-08-11 09:03:34 -04:00
Daniel Blankenberg c546f50963 Properly set permissions on tools that create new datasets in their post job hooks (this is deprecated). 2008-08-06 15:41:38 -04:00
Daniel Blankenberg 28b89d686f Change database schema to separate Dataset and HistoryDatasetAssociation. This is a significant change, be sure to follow the migration notes exactly.
Make sure to backup your database before updating.


Also fix a long standing bug in the async controller dealing with updating output datasets upon job completion.


Credit for database migration directions go to Greg.

*** This is a significant change, be sure to follow the migration steps below exactly and in order: ***

---------------

0. Stop Galaxy server

---------------

1. Backup database and galaxy_root/database directory

---------------

2. The current validation_error table is not being used, it is left over from Ian's work that was not made functional.  However, if we want to keep it around, we should drop the old version of the table so it will get re-created correctly when the Galaxy server is restarted:

any database - sql command(s):
------------------------------
DROP TABLE validation_error;

---------------

3. Stop server, perform svn update to get latest code, start server to create new history_dataset_association and implicitly_converted_dataset_association tables

---------------

4. Add new columns to dataset table:

postgres sql command(s):
------------------------
ALTER TABLE dataset ADD COLUMN purgable boolean DEFAULT 't';
ALTER TABLE dataset ADD COLUMN external_filename text;
ALTER TABLE dataset ADD COLUMN _extra_files_path text;

mysql sql command(s):
---------------------
ALTER TABLE dataset ADD COLUMN purgable boolean DEFAULT TRUE;
ALTER TABLE dataset ADD COLUMN external_filename text;
ALTER TABLE dataset ADD COLUMN _extra_files_path text;

sqlite sql command(s):
----------------------
ALTER TABLE dataset ADD COLUMN purgable boolean DEFAULT 0;
ALTER TABLE dataset ADD COLUMN external_filename text;
ALTER TABLE dataset ADD COLUMN _extra_files_path text;

---------------

5. Populate new columns:

postgres sql command(s):
------------------------
UPDATE
dataset
SET
external_filename = dataset_filename.filename,
_extra_files_path = dataset_filename.extra_files_path
FROM
dataset_filename
WHERE
dataset.filename_id = dataset_filename.id;

mysql or sqlite sql command(s):
-------------------------------
UPDATE
dataset,
dataset_filename
SET
dataset.external_filename = dataset_filename.filename,
dataset._extra_files_path = dataset_filename.extra_files_path
WHERE
dataset.filename_id = dataset_filename.id;

---------------

6. Populate dataset table with info from dataset_child_association table:

postgres sql command(s):
------------------------
UPDATE
dataset
SET
parent_id = dataset_child_association.parent_dataset_id
FROM
dataset_child_association
WHERE
dataset.id = dataset_child_association.child_dataset_id;

mysql or sqlite sql command(s):
-------------------------------
UPDATE
dataset,
dataset_child_association
SET
dataset.parent_id = dataset_child_association.parent_dataset_id
WHERE
dataset.id = dataset_child_association.child_dataset_id;

---------------

7. Drop dataset_child_association table:

any database - sql command(s):
------------------------------
DROP TABLE dataset_child_association;

---------------

8. Copy parts of the current dataset table to the new history_dataset_association table:

postgres sql command(s):
------------------------
INSERT INTO history_dataset_association
SELECT
id,
history_id,
id AS dataset_id,
create_time,
update_time,
hid,
name,
info,
blurb,
peek,
extension,
metadata,
parent_id,
designation,
deleted,
visible
FROM dataset
ORDER BY id;

mysql or sqlite sql command(s):
-------------------------------
INSERT INTO
history_dataset_association
(
history_id,
dataset_id,
create_time,
update_time,
hid,
name,
info,
blurb,
peek,
extension,
metadata,
parent_id,
designation,
deleted,
visible
)
SELECT
history_id,
id,
create_time,
update_time,
hid,
name,
info,
blurb,
peek,
extension,
metadata,
parent_id,
designation,
deleted,
visible
FROM
dataset
ORDER BY
id;

---------------

9. Update the nextval value of the primary key sequence in the history_dataset_association table

NOTE: THIS IS NOT NECESSARY FOR MYSQL OR SQLITE!

postgres sql command(s):
------------------------
SELECT
setval('history_dataset_association_id_seq', max(id))
FROM
history_dataset_association;

---------------

10. Update dataset table to mark dataset_associated_file dataset as deleted:

postgres sql command(s):
------------------------
UPDATE dataset
SET
deleted = 't'
WHERE
id IN
(SELECT dataset_id FROM dataset_associated_file ORDER BY dataset_id DESC);

mysql or sqlite sql command(s):
-------------------------------
UPDATE dataset
SET
deleted = TRUE
WHERE
id IN
(SELECT dataset_id FROM dataset_associated_file ORDER BY dataset_id DESC);

---------------

11. Drop the dataset_associated_file table:

any database - sql command(s):
------------------------------
DROP TABLE dataset_associated_file;

---------------

12. Alter foreign keys on job_to_input_dataset table:

postgres or sqlite sql command(s):
------------------------
ALTER TABLE
job_to_input_dataset
DROP CONSTRAINT
job_to_input_dataset_dataset_id_fkey;

ALTER TABLE
job_to_input_dataset
ADD CONSTRAINT job_to_input_dataset_dataset_id_fkey
FOREIGN KEY
(dataset_id)
REFERENCES
history_dataset_association(id);


mysql sql command(s):
-------------------------------
ALTER TABLE
job_to_input_dataset
DROP FOREIGN KEY
ix_job_to_input_dataset_dataset_id;

ALTER TABLE
job_to_input_dataset
ADD FOREIGN KEY
ix_job_to_input_dataset_dataset_id (dataset_id)
REFERENCES
history_dataset_association(id);

---------------

13. Alter foreign keys on job_to_output_dataset table:

postgres or sqlite sql command(s):
------------------------
ALTER TABLE
job_to_output_dataset
DROP CONSTRAINT
job_to_output_dataset_dataset_id_fkey;

ALTER TABLE
job_to_output_dataset
ADD CONSTRAINT
job_to_output_dataset_dataset_id_fkey
FOREIGN KEY (dataset_id)
REFERENCES history_dataset_association(id);

mysql sql command(s):
-------------------------------
ALTER TABLE
job_to_output_dataset
DROP FOREIGN KEY
ix_job_to_output_dataset_dataset_id;

ALTER TABLE
job_to_output_dataset
ADD FOREIGN KEY
ix_job_to_output_dataset_dataset_id
FOREIGN KEY (dataset_id)
REFERENCES history_dataset_association(id);

---------------

14. Eliminate columns from the dataset table previously copied to history_dataset_association:

any database - sql command(s):
------------------------------
ALTER TABLE dataset DROP COLUMN hid;
ALTER TABLE dataset DROP COLUMN history_id;
ALTER TABLE dataset DROP COLUMN name;
ALTER TABLE dataset DROP COLUMN info;
ALTER TABLE dataset DROP COLUMN blurb;
ALTER TABLE dataset DROP COLUMN peek;
ALTER TABLE dataset DROP COLUMN extension;
ALTER TABLE dataset DROP COLUMN dbkey;
ALTER TABLE dataset DROP COLUMN metadata;
ALTER TABLE dataset DROP COLUMN parent_id;
ALTER TABLE dataset DROP COLUMN designation;
ALTER TABLE dataset DROP COLUMN visible;
ALTER TABLE dataset DROP COLUMN filename_id;
2008-07-09 17:41:08 +00:00
Greg Von Kuster 709d2e1292 Fix for get_microbial_data tool. 2008-03-26 20:55:18 +00:00
Greg Von Kuster 749f218f08 Changed GALAXY_DATA_INDEX_DIR from an environment variable to a config entry. 2008-03-25 14:09:27 +00:00
Greg Von Kuster cd52cabd48 Eliminated hard-codes paths to locally cached data from tools, requires developers to add softlinks to development environments.
Galaxy developers should execute the following commands in their $UNIVERSE_HOME/tool-data directories:

ln -s /depot/data2/galaxy/alignseq.loc alignseq.loc
ln -s /depot/data2/galaxy/binned_scores.loc binned_scores.loc
ln -s /depot/data2/galaxy/blastdb.loc blastdb.loc
ln -s /depot/data2/galaxy/encode_datasets.loc encode_datasets.loc
ln -s /depot/data2/galaxy/liftOver.loc liftOver.loc
ln -s /depot/data2/galaxy/maf_index.loc maf_index.loc
ln -s /depot/data2/galaxy/maf_pairwise.loc maf_pairwise.loc
ln -s /depot/data2/galaxy/microbes/microbial_data.loc microbial_data.loc
ln -s /depot/data2/galaxy/phastOdds.loc phastOdds.loc
ln -s /depot/data2/galaxy/quality_scores.loc quality_scores.loc
ln -s /depot/data2/galaxy/regions.loc regions.loc
ln -s /depot/data2/galaxy/twobit.loc twobit.loc
2008-03-21 18:31:39 +00:00
Greg Von Kuster 6d80665988 Added file_size column to dataset table, requires db schema alteration:
alter table dataset add column file_size numeric(15,0)
Also added new script update_dataset_size.py
2008-01-08 16:19:25 +00:00
Greg Von Kuster 79745f4012 Modified all tools to use the new <options> tag for dynamic select lists. Completely eliminated the <select_options> tag approach. With the exception of find_clusters_mysql, the old dynamic_options approach is not being used by any tool, although dynamic_options is still supported in parameters.py. 2007-11-29 17:04:42 +00:00
Greg Von Kuster 300d66fb11 Modified tools using the <select_options> tag approach for dynamic options to use the new <select> tag approach. I modified the microbial import tool to use the older <select_options> approach last week and will modify it to use the new <select> approach next week. A few tools still use the oldest dynamic_options attribute approach, but modifying them to use the new <select> tag will be trivial. I'll do this when I return. 2007-11-21 18:48:37 +00:00
Daniel Blankenberg 4cbfce361b Add the ability to define datatypes in the configuration file.
Datatypes are defined like:
[galaxy:datatypes]
bed = galaxy.datatypes.interval:Bed
png = galaxy.datatypes.images:Image,image/png

where the mime-type (default of text/plain) can be declared after the class name, as is seen with png.
2007-06-01 19:25:19 +00:00
Ian Schenck 7b5aa376e9 Fix for microbial data. get_html_param_map wasn't able to pass the context of the inputs into the page, which was crashing things. 2007-05-24 18:36:28 +00:00
Daniel Blankenberg 8554c031ed Push Microbial datasource changes onto trunk. 2007-01-10 15:23:30 +00:00
James Taylor f788a34fca Moving james-wsgi branch to new trunk. 2006-11-15 16:28:21 +00:00