GithubHelp home page GithubHelp logo

Categorising UCD status about ucidy HOT 8 CLOSED

gmantele avatar gmantele commented on June 21, 2024
Categorising UCD status

from ucidy.

Comments (8)

gmantele avatar gmantele commented on June 21, 2024

I think, the confusion here comes from whether the present or past tense is used. Personally I use the past tense, hence: a deprecedated word is no more valid because of its deprecated status. Though, it was a recommended word, in the last supported version of UCDList-x.y.

I may be wrong. It is true that a deprecated word is an old IVOA recommended world and is grammatically valid and recognised (so I should probably fix this last point). But I am not sure it is still a recommended word....it is actually recommended to not use it anymore.

What makes more sense according to you?

Anyway, I am confused by your interpretation of ! pucd.isAllRecommended(). If you define and use your own UCD words (so, not IVOA official words), they are flagged as not recommended, but that does not mean they are deprecated.

from ucidy.

mbtaylor avatar mbtaylor commented on June 21, 2024

You are right that my pucd.isAllRecommended() is wrong, I was trying to come up with something that would report deprecated words, but doing it badly.

I agree that deprecated words should not be recommended.

I was mostly confused by deprecated words not being recognised. If that gets resolved, then I can identify deprecated as (recognised && !recommended) - do you agree? - and do everything that I want. (In the mean time I'm checking for the string "DEPRECATED" in the error message, which seems to do the trick, so this fix is not urgent for me).

from ucidy.

gmantele avatar gmantele commented on June 21, 2024

I can identify deprecated as (recognised && !recommended) - do you agree?

No, sorry :-( For a UCD word officially defined by the IVOA (UCDList-x.y), this condition is enough. However, it is possible to define its own custom UCD words. So, a custom UCD word is recognised but not recommended (by the IVOA). It does not make it necessarily a deprecated word.

Actually, for what you want to achieve, I think you need a new function: something like UCD.containsDeprecated() or UCD.listDeprecated(). Any of these can anyway easily be reproduced as you have the list of UCDWords (cf UCD.iterator()). From this, you can inspect each UCDWord and know if one is deprecated or not (UCDWord.isDeprecated()). If you want, I can add either containsDeprecated() or listDeprecated() (or both).

from ucidy.

gmantele avatar gmantele commented on June 21, 2024

In the mean time I'm checking for the string "DEPRECATED" in the error message, which seems to do the trick, so this fix is not urgent for me

This DEPRECATED message comes actually from the detection of a UCDWord.isDeprecated() item in a UCD instance.

from ucidy.

mbtaylor avatar mbtaylor commented on June 21, 2024

Got it. Using UCDWord.isDeprecated() is fine for me, I was looking in the wrong place for this functionality (the UCD instead of the UCDWord). Thank you!

from ucidy.

gmantele avatar gmantele commented on June 21, 2024

Ok :)

Having a containsDeprecated() or listDeprecated() in UCD, would it be also interesting?

from ucidy.

mbtaylor avatar mbtaylor commented on June 21, 2024

It would fit in with the other UCD-level methods isAllRecommended, isAllValid etc; but I've written the code to work with the UCDWord-level method now, so I probably won't use them.

from ucidy.

gmantele avatar gmantele commented on June 21, 2024

FYI, I just added the followings functions in UCD:

  • containsDeprecated()
  • countDeprecated()
  • getDeprecated()

from ucidy.

Related Issues (8)

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.