Coder Social home page Coder Social logo

erfa-fetch's People

Contributors

astrofrog avatar eteq avatar gastineau avatar mhvk avatar perrygreenfield avatar sergiopasra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

erfa-fetch's Issues

Update copyright date

In sofa_deriver.py

Copyright (C) 2013, NumFOCUS Foundation

should be updated to

Copyright (C) 2013-2014, NumFOCUS Foundation

Is that correct?

make sure all the "SOFA" references are gone

Apparently this isn't currently catching all the appearences of "SOFA" right now - need to fix that. Probably a tool at the end which looks through all the files for "iau" and "sofa" should run to be 100% sure.

remove the "Status:xxx" markers from function documentation?

There was a suggestion by the SOFA board that we may not want the function markers that say things like "Status: canonical model", given that it's "canonical" in the sense that SOFA and the IAU have endored it, and we don't have the official authority to call it "canonical".

The most straightforward solution is to just remove the status markers entirely. That seems fine to me because right now they all seem to be advisory (they are all things like "status: support function" rather than "status: broken" or something like that which the user cares about).

Make numfocus the license holders

We've received permission from the numfocus foundation to use them as the copyright holders. So we should update the license to use them as the organization.

move copyright/description of SOFA heritage to postamble

Right now some of the copyright/license/heritage discussion is in the preamble to the functions and some of it is at the end. A SOFA board member suggested we put it all at the end, with just a one-line reference in the function.

In an email thread it was suggested that it's good to put some of this material in the preamble because that makes it marginally more difficult to copy the function and forget the license (because usually you won't forget to include the documentation, but you might leave out the license at the end.)

source-flattener omitting closing brace of extern "C" {... directive

The source-flattener.py script is omitting the closing brace of the extern "C" { directive. The directive then encloses any C++ source code where the flattened erfa.h is included and breaks compilation.

The end of the flattened erfa.h should look like the following:

...
void eraS2xpv(double s1, double s2, double pv[2][3], double spv[2][3]);
void eraSxp(double s, double p[3], double sp[3]);
void eraSxpv(double s, double pv[2][3], double spv[2][3]);

#ifdef __cplusplus
}
#endif

#endif

Output of source_flattener.py does not compile

Running source_flattener.py on the latest erfa release (2.0.0) creates the following errors when attempting to compile the result (this is with Apple clang 12.0 on OSX 10.15):

gcc -c -pedantic -Wall -O3 -g -fPIC -I. erfa.c -o erfa.o
In file included from erfa.c:1:
./erfa.h:634:21: error: unknown type name 'eraLEAPSECOND'
int eraDatini(const eraLEAPSECOND *builtin, int n_builtin,
                    ^
./erfa.h:635:15: error: unknown type name 'eraLEAPSECOND'
              eraLEAPSECOND **leapseconds);
              ^
./erfa.h:624:2: error: unterminated conditional directive
#ifndef _ERFA_DAT_EXTRA_H
 ^
./erfa.h:1:2: error: unterminated conditional directive
#ifndef ERFAHDEF
 ^
erfa.c:11911:10: error: use of undeclared identifier 'PACKAGE_VERSION'
  return PACKAGE_VERSION;
         ^
erfa.c:11916:10: error: use of undeclared identifier 'PACKAGE_VERSION_MAJOR'
  return PACKAGE_VERSION_MAJOR;
         ^
erfa.c:11921:10: error: use of undeclared identifier 'PACKAGE_VERSION_MINOR'
  return PACKAGE_VERSION_MINOR;
         ^
erfa.c:11926:10: error: use of undeclared identifier 'PACKAGE_VERSION_MICRO'
  return PACKAGE_VERSION_MICRO;
         ^
erfa.c:11931:10: error: use of undeclared identifier 'SOFA_VERSION'
  return SOFA_VERSION;
         ^
erfa.c:15638:21: error: use of undeclared identifier 'DBL_EPSILON'
   if ( (f-1.0) >= -DBL_EPSILON/4.0 ) {
                    ^
erfa.c:15645:13: error: use of undeclared identifier 'DBL_EPSILON'
      if ( -DBL_EPSILON/2.0 < f ) {
            ^
11 errors generated.
make[1]: *** [erfa.o] Error 1
make: *** [erfa] Error 2

It looks like the flattener creates a header file with the erfaextra.h and erfadatextra.h headers copied in the wrong order (the latter depends on the former), and with missing #endif directives (or without stripping the existing directives from the headers first). The erfa.c source file includes the version and leapsecond code, but also includes the testing code in t_erfa_c_extra.c. The source file is also missing the #include <float.h> that's required in jd2cal.c.

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.