Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/lgm-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,24 @@ jobs:
basic-suite:
runs-on: ubuntu-20.04
steps:
- name: Install dependencies
- name: Install python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies for C lib
run: |
sudo apt-get update -qq
sudo apt-get install -y make gcc g++ autotools-dev autoconf check
sudo apt-get install -y libgsl-dev libgsl23 gsl-bin libgsl-dbg
sudo apt-get install -y libhdf5-dev libperl-dev
gcc --version
gsl-config --version
python -m pip install cpplint
- name: Checkout
uses: actions/checkout@v2
- name: Code style checks
run: |
cpplint --filter=-whitespace,-readability,+build,-build/include_subdir,-build/header_guard,-build/include_what_you_use,-legal,+runtime,-runtime/int,-runtime/printf,-runtime/threadsafe_fn --linelength=120 --exclude=Examples/KdTree/magConj.c Examples/*/*.h Examples/*/*.c Tools/*.c libLanlGeoMag/Lgm_* libLanlGeoMag/Lgm/Lgm_*
- name: compile_test
run: |
autoreconf -i
Expand Down
2 changes: 1 addition & 1 deletion Examples/AE8_AP8/AE8_AP8.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <stdio.h>
#include <math.h>
#include <stdio.h>
#include <Lgm_AE8_AP8.h>
int main( ) {

Expand Down
10 changes: 5 additions & 5 deletions Examples/FluxToPSD/CDFUtils.c
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#include "CDFUtils.h"
#include <math.h>
#include <argp.h>
#include <cdf.h>
#include <stdlib.h>
#include <stdio.h>
#include <gsl/gsl_spline.h>
#include <Lgm/Lgm_DynamicMemory.h>
#include <Lgm/Lgm_CTrans.h>
#include <Lgm/Lgm_DynamicMemory.h>
#include <Lgm/Lgm_Quat.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include "CDFUtils.h"


/*
Expand Down
2 changes: 1 addition & 1 deletion Examples/FluxToPSD/CDFUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#define CDF_UTILS_H

#include <cdf.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>


/*
Expand Down
2 changes: 1 addition & 1 deletion Examples/FluxToPSD/DumpSvg.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>

typedef struct CoordInfo {

Expand Down
34 changes: 17 additions & 17 deletions Examples/FluxToPSD/FluxToPSD.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,26 @@ CHECK ME FOR MEMORY LEAKS.....
THIS ALSO eeds some argument changes...
e.g. The Mu's K's instead of pitch angles...
*/
#include "CDFUtils.h"
#include <stdlib.h>
#include <argp.h>
#include <ctype.h>
#include <fcntl.h>
#include <libgen.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <ctype.h>
#include <argp.h>
#include <sys/types.h>
#include <time.h>
#include <libgen.h>
#include <Lgm/Lgm_CTrans.h>
#include <Lgm/Lgm_Sgp.h>
#include <Lgm/Lgm_DynamicMemory.h>
#include <Lgm/Lgm_MagModelInfo.h>
#include <Lgm/Lgm_FluxToPsd.h>
#include <Lgm/Lgm_Eop.h>
#include <Lgm/Lgm_QinDenton.h>
#include <Lgm/Lgm_Misc.h>
#include <Lgm/Lgm_HDF5.h>
#include <unistd.h>
#include <Lgm_CTrans.h>
#include <Lgm_DynamicMemory.h>
#include <Lgm_Eop.h>
#include <Lgm_FluxToPsd.h>
#include <Lgm_HDF5.h>
#include <Lgm_MagModelInfo.h>
#include <Lgm_Misc.h>
#include <Lgm_QinDenton.h>
#include <Lgm_Sgp.h>
#include "CDFUtils.h"



