Giter VIP home page Giter VIP logo

Comments (11)

julienmalard avatar julienmalard commented on June 12, 2024 1

Hello,

No, I wouldn't consider it to be blocking at all; it's just a suggestion. Actually, I find the main advantage is that it allows for non-incremental testing (all tests run, even if some have failed).

I'll wrap up my review soon.

from taweret.

julienmalard avatar julienmalard commented on June 12, 2024

I see that most of the original comment is now resolved. I would recommend refactoring the tests to use a UnitTest object-oriented framework. Have you considered setting up CodeCov or similar to track code coverage of tests?

from taweret.

ominusliticus avatar ominusliticus commented on June 12, 2024

Is there a reason to use the OO framework over what we have now? We have not considered any code coverage, but will now look into it, thank you for the suggestion.

from taweret.

julienmalard avatar julienmalard commented on June 12, 2024

The main advantages of the OO framework are that (1) test runs are named in the test output, and (2) all tests run and errors are only reported at the end, so any errors along the way are clearly documented and don't stop other tests from running.
For example, see passing tests here: https://github.com/julienmalard/traDSSAT/actions/runs/8135344210/job/22229734167
Since they pass, there isn't that much output, but if any failed the output would be much more detailed. In addition, many IDEs such as PyCharm format the test output by subtest in the test runner console if they're written as OO tests.

from taweret.

ominusliticus avatar ominusliticus commented on June 12, 2024

So I looked into the pytesting framework, particular for OO, and here they advocate for it as a way of incrementally (i.e., only continuing to test if previous steps succeeded) testing your package, otherwise all the examples they give are primarily function based. At least in terms of success reporting, our reports look the same (comparing the workflow you sent us, with what we currently have). From the pytest documentation, I do see the difference you mention about each test being named.

Our question: Is the suggestion of moving towards an OO framework a blocking suggestion?
We will definitely add CodeCov (still need to look into this).

from taweret.

julienmalard avatar julienmalard commented on June 12, 2024

A minor point on code coverage - it seems to be currently set up to measure the coverage of the test files, and not of the package files themselves (which may explain the near-100% coverage).

from taweret.

ominusliticus avatar ominusliticus commented on June 12, 2024

I tried to google an example of code coverage testing a full repository, but haven't been able to. Could you point me to an example so that I may understand?

from taweret.

julienmalard avatar julienmalard commented on June 12, 2024

Hello,
Here's an example: https://github.com/reseau-constellation/client-python

As can be seen here, the source files are also included in the coverage report.

from taweret.

ominusliticus avatar ominusliticus commented on June 12, 2024

@julienmalard
Sorry for the delay, we have implemented the code coverage for the whole package

from taweret.

ominusliticus avatar ominusliticus commented on June 12, 2024

@julienmalard is it okay to close this issue?

from taweret.

julienmalard avatar julienmalard commented on June 12, 2024

Yes, looks good!

from taweret.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.