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

Change and remove FunctionsEngine functions #129

Merged
merged 27 commits into from May 9, 2021

Conversation

LeMyst
Copy link
Owner

@LeMyst LeMyst commented Apr 8, 2021

  • Add Exception if format is set to something else than json when using FunctionsEngine.mediawiki_api_call().
  • Add Python 3.10 CI workflow.
  • Remove pandas as a dependency.

BREAKING CHANGES

  • Replace wbi_core.FunctionsEngine by wbi_functions.
  • Remove FunctionsEngine.get_linked_by() and FunctionsEngine.delete_item(). WikibaseIntegrator will only support wikibase-oriented functions. Directly use wbi_functions.mediawiki_api_call_helper instead.
  • Rename FunctionsEngine.delete_statement() to wbi_functions.remove_claims().
    • revision parameter in now optional.
    • Add summary parameter.
    • Change parameter order.
  • Rename FunctionsEngine.get_search_results() to wbi_functions.search_entities().
  • Remove dataframe support in wbi_functions.execute_sparql_query, use sparqldataframe package instead.
  • Move format force to json to wbi_functions.mediawiki_api_call().

BREAKING CHANGES
Change parameters order
revision is now optional
Add summary parameter
BREAKING CHANGE
Change parameter order
reason is now optional
Move format force to json to mediawiki_api_call()
Add Exception if format is not json
Remove FunctionsEngine.get_linked_by() and FunctionsEngine.delete_item()
WikibaseIntegrator will only support wikibase-oriented functions.
Move _sparql_query_result_to_df() to the end of FunctionsEngine
@LeMyst
Copy link
Owner Author

LeMyst commented Apr 11, 2021

@dpriskorn What do you think about these changes? I remove some API calls who are not wikibase related.

@LeMyst LeMyst changed the title Fix FunctionsEngine functions Change and remove FunctionsEngine functions Apr 15, 2021
@dpriskorn
Copy link
Contributor

@dpriskorn What do you think about these changes? I remove some API calls who are not wikibase related.

I never used any of them. For the sparql->dataframe I see it as something not belonging in WBI. I recently started using https://github.com/njanakiev/sparqldataframe which works perfect.

* Rename delete_statements to remove_claims
* Rename get_search_results to search_entities
@LeMyst
Copy link
Owner Author

LeMyst commented Apr 17, 2021

@dpriskorn What do you think about these changes? I remove some API calls who are not wikibase related.

I never used any of them. For the sparql->dataframe I see it as something not belonging in WBI. I recently started using https://github.com/njanakiev/sparqldataframe which works perfect.

sparqldataframe seems to do the same as execute_sparql_query(query, as_dataframe=True)

Use sparqldataframe instead
@LeMyst
Copy link
Owner Author

LeMyst commented Apr 17, 2021

I removed dataframe support in WikibaseIntegrator.
It was only used in one function and like you said, sparqldataframe do the job.

@LeMyst
Copy link
Owner Author

LeMyst commented Apr 21, 2021

Issue with pytest for Python 3.10 check :
https://bugs.python.org/issue43798
Fixed in
pytest-dev/pytest#8540

@LeMyst LeMyst added the enhancement New feature or request label Apr 23, 2021
@LeMyst LeMyst self-assigned this Apr 23, 2021
@LeMyst LeMyst merged commit c2c77ad into master May 9, 2021
@LeMyst LeMyst deleted the fix-functionsengine-functions branch May 9, 2021 20:26
@dpriskorn
Copy link
Contributor

Very nice 😃 Congratulations!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mediawiki_api_call_helper example results in an error
2 participants