Expand Down
2 changes: 1 addition & 1 deletion Examples/FluxToPSD/MuTest.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <stdio.h>
#include <math.h>
#include <stdio.h>
#include <Lgm_MagModelInfo.h>
#include <Lgm_FluxToPsd.h>
int main( ) {
Expand Down
2 changes: 1 addition & 1 deletion Examples/FluxToPSD/f2p.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <stdio.h>
#include <math.h>
#include <stdio.h>
#include <Lgm_MagModelInfo.h>
#include <Lgm_FluxToPsd.h>
int main( ) {
Expand Down
2 changes: 1 addition & 1 deletion Examples/FluxToPSD/f2p_v2.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <stdio.h>
#include <math.h>
#include <stdio.h>
#include <Lgm_MagModelInfo.h>
#include <Lgm_FluxToPsd.h>
void DumpSvg( int, char * );
Expand Down
8 changes: 4 additions & 4 deletions Examples/KdTree/DstNNs.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#include <stdlib.h>
#include <math.h>
#include <quicksort.h>
#include <stdio.h>
#include <stdlib.h>
#include <Lgm_DynamicMemory.h>
#include <Lgm_ElapsedTime.h>
#include <Lgm_CTrans.h>
#include <Lgm_ElapsedTime.h>
#include <Lgm_KdTree.h>
#include <quicksort.h>
#include <stdio.h>
int main( ) {
Lgm_ElapsedTimeInfo t;
double *q, **u, **B, *Dst, DstIndex, dum1, dum2, dum3;
Expand Down
8 changes: 4 additions & 4 deletions Examples/KdTree/TLE_NNs.c
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#include <stdlib.h>
#include <math.h>
#include <quicksort.h>
#include <stdio.h>
#include <stdlib.h>
#include <Lgm_CTrans.h>
#include <Lgm_DynamicMemory.h>
#include <Lgm_ElapsedTime.h>
#include <Lgm_CTrans.h>
#include <Lgm_KdTree.h>
#include <Lgm_Sgp.h>
#include <quicksort.h>
#include <stdio.h>
int main( ) {
Lgm_ElapsedTimeInfo t;
double *q, **u, **B, DstIndex, dum1, dum2, dum3;
Expand Down
14 changes: 7 additions & 7 deletions Examples/KdTree/magConj.c
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <libgen.h>
#include <glob.h>
#include <argp.h>
#include <glob.h>
#include <libgen.h>
#include <math.h>
#include <regex.h>
#include <Lgm_DynamicMemory.h>
#include <stdio.h>
#include <stdlib.h>
#include <Lgm_CTrans.h>
#include <Lgm_DynamicMemory.h>
#include <Lgm_HDF5.h>
#include <Lgm_KdTree.h>
#include <Lgm_Misc.h>
#include <Lgm_HDF5.h>

void StringSplit( char *Str, char *StrArray[], int len, int *n );

Expand Down
4 changes: 2 additions & 2 deletions Examples/KdTree/test.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include <stdlib.h>
#include <math.h>
#include <quicksort.h>
#include <stdlib.h>
#include <Lgm_DynamicMemory.h>
#include <Lgm_ElapsedTime.h>
#include <Lgm_KdTree.h>
#include <quicksort.h>
int main( ) {
Lgm_ElapsedTimeInfo t;
double **q, **u, **B;
Expand Down
10 changes: 5 additions & 5 deletions Examples/LCDS/LCDS.c
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#include <fcntl.h>
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <Lgm_MagModelInfo.h>
#include <sys/types.h>
#include <unistd.h>
#include <Lgm_LstarInfo.h>
#include <Lgm_MagEphemInfo.h>
#include <Lgm_QinDenton.h>
#include <Lgm_MagModelInfo.h>
#include <Lgm_Misc.h>
#include <Lgm_QinDenton.h>

#define MAIN
#define TRACE_TOL 1e-7
Expand Down
6 changes: 3 additions & 3 deletions Examples/Lstar/Lstar.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <Lgm_CTrans.h>
#include <Lgm_LstarInfo.h>

Expand Down
12 changes: 6 additions & 6 deletions Examples/LstarDipoleTest/ComputeLstarVersusPA.c
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#include <Lgm_MagModelInfo.h>
#include <Lgm_LstarInfo.h>
#include <Lgm_MagEphemInfo.h>
#include <fcntl.h>
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/types.h>
#include <unistd.h>
#include <Lgm_LstarInfo.h>
#include <Lgm_MagEphemInfo.h>
#include <Lgm_MagModelInfo.h>

#define TRACE_TOL 1e-7
#define KP_DEFAULT 1
Expand Down
4 changes: 2 additions & 2 deletions Examples/LstarDipoleTest/DynamicMemory.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <stdlib.h>
#include <stdio.h>
#include <malloc.h>
#include <stdio.h>
#include <stdlib.h>

/*
* Macros for dynamically allocating/freeing 1D arrays of any type
Expand Down
6 changes: 3 additions & 3 deletions Examples/LstarDipoleTest/LstarVersusPA.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#define MAIN
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <Lgm_CTrans.h>
#include <Lgm_MagEphemInfo.h>

Expand Down
2 changes: 1 addition & 1 deletion Examples/LstarDipoleTest/MagEphemInfo.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef MAGEPHEMINFO_H
#define MAGEPHEMINFO_H

#include <Lgm/Lgm_MagModelInfo.h>
#include <Lgm/Lgm_LstarInfo.h>
#include <Lgm/Lgm_MagModelInfo.h>

#define MAX_PITCH_ANGLES 900

Expand Down
12 changes: 6 additions & 6 deletions Examples/LstarDipoleTest_omp/ComputeLstarVersusPA.c
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#include <Lgm_MagModelInfo.h>
#include <Lgm_LstarInfo.h>
#include <Lgm_MagEphemInfo.h>
#include <fcntl.h>
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/types.h>
#include <unistd.h>
#include <Lgm_LstarInfo.h>
#include <Lgm_MagEphemInfo.h>
#include <Lgm_MagModelInfo.h>

#define TRACE_TOL 1e-7
#define KP_DEFAULT 1
Expand Down
4 changes: 2 additions & 2 deletions Examples/LstarDipoleTest_omp/DynamicMemory.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <stdlib.h>
#include <stdio.h>
#include <malloc.h>
#include <stdio.h>
#include <stdlib.h>

/*
* Macros for dynamically allocating/freeing 1D arrays of any type
Expand Down
6 changes: 3 additions & 3 deletions Examples/LstarDipoleTest_omp/LstarVersusPA.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#define MAIN
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <Lgm_CTrans.h>
#include <Lgm_MagEphemInfo.h>

Expand Down
4 changes: 2 additions & 2 deletions Examples/LstarDipoleTest_omp/MagEphemInfo.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef MAGEPHEMINFO_H
#define MAGEPHEMINFO_H

#include <Lgm/Lgm_MagModelInfo.h>
#include <Lgm/Lgm_LstarInfo.h>
#include <Lgm_LstarInfo.h>
#include <Lgm_MagModelInfo.h>

#define MAX_PITCH_ANGLES 900

Expand Down
12 changes: 6 additions & 6 deletions Examples/LstarVersusPA_omp/ComputeLstarVersusPA.c
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#include <Lgm_MagModelInfo.h>
#include <Lgm_LstarInfo.h>
#include <Lgm_MagEphemInfo.h>
#include <fcntl.h>
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/types.h>
#include <unistd.h>
#include <Lgm_LstarInfo.h>
#include <Lgm_MagEphemInfo.h>
#include <Lgm_MagModelInfo.h>

#define TRACE_TOL 1e-7
#define KP_DEFAULT 1
Expand Down
6 changes: 3 additions & 3 deletions Examples/LstarVersusPA_omp/LstarVersusPA.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#define MAIN
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <Lgm_CTrans.h>
#include <Lgm_MagEphemInfo.h>

Expand Down
Loading