Skip to content

automatically populate namespace with existing tables on creation of dj.schema#188

Merged
dimitri-yatsenko merged 20 commits into
datajoint:masterfrom
fabiansinz:master
Feb 2, 2016
Merged

automatically populate namespace with existing tables on creation of dj.schema#188
dimitri-yatsenko merged 20 commits into
datajoint:masterfrom
fabiansinz:master

Conversation

@fabiansinz

Copy link
Copy Markdown
Contributor

The just instantiating the schema decorator populates the local namespace with class objects for all tables available in the database. So far definition is set to ....

Comment thread datajoint/schema.py Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The table name prefixes should be looked up in the corresponding classes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, good point.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, each UserRelation should return its table name regular expression. This feature will have other uses.

@dimitri-yatsenko

Copy link
Copy Markdown
Member

Is there a good reason why this pull request is not onto the development branch? Let's make all changes in development before merging to master? master will contain the stable version for users.

Comment thread datajoint/user_relations.py Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

grammar

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. That came from the development branch.

Comment thread tests/schema_empty.py Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"schema"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a copy-paste duplicate from schema.py. Fixed it there as well.

Comment thread datajoint/user_relations.py Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add a tag ?P<master> so we can easily extract this part later.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. I thought about that, but then forgot. I added it.

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.

3 participants