Comments (6)
Fixed per 97f2b35
from metadome.
Added tests in: 15c768a
from metadome.
When executing the two unit tests at my local machine, I get the following errors:
======================================================================
ERROR: test_three_letter_amino_acid_residue_pyrrolysine (tests.unit.domain.models.entities.test_codon.Test_codon)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/ext/declarative/clsregistry.py", line 281, in __call__
x = eval(self.arg, globals(), self._dict)
File "<string>", line 1, in <module>
NameError: name 'Protein' is not defined
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/app/tests/unit/domain/models/entities/test_codon.py", line 26, in test_three_letter_amino_acid_residue_pyrrolysine
_mappings.append(Mapping(base_pair='T', codon='TAG', codon_base_pair_position=0, amino_acid_residue='U', cDNA_position=1, chromosome_position=1))
File "<string>", line 2, in __init__
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/orm/instrumentation.py", line 347, in _new_state_if_none
state = self._state_constructor(instance, self)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/util/langhelpers.py", line 767, in __get__
obj.__dict__[self.__name__] = result = self.fget(obj)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/orm/instrumentation.py", line 177, in _state_constructor
self.dispatch.first_init(self, self.class_)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/event/attr.py", line 256, in __call__
fn(*args, **kw)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/orm/mapper.py", line 2983, in _event_on_first_init
configure_mappers()
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/orm/mapper.py", line 2873, in configure_mappers
mapper._post_configure_properties()
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/orm/mapper.py", line 1766, in _post_configure_properties
prop.init()
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/orm/interfaces.py", line 184, in init
self.do_init()
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/orm/relationships.py", line 1653, in do_init
self._process_dependent_arguments()
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/orm/relationships.py", line 1710, in _process_dependent_arguments
self.target = self.mapper.mapped_table
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/util/langhelpers.py", line 767, in __get__
obj.__dict__[self.__name__] = result = self.fget(obj)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/orm/relationships.py", line 1626, in mapper
argument = self.argument()
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/ext/declarative/clsregistry.py", line 293, in __call__
(self.prop.parent, self.arg, n.args[0], self.cls)
sqlalchemy.exc.InvalidRequestError: When initializing mapper Mapper|Mapping|mappings, expression 'Protein' failed to locate a name ("name 'Protein' is not defined"). If this is a class name, consider adding this relationship() to the <class 'metadome.domain.models.mapping.Mapping'> class after both dependent classes have been defined.
======================================================================
ERROR: test_three_letter_amino_acid_residue_selenocysteine (tests.unit.domain.models.entities.test_codon.Test_codon)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/src/app/tests/unit/domain/models/entities/test_codon.py", line 15, in test_three_letter_amino_acid_residue_selenocysteine
_mappings.append(Mapping(base_pair='T', codon='TGA', codon_base_pair_position=0, amino_acid_residue='U', cDNA_position=1, chromosome_position=1))
File "<string>", line 2, in __init__
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/orm/instrumentation.py", line 347, in _new_state_if_none
state = self._state_constructor(instance, self)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/util/langhelpers.py", line 767, in __get__
obj.__dict__[self.__name__] = result = self.fget(obj)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/orm/instrumentation.py", line 177, in _state_constructor
self.dispatch.first_init(self, self.class_)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/event/attr.py", line 256, in __call__
fn(*args, **kw)
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/orm/mapper.py", line 2983, in _event_on_first_init
configure_mappers()
File "/usr/local/lib/python3.5/site-packages/sqlalchemy/orm/mapper.py", line 2870, in configure_mappers
raise e
sqlalchemy.exc.InvalidRequestError: One or more mappers failed to initialize - can't proceed with initialization of other mappers. Triggering mapper: 'Mapper|Mapping|mappings'. Original exception was: When initializing mapper Mapper|Mapping|mappings, expression 'Protein' failed to locate a name ("name 'Protein' is not defined"). If this is a class name, consider adding this relationship() to the <class 'metadome.domain.models.mapping.Mapping'> class after both dependent classes have been defined.
@laurensvdwiel Is this due to missing databanks?
Unit tests should not be dependent on databanks. They should run on objects generated in the test.
from metadome.
I have no idea why this is an error, it worked on my test setup. How are you running the tests?
from metadome.
Like this:
./run_tests.sh -t tests/unit/domain/models/entities/test_codon.py
Alias:
docker-compose -f docker-compose.yml -f docker-compose-dev.yml run --no-deps --rm celery nosetests -v -a !disabled --with-coverage --cover-inclusive --cover-package metadome tests/unit/domain/models/entities/test_codon.py
from metadome.
fixed per cc71773
from metadome.
Related Issues (20)
- Visualization idea: Add options for color selection, to allow users to select a color for marking positions
- In the domain overlay, sometimes the number of aligned homologues is undefined HOT 1
- Add ESC as a manner to escape the positional and domain overview overlays HOT 1
- Unsupported browser warning is also shown for newer chrome versions
- Visualization suggestion: different colours for selecting and annotation of ClinVar variants
- Visualization suggestion: Different colours for ClinVar within gene and from Homologue
- Improve gunicorn in docker images HOT 3
- Information improvement: Add number of missense/synonymous information to raw data output
- Downloadable resource HOT 10
- Some genes don't have any transcripts available for selection
- Provide access to the visualization of an ENST* via the dashboard link HOT 1
- Error since newest release: DisabledBackend Attribute error HOT 4
- Additional information: Annotate/Visualize exon regions
- Visualization suggestion: Add amino acid preferences as a heatmap to the meta-domain landscape
- Add hg38 support HOT 1
- Add gene symbol entry for dashboard
- Is project alive? HOT 2
- Change support request subject to a preset in default_settings
- Add reCAPTCHA-like functionality to contact form
- could not connect to server: No route to host HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from metadome.