Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1411 restructure proving pipeline #1427

Merged
merged 27 commits into from
Jul 20, 2015
Merged

Conversation

eugenk
Copy link
Member

@eugenk eugenk commented Jul 17, 2015

This shall fix #1411. The next pull request will change some of this again, but those changes will be very small.

This pull request is based on the branch of #1391 (1134-create_basis_for_many_axiom_selection_methods) instead of staging.

The first new commit in this branch is:
c79944b Add ProofExecution[Worker].

eugenk added 25 commits July 10, 2015 17:05
We need it in several places now.
There will be more subclasses of AxiomSelection each with different
attributes. To avoid creating many NULL values in the database, we use
multiple table inheritance with the gem 'acts_as_relation'.
This gem mimicks actual class inheritance of ruby with the method `acts_as`.

The migration changes the has_and_belongs_to_many association between
Axioms and ProofAttemptConfigurations to be between Axioms and AxiomSelections.
When the ProofAttemptCofiguration only has one proof_attempt, there can
only be a single goal. This can be retrieved through the proof_attempt.
This allows us to run many proofs in parallel and simplifies the Proof
class.
Now that there is only one ProofAttemptConfiguration per ProofAttempt,
we can remove this association. The numbering can be dropped as well.

Next, the loc/id and routes must be adjusted because it is now
associated primarily with the ProofAttempt.
This is not needed anymore because we have a one-to-one relation between
ProofAttemptConfiguration and ProofAttempt.
@tillmo
Copy link
Member

tillmo commented Jul 19, 2015

I got an error for rake data:migrate:

