Giter Club home page Giter Club logo

Comments (11)

spencerahill avatar spencerahill commented on June 2, 2024

How do you feel about this in light of #61?

from aospy.

spencerkclark avatar spencerkclark commented on June 2, 2024

With regard to potentially closing this issue? Should we wait until we have more coverage, or do you think #61 is good enough for now?

On the bright side, with #61 it shouldn't be too hard to check a lot of these things off the list. I can do my part in adding some more tests on AM2 and idealized model output, but I don't have any AM3, HiRAM, or CMIP5 runs handy. In principle, though, I could just lift some from your object library.

from aospy.

spencerahill avatar spencerahill commented on June 2, 2024

Ya, just wanted to see if this still has merits, which it does. I agree, it would be useful (and low-hanging fruit) to copy the other model objects here, since often in the past a change would break things for one model and not the other.

(Doing these does not obviate the need for more unit testing everywhere, of course.)

from aospy.

spencerkclark avatar spencerkclark commented on June 2, 2024

👍 I'll try and get to this soon.

from aospy.

spencerahill avatar spencerahill commented on June 2, 2024

from aospy.

spencerahill avatar spencerahill commented on June 2, 2024

I think the best way of extending #64 to other models will be to abstractify all of these test methods you've created for AM2 by moving them into a separate class that accepts a generic model object, and then creating classes for each model that inherits from that class and provides the needed model object; the tests will then automatically run for each model. See infinite-diff's tests for something of an example: the TestBwdDiff class inherits from TestFwdDiff and just supplies a different self.method, which the tests then use. (And the latter inherits from a generic class that supplies misc. arrays and other attributes to use as the test data.)

(FYI I'm in the midst of refactoring that package, so that link might not work after the next few days, but the concept is relatively straightforward.)

from aospy.

spencerkclark avatar spencerkclark commented on June 2, 2024

That's a really good idea. I'll do that in my next pull request.

from aospy.

spencerahill avatar spencerahill commented on June 2, 2024

👍 I am starting to get a better feel for OOP and polymorphism...it is really powerful.

from aospy.

spencerahill avatar spencerahill commented on June 2, 2024

So am I correct that after #66 we are all set on this except for CMIP5 (which I need to figure out)?

from aospy.

spencerkclark avatar spencerkclark commented on June 2, 2024

Yes, that's correct, and for what it's worth the CMIP5 tests are implemented (albeit they fail), but perhaps that's a separate issue (cf. spencerahill/aospy-obj-lib#10).

from aospy.

spencerahill avatar spencerahill commented on June 2, 2024

Right. In that case, let's call this done! I'll re-open if, once I get the CMIP5 ones sorted out, these tests don't work.

Thanks for all your work on this!

from aospy.

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.