Difference between revisions of "Rake tasks"
(→Available mx tasks) |
m (→mx:matrix:load *) |
||
Line 14: | Line 14: | ||
− | === mx:matrix:load | + | === mx:matrix:load === |
Loads a Nexus formatted matrix. In addition to the matrix file a YAML metadata file is required that looks like: | Loads a Nexus formatted matrix. In addition to the matrix file a YAML metadata file is required that looks like: | ||
Line 33: | Line 33: | ||
:generate_otu_with_ds_ref_id: false # needs a valid Ref#id (not tested) | :generate_otu_with_ds_ref_id: false # needs a valid Ref#id (not tested) | ||
</div> | </div> | ||
− | |||
=== mx:clean_author_initials * === | === mx:clean_author_initials * === |
Revision as of 12:28, 31 August 2009
Setting the environment
Some of the most important tasks for an mx developer are those that move data in and out of the database (tasks starting with "mx:db:"). Since RAILS_ENV defaults to 'production' in our current environment.rb, you have to specify if you want to operate on the development database, for example:
rake mx:db:restore_last RAILS_ENV=development
You can see more about a specific task (if there is more to see) with --describe
rake --describe mx:db:restore_last
Available mx tasks
This is in progress, starred tasks are not recently (re)tested.
mx:matrix:load
Loads a Nexus formatted matrix. In addition to the matrix file a YAML metadata file is required that looks like:
Full_file_name_of_matrix.nex: # the name of the file, not indented :data_source_ref_id: 12 # a mx Ref#id, referenced everywhere a ref_id is needed :title: "some title" # the matrix title :data_source_name: "some datasource name" # the datasource tile (essentially the same thing in this case) :notes: "Some note here." # not yet implemented :generate_short_chr_name: true # creates a truncated character name :generate_otu_name_with_ds_id: true # adds the data source ID to the Otu#name :generate_chr_name_with_ds_id: true # adds the data source ID to the Chr#name :match_otu_to_db_using_name: false # attempts to match incoming Otus to Otu#name :match_otu_to_db_using_matrix_name: false # attempts to match incoming Otus to Otu#matrix_name :match_chr_to_db_using_name: false # attempts to match incoming Chrs to Chr#name :generate_chr_with_ds_ref_id: false # needs a valid Ref#id (not tested) :generate_otu_with_ds_ref_id: false # needs a valid Ref#id (not tested)
mx:clean_author_initials *
Removes all characters other than A-...
mx:db:dump_data
Dumps a copy of the database to /dumps.
mx:db:reload
Dump the data, recreate the tables a...
mx:db:restore
Dump the data as a backup, then rest...
mx:db:restore_last
Dumps the current data to /dumps, then restores the data from the (next) youngest dump file (like "2008_07_03_224250.sql") in /dumps.
mx:db:setup*
(not working yet)
mx:fk_schema*
deprecated with upcoming migrations Generate the foreign key statements ...
mx:load_images
Call like: "rake mx:load_images img_...
mx:load_languages
should deprecate with migration, a one-time use Loads the language table. Call like: "rake mx:load_languages f...
mx:matrix:debug
Debug a nexus file against the parser.
mx:matrix:load
Load one or more matrices.
mx:prepare_release
Export a copy of the mx source code ...
mx:setup_directories*
Creates the directories mx uses for ...
mx:update_ref_display_names*
Update all Ref display_name fields.