Skip to content

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().

LeMyst added 6 commits April 8, 2021 22:48
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.

LeMyst added 2 commits April 17, 2021 13:45
* 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