till@mark:~/web2.0/ontohub$ rake db:migrate
Celluloid 0.17.0 is running in BACKPORTED mode. [ http://git.io/vJf3J ]
==  RemoveOntologyFromProofAttemptConfiguration: migrating ====================
-- remove_column(:proof_attempt_configurations, :ontology_id)
   -> 0.0046s
==  RemoveOntologyFromProofAttemptConfiguration: migrated (0.0047s) ===========

==  RemoveNumberAndLocidFromProofAttemptConfiguration: migrating ==============
-- remove_column(:proof_attempt_configurations, :number)
   -> 0.0006s
-- remove_column(:proof_attempt_configurations, :locid)
   -> 0.0005s
==  RemoveNumberAndLocidFromProofAttemptConfiguration: migrated (0.0012s) =====

till@mark:~/web2.0/ontohub$ rake data:migrate
Celluloid 0.17.0 is running in BACKPORTED mode. [ http://git.io/vJf3J ]
==  FixOntologyVersionData: migrating =========================================
==  FixOntologyVersionData: migrated (0.1170s) ================================

==  SetBasepathWhereNil: migrating ============================================
==  SetBasepathWhereNil: migrated (0.0022s) ===================================

==  SetCountFieldsCorrectly: migrating ========================================
==  SetCountFieldsCorrectly: migrated (0.1321s) ===============================

==  MoveToHasAndBelongsToManyForOntologiesTasks: migrating ====================
==  MoveToHasAndBelongsToManyForOntologiesTasks: migrated (0.0123s) ===========

==  MoveToBelongsToForOntologiesFormalityLevels: migrating ====================
==  MoveToBelongsToForOntologiesFormalityLevels: migrated (0.0166s) ===========

==  CreateSlugForExistingLogics: migrating ====================================
==  CreateSlugForExistingLogics: migrated (0.0492s) ===========================

==  UpdateDisplayNameForObo: migrating ========================================
==  UpdateDisplayNameForObo: migrated (0.0091s) ===============================

==  UpdateDisplayTextForOboSentences: migrating ===============================
==  UpdateDisplayTextForOboSentences: migrated (0.0022s) ======================

==  ResetOntologiesPerLogicCounter: migrating =================================
==  ResetOntologiesPerLogicCounter: migrated (0.1463s) ========================

==  AddOmnToOntologyFileExtensions: migrating =================================
==  AddOmnToOntologyFileExtensions: migrated (0.0008s) ========================

==  AssociateProversWithOntologyVersions: migrating ===========================
Errored at OntologyVersion 1
Errored at OntologyVersion 2
Errored at OntologyVersion 3
Errored at OntologyVersion 4
Errored at OntologyVersion 5
Errored at OntologyVersion 6
Errored at OntologyVersion 7
Errored at OntologyVersion 8
Errored at OntologyVersion 9
Errored at OntologyVersion 10
Errored at OntologyVersion 11
Errored at OntologyVersion 12
Errored at OntologyVersion 13
Errored at OntologyVersion 14
Errored at OntologyVersion 15
Errored at OntologyVersion 16
Errored at OntologyVersion 17
==  AssociateProversWithOntologyVersions: migrated (0.1630s) ==================

==  RemoveOntologyFromProofAttemptConfiguration: migrating ====================
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

undefined method `generate_locid' for #<ProofAttemptConfiguration:0x000000063bcaa8>/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activemodel-3.2.22/lib/active_model/attribute_methods.rb:407:in `method_missing'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/attribute_methods.rb:149:in `method_missing'
/home/till/web2.0/ontohub/db/data/20150714110820_remove_ontology_from_proof_attempt_configuration.rb:4:in `block in up'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/relation/batches.rb:21:in `block (2 levels) in find_each'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/relation/batches.rb:21:in `each'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/relation/batches.rb:21:in `block in find_each'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/relation/batches.rb:72:in `find_in_batches'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/relation/batches.rb:20:in `find_each'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/querying.rb:8:in `find_each'
/home/till/web2.0/ontohub/db/data/20150714110820_remove_ontology_from_proof_attempt_configuration.rb:3:in `up'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/migration.rb:410:in `block (2 levels) in migrate'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/migration.rb:410:in `block in migrate'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/connection_adapters/abstract/connection_pool.rb:129:in `with_connection'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/migration.rb:389:in `migrate'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/migration.rb:528:in `migrate'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/migration.rb:720:in `block (2 levels) in migrate'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/migration.rb:775:in `call'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/migration.rb:775:in `block in ddl_transaction'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/transactions.rb:208:in `transaction'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/migration.rb:775:in `ddl_transaction'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/migration.rb:719:in `block in migrate'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/migration.rb:700:in `each'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/migration.rb:700:in `migrate'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/migration.rb:570:in `up'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/migration.rb:551:in `migrate'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/data_migrate-1.2.0/tasks/databases.rake:221:in `block (2 levels) in <top (required)>'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/bin/ruby_executable_hooks:15:in `eval'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/bin/ruby_executable_hooks:15:in `<main>'
NoMethodError: undefined method `generate_locid' for #<ProofAttemptConfiguration:0x000000063bcaa8>
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activemodel-3.2.22/lib/active_model/attribute_methods.rb:407:in `method_missing'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/attribute_methods.rb:149:in `method_missing'
/home/till/web2.0/ontohub/db/data/20150714110820_remove_ontology_from_proof_attempt_configuration.rb:4:in `block in up'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/relation/batches.rb:21:in `block (2 levels) in find_each'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/relation/batches.rb:21:in `each'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/relation/batches.rb:21:in `block in find_each'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/relation/batches.rb:72:in `find_in_batches'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/relation/batches.rb:20:in `find_each'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/querying.rb:8:in `find_each'
/home/till/web2.0/ontohub/db/data/20150714110820_remove_ontology_from_proof_attempt_configuration.rb:3:in `up'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/migration.rb:410:in `block (2 levels) in migrate'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/migration.rb:410:in `block in migrate'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/connection_adapters/abstract/connection_pool.rb:129:in `with_connection'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/migration.rb:389:in `migrate'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/migration.rb:528:in `migrate'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/migration.rb:720:in `block (2 levels) in migrate'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/migration.rb:775:in `call'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/migration.rb:775:in `block in ddl_transaction'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/transactions.rb:208:in `transaction'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/migration.rb:775:in `ddl_transaction'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/migration.rb:719:in `block in migrate'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/migration.rb:700:in `each'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/migration.rb:700:in `migrate'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/migration.rb:570:in `up'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/activerecord-3.2.22/lib/active_record/migration.rb:551:in `migrate'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/gems/data_migrate-1.2.0/tasks/databases.rake:221:in `block (2 levels) in <top (required)>'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/bin/ruby_executable_hooks:15:in `eval'
/home/till/.rvm/gems/ruby-2.1.5@ontohub/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => data:migrate
(See full trace by running task with --trace)
till@mark:~/web2.0/ontohub$ 

@eugenk
Copy link
Member Author

eugenk commented Jul 20, 2015

Those two problems should be solved now.

@tillmo
Copy link
Member

tillmo commented Jul 20, 2015

👍

eugenk added a commit that referenced this pull request Jul 20, 2015
@eugenk eugenk merged commit 2cae2ac into staging Jul 20, 2015
@eugenk eugenk deleted the 1411-restructure_proving_pipeline branch July 20, 2015 12:12
@eugenk eugenk restored the 1411-restructure_proving_pipeline branch July 21, 2015 07:23
@eugenk eugenk deleted the 1411-restructure_proving_pipeline branch July 21, 2015 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Restructure proving pipeline
2 participants