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

Provide grid version information to modules, alter API for 1.0 #1

Open
Sei-Lisa opened this issue Apr 18, 2020 · 0 comments
Open

Provide grid version information to modules, alter API for 1.0 #1

Sei-Lisa opened this issue Apr 18, 2020 · 0 comments

Comments

@Sei-Lisa
Copy link
Owner

Imported from Google Code #6:

What it doesn't do (yet) is change the API to pass that information [grid version information] down to the output modules. My idea in that respect is to pass the whole 'document' structure instead of its individual parts as separate parameters. So, the modules will be responsible for separating the document components themselves: document[0] will be the keywords, document[1] the default descriptions, document[2] the database version, and document[3] the grid versions. If something gets added to the database in future, it will go to document[4] and so on, hopefully maintaining backwards compatibility that way.

Also, to allow for possible future additions to the parameters, a variadic form of the output module arguments can be implemented. Each output module function header would then look like this:

def output(document, *args):

That will hopefully allow for any future extensions, keeping backwards compatibility.

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

No branches or pull requests

1 participant