weso / hercules-sync

Tools to synchronise data between the ontology files and Wikibase instance for the Hercules project at University of Murcia.
GNU General Public License v3.0
4 stars 1 forks source link

Refactor synchronization logic. #71

Closed alejgh closed 4 years ago

alejgh commented 4 years ago

We have moved most of the synchronisation logic from this repository to wikibase-sync. From now on, this repository will consist of the particular aspects of synchronization of GitHub repositories to a Wikibase instance. This includes:

All of the code regarding the synchronization logic given two RDF strings to a Wikibase is now handled in wikibase-sync.

The only mature change that was needed for this refactor was the modification of the OntologySynchronizer class to handle the source and target contents to be synchronised separately instead of receiving an instance of the GitFile class. To sum up, we decoupled the synchronization logic from the use of Git for this refactor, and now any string from any source can be given instead.

It is expected to have a decrease of code coverage as a consequence of this change, since most of the test cases were targeted at the business logic of the synchronization itself and not at the web service. Due to that, I think it is fair to make an exception in this pull request regarding a decrease of code coverage. However, coverage should still remain at least greater than 90%.

codecov[bot] commented 4 years ago

Codecov Report

Merging #71 into master will decrease coverage by 2.34%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #71      +/-   ##
==========================================
- Coverage   98.30%   95.96%   -2.33%     
==========================================
  Files          15        3      -12     
  Lines         762      198     -564     
==========================================
- Hits          749      190     -559     
+ Misses         13        8       -5     
Impacted Files Coverage Δ
hercules_sync/listener.py 91.49% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update dcd3149...4a82abd. Read the comment docs.