Coder Social home page Coder Social logo

Comments (13)

eteq avatar eteq commented on July 17, 2024

👍 , although I'm uncertain how best to do this given that the canonical version number is stored in the configure.ac file instead of in the source code... If necessary it could just be another step to add to the "RELEASE" instructions (making sure they are consistent), but I would like to automate it if feasible...

from erfa.

sergiopasra avatar sergiopasra commented on July 17, 2024

This is not difficult, a few lines of code. The problem is to convince `erfa-fetch' to include the new function in erfa.h

from erfa.

sergiopasra avatar sergiopasra commented on July 17, 2024

This is just a proof of concept, the name of the function can be different, etc

from erfa.

mhvk avatar mhvk commented on July 17, 2024

That looks good! Just to make sure I understand: with your changes in #42, the only thing that will get overridden in the current release procedures is your addition to erfa.h, correct? One can let erfa-fetch deal with that, but I feel this is a bit odd, since, at least as written, erfa-fetch does not know anything about erfa versions. Another way to correct the version stuff may be to add something to bootstrap.sh that checks whether or not erfa_version already is in erfa.h, and adds it if not. If we go that route, we might as well do the changes of version number in configure.ac and README.rst as well... Or, from bootstrap.sh, call a specific script that does the above.

@eteq - since you usually do the release, what do you think? What would make life easier?

from erfa.

mhvk avatar mhvk commented on July 17, 2024

Thinking about it a bit more, it might be useful as well to expose the sofa version on which the erfa version is based as well.

from erfa.

sergiopasra avatar sergiopasra commented on July 17, 2024

We would only need to make erfa-fetch add the definitions of our erfa custom functions into erfa.h. The actual code would in erfaversion.c would stay here in the repository

from erfa.

sergiopasra avatar sergiopasra commented on July 17, 2024

For the SOFA version, we could make erfa-fetch add a macro (in erfam.h, perhaps?) with the SOFA version and then expose it with another function

from erfa.

mhvk avatar mhvk commented on July 17, 2024

@sergiopasra - both sound good; that keeps the version stuff together.

from erfa.

eteq avatar eteq commented on July 17, 2024

Hmm, is it possible for the sofa version macro to get at the same places the erfa versions do (configure.ac)? Or is it bit possible to get the custom variables not through to config.h?

Just trying to limit the number of places that require manual updates...

As you the need to update erfa.h each time, that did worry me. I always examine the diff so I'd probably notice the removal, but it would be better to have it baked into erfa_fetch. Not sure the best way to do that generally so that we don't have to keep the two in sync... But maybe we just do this one by hand because it'll probably be the only one like this?

from erfa.

sergiopasra avatar sergiopasra commented on July 17, 2024

@eteq Yes, I can add a macro in configure so that SOFA_VERSION is set there. It has to be updated manually then.

As an alternative to the erfa.h update, we can include all our extra definitions in a new header, say erfaextra.h, and include it in erfa.h. This way we isolate all possible future changes in one file under our control. erfa-fetch would only need to add a #include erfaextra.h after processing all the definitions in sofa.h and before the license text.

from erfa.

mhvk avatar mhvk commented on July 17, 2024

I like the erfaextra.h idea!

from erfa.

eteq avatar eteq commented on July 17, 2024

I also like erfaextra.h, @sergiopasra - sounds much easier to maintain!

from erfa.

eteq avatar eteq commented on July 17, 2024

Done in #42 !

from erfa.

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.