-
Notifications
You must be signed in to change notification settings - Fork 14
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
⚡Rewrite WikibaseIntegrator #152
Conversation
@LeMyst could you please briefly state what the motivation for the rewrite is? |
Hello @kwisatz , thank you for your interest in my project. My main issue with the current code is the difficulty to add new functions to the current core, like Lexeme or MediaInfo (#174). Adding the lexeme to the library were the starting point of this rewrite. I'm not happy with the current code of the rewrite, there is a lot of questions that need to be answered, like default config values, partial update or the fastrun rewrite_write() function. I'll continue to update and accept PR to ranch v0.11 even after the release of v.12+ (if the rewrite is merged). I hope to have answered your question. Best Regards, Myst~ |
Is this in a working alpha state now, so I can test it out? :) |
The code is working on the git repository but I've currently a blocking issue with the code on my computer (and to much changes to easily find the issue). |
I broke v0.12 |
I'll hold off a little then. |
wikibaseintegrator/entities/item.py
Outdated
matches = pattern.match(entity_id) | ||
|
||
if not matches: | ||
raise ValueError("Invalid item ID ({}), format must be 'Q[0-9]+'".format(entity_id)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice that you state the value it hiccuped on :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The user can now use 42, '42' and 'Q42' as item id.
Co-Authored-By: Peter Grond <1938132+pgrond@users.noreply.github.com>
Co-Authored-By: Dennis Priskorn <dennis@priskorn.se>
Co-Authored-By: Dennis Priskorn <dennis@priskorn.se>
Fix #343 Co-Authored-By: Dennis Priskorn <dennis@priskorn.se>
* Replace `APPEND` by `APPEND_OR_REPLACE` * Replace `REPLACE` by `REPLACE_ALL` Co-Authored-By: Peter Grond <1938132+pgrond@users.noreply.github.com>
Add folder to .gitignore
* Reintroduce getting the conflicting entity id and the language and test everything. wbi_exceptions.py: MWApiError: New attributes code, info, messages, messages_names. get_conflicting_entity_id(), get_language(): New methods. test_wbi_exceptions.py: Add TestCase class TestWbiExceptions and move the existing functions into it. TestWbiExceptions: test_modification_failed(), test_failed_save(): Add 2 assertions for the new properties. test_modification_failed_no_dict(), test_modification_failed_no_message(), test_modification_failed_no_parameters(): New tests * Handle DataValueCorrupt which are missing info key and other information. wbi_exceptions.py: MWApiError: get_conflicting_entity_id(), get_language(): Add logic to raise new exception if the information is missing. DataValueCorrupt: New exception. * wbi_exceptions.py: MWApiError: get_conflicting_entity_id(), get_language(): Raise IndexError with the whole error dict. * wbi_exceptions.py: MWApiError: get_language(): Raise NonExistentEntityError if not found. * Optimize properties to return list instead of str Optimize get_conflicting_entity_id and get_language from wbi_exceptions to return a List of str or None * Update wbi_exceptions.py Remove unused attribute * Update wikibaseintegrator/wbi_exceptions.py Co-authored-by: Christian Clauss <cclauss@me.com> * Replace "return None" to empty List * Unused Exception Removed for the time being. * Use plural form Co-Authored-By: Christian Clauss <cclauss@me.com> Co-authored-by: Myst <1592048+LeMyst@users.noreply.github.com> Co-authored-by: Christian Clauss <cclauss@me.com>
Woohoo 🎉 Congratulations! |
Thank you! |
Will break compatibility 🤷
TODO
Rewrite FastRunContainer