clics / pyclics

python package implementing the CLICS processing workflow
Apache License 2.0
3 stars 0 forks source link

Lang stats #28

Closed tresoldi closed 4 years ago

tresoldi commented 4 years ago

This PR adds code for collecting and writing data related to (a) which languages colexify which pair of concepts and (b) the absolute number of actual and potential colexifications for each language.

It is related to the two requests regarding clics in the last weeks, which we will discuss in a post for the CALC blog. I have kept the code in the same function, which is rather large now; I can move it into a separate function of course. While this could technically be an independent command, it requires the edge processing performed by colexification, so I decided to extend it. Note that the information is not collected if the user does not explicitly request it (by providing output file names).

tresoldi commented 4 years ago

Tests are failing on Travis because of the python >= 3.6 dependency of mock. Should I drop it from .travis.yml?

xrotwang commented 4 years ago

remove mock from setup.py and mock_use_standalone_module from setup.cfg. That should do the trick.

tresoldi commented 4 years ago

@xrotwang , still failing:

pluggy.manager.PluginValidationError: Plugin 'pytest_mock' could not be loaded: (pytest 4.1.0 (/home/travis/virtualenv/python3.5.6/lib/python3.5/site-packages), Requirement.parse('pytest>=5.0'))!
xrotwang commented 4 years ago

Just push up the pytest version: Requirement.parse('pytest>=5.0'))

tresoldi commented 4 years ago

It is now failing under py3.5 because pybtex uses f-strings, and under py3.6 because it needs mock apparently. Should I try to pin versions in setup?

xrotwang commented 4 years ago

I'd pin pybtex as is done here https://github.com/cldf/pycldf/blob/7ea4bc93e5dd6a221379ede387ede585b016277f/setup.py#L31-L32 But removal of mock shouldn't be a problem under py3.6.

xrotwang commented 4 years ago

@tresoldi ah, you can't remove pytest-mock - just mock. mock is the module which is now part of the stdlib, pytest-mock makes this available as fixture in tests.

codecov-io commented 4 years ago

Codecov Report

Merging #28 into master will decrease coverage by 4.39%. The diff coverage is 41.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #28      +/-   ##
==========================================
- Coverage   99.77%   95.38%   -4.40%     
==========================================
  Files          26       26              
  Lines         883      931      +48     
==========================================
+ Hits          881      888       +7     
- Misses          2       43      +41     
Impacted Files Coverage Δ
src/pyclics/commands/colexification.py 58.58% <41.42%> (-41.42%) :arrow_down:

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 8783af2...35e8784. Read the comment docs.