Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unit and integration tests #25

Open
ngeiswei opened this issue Jul 28, 2021 · 5 comments
Open

Add unit and integration tests #25

ngeiswei opened this issue Jul 28, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@ngeiswei
Copy link
Member

As more people are getting involved it is of paramount importance that we add a test suite.

All working examples (such as https://github.com/opencog/rocca/blob/master/examples/chase.py) should probably be turned into tests (not sure if the example code should be reused or copied). And important methods and utils functions associated to the OpencogAgent class should be tested.

It's unclear to me what test framework we want to use. I suppose

https://pypi.org/project/nose/

is an obvious candidate, but other suggestions are welcome.

@ntoxeg
Copy link
Contributor

ntoxeg commented Jul 29, 2021

One note in regards to nose - there is a new, maintained project that is the successor, nose2. I don’t have a personal preference but there is also pytest, which is more popular, so it has more plugins but this might not be relevant.

Another thing is that nbdev can use notebooks as tests - automatically running them to see if they all pass through.

Finally, is there going to be a CI setup? We could just use Github Actions for it, I can figure out a config for it if you want.

@ngeiswei
Copy link
Member Author

Thanks for your input, @ntoxeg.

Yeah, totally up for a CI setup. Most opencog repos are using circleci which, beside the fact that it is very slow, is working quite well. For instance the branch of a given PR can be checked before merging, etc.

@github-actions
Copy link

Detected no activity for this issue in the last 60 days. The issue will be closed in 7 days if no further activity occurs.

@github-actions github-actions bot added the Stale label Sep 28, 2021
@ntoxeg
Copy link
Contributor

ntoxeg commented Sep 28, 2021

Current progress is that #32 adds a CartPole test. I am not sure how to test AtomSpace-interacting code though as it does not return anything useful (as it does its job by manipulating the AtomSpace).

@github-actions github-actions bot removed the Stale label Sep 29, 2021
@github-actions
Copy link

Detected no activity for this issue in the last 60 days. The issue will be closed in 7 days if no further activity occurs.

@github-actions github-actions bot added the Stale label Nov 28, 2021
@ngeiswei ngeiswei added enhancement New feature or request and removed Stale labels Dec 2, 2021
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

No branches or pull requests

2 participants