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

Import of corpus module should involve testing for completeness #13

Closed
gkunter opened this issue May 6, 2015 · 2 comments
Closed

Import of corpus module should involve testing for completeness #13

gkunter opened this issue May 6, 2015 · 2 comments

Comments

@gkunter
Copy link
Owner

gkunter commented May 6, 2015

Originally reported by: gkunter (Bitbucket: gkunter, GitHub: gkunter)


ISSUE:
Currently, corpus modules are imported in Session.init() without any testing. In particular, there is no test whether the corpus Resource class provides all fields required to do the requested query. Such testing only takes place in some of the sql_string_xxx functions, so the script may, for instance, abort after the query during output.

SOLUTION:
First of all, a clear catalogue of what is required for a resource description is needed (see also Issue #11). Once that is established, BaseResource should implement a method validate() that is called in Session.init() after Corpus is initialized. This method should abort with an instructive error message if any required variable is missing.


@gkunter
Copy link
Owner Author

gkunter commented Jun 4, 2015

Original comment by gkunter (Bitbucket: gkunter, GitHub: gkunter):


Now that the corpus modules are created by corpusbuilder.py and derived classes, this issue is less relevant. Essentially, it is the task of the installer to ensure that the table description is complete.

@gkunter
Copy link
Owner Author

gkunter commented Dec 9, 2015

Original comment by gkunter (Bitbucket: gkunter, GitHub: gkunter):


Corpus installers and corpus modules are now validated by Coquery before they are executed. This validation reduces the chance of security risks, and ensures that at least the required classes are present.

It is still possible, however, that a corpus installer produces faulty corpus modules. This problem is delegated to the corpus installer maintainers, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant