Coder Social home page Coder Social logo

Object inheritance about capr HOT 3 CLOSED

ohdsi avatar ohdsi commented on July 17, 2024
Object inheritance

from capr.

Comments (3)

mvankessel-EMC avatar mvankessel-EMC commented on July 17, 2024 1

First of all I'd like to state that I'm not too familiar with S4 classes, but I am comfortable with R6.

Looking at the code, the show methods of the following objects are identical:

  1. opAttributeNumeric,
  2. opAttributeInteger,
  3. opAttributeDate.

Could they inherit from an opAttributeSuper class, which implements this method, and any other identical methods?

If similar implementations exist elsewhere in the package I think this would significantly change code duplicity.

These changes are pushed into Pull Request: #64:

Pull Request for issue: #63

opAttribute,- Numeric, Integer and Date now inherit from opAttributeSuper, which contains the show and as.list methods. methods::is() checks have been mildly altered, to accommodate this change.

devtools::check() is passing here. For commit: df23952

from capr.

mdlavallee92 avatar mdlavallee92 commented on July 17, 2024

Hi @mvankessel-EMC thanks for your issue!

Yes this is probably the direction the package should go, I agree. The main focus of the v2.0.x was to overhaul the UI and ensure that the coercion from R to json worked correctly so people could create and generate cohorts. Focusing on that milestone we left decisions like this that you mention as "room for improvement" while we gauge how users engage with the package. We plan to do a v2.1.x release over the summer that works on print statements and fine-tunning the S4 classes. Your suggestion is something we will keep in mind for when we start to role that out.

That being said, feel free to start a PR to add this enhancement into Capr. We would definitely appreciate it! Ow we will get back to it in the summer 😎

from capr.

mdlavallee92 avatar mdlavallee92 commented on July 17, 2024

closed by 2.0.3 release

from capr.

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.