scribe-org / Scribe-Data

Wikidata, Wiktionary and Wikipedia language data extraction
GNU General Public License v3.0
30 stars 69 forks source link

Add test for CLI tool #170

Closed mhmohona closed 2 months ago

mhmohona commented 4 months ago

Contributor checklist


Description

image

Related issue

github-actions[bot] commented 4 months ago

Thank you for the pull request!

The Scribe team will do our best to address your contribution as soon as we can. The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)

If you're not already a member of our public Matrix community, please consider joining! We'd suggest using Element as your Matrix client, and definitely join the General and Data rooms once you're in. Also consider joining our bi-weekly Saturday dev syncs. It'd be great to have you!

Maintainer checklist

wkyoshida commented 4 months ago

Hey, @mhmohona! :wave:

I noticed the tests appear to be failing when running in the CI. Did notice also though that the screenshot in the PR description shows the tests do run OK when pytest is ran within src/scribe_data/cli. Does running pytest in the root of the project still run OK too?

mhmohona commented 4 months ago

Hey, @mhmohona! 👋

I noticed the tests appear to be failing when running in the CI. Did notice also though that the screenshot in the PR description shows the tests do run OK when pytest is ran within src/scribe_data/cli. Does running pytest in the root of the project still run OK too?

Thank you @wkyoshida for looking into this. The thing is this tests passes when everything is in one place. I mean all the files, total.py, list.py, query.py is in one branch, then these tests works without any error. Both unittest and Pytest passes. I tried it locally and it passes as you can see in screenshot.

andrewtavis commented 3 months ago

Ok so the tests are passing, but then a question I have is when are the tests that we have written here ran? Is it possible to move the tests for the CLI into the Scribe-Data/tests directory such that they're ran as a part of the pytest suite?

andrewtavis commented 3 months ago

Would you be able to make this change, @mhmohona? Let us know if you have any questions!

mhmohona commented 3 months ago

Ok so the tests are passing, but then a question I have is when are the tests that we have written here ran? Is it possible to move the tests for the CLI into the Scribe-Data/tests directory such that they're ran as a part of the pytest suite?

I will work on it.

andrewtavis commented 2 months ago

@mhmohona, just updated both your branches as there have been tons of changes recently. Let us know if there's anything we can do to support with these!

mhmohona commented 2 months ago

@andrewtavis @wkyoshida this PR is up for review now.