apertium / apertium-python

now you can even use apertium from python
GNU General Public License v3.0
31 stars 27 forks source link

Set up CI to make sure it works on Windows #85

Closed ftyers closed 3 years ago

sushain97 commented 4 years ago

We have windows CI already: https://ci.appveyor.com/project/sushain97/apertium-python/builds/35271599

sushain97 commented 4 years ago

(it's existed since this repo was first created)

ftyers commented 4 years ago

Hmm, but it doesn't test that modules work ? From IRC earlier:

20:26 <garbinzle[m]> this is the wrapper I used: https://github.com/apertium/apertium-python/blob/master/README.md
20:26 <garbinzle[m]> apertium.installer.install_module('eng')
20:26 <garbinzle[m]> to install ces I did: apertium.installer.install_module('ces')
20:27 <garbinzle[m]> and then when I called in my jupyter notebook:
20:27 <garbinzle[m]> tagger = apertium.Tagger('ces')
20:27 <garbinzle[m]> tagger.tag('jablko')
20:27 <garbinzle[m]> I get an error message saying that the module is not installed
sushain97 commented 4 years ago

It does.

This just sounds like a bug! Would need more information to see what went wrong.

sushain97 commented 4 years ago

Hmm maybe it's related to some of the skipped tests on windows here: https://github.com/apertium/apertium-python/blob/master/tests/__init__.py#L127-L147

TinoDidriksen commented 4 years ago

Some binaries are available: https://apertium.projectjj.com/win32/nightly/ file apertium-all-dev.7z or .zip I still haven't gotten around to cross-building a few of the tools for Windows because WSL has served so nicely, but I can set up the last ones.

ftyers commented 4 years ago

It's more the language packages it seems?

TinoDidriksen commented 4 years ago

Languages are all available, listed in https://apertium.projectjj.com/pkgs.php - the .deb files can be extracted with 7-zip or ar + tar -Jx

ftyers commented 4 years ago

Can it be done by novice users? Wouldn't it be better to have a less onerous method to use this?

TinoDidriksen commented 4 years ago

The native and Java frontends do it for users. The Python frontend can also do the same.

singh-lokendra commented 4 years ago

There is a bug in existing python installer. The taggers and other variables aren't updated upon installation of new modules https://github.com/apertium/apertium-python/blob/master/apertium/__init__.py#L82.

However launching a new interpreter should fix this issue.

I'll create a PR to remove this bug