Skip to content

Commit 45eff0f

Browse files
authored
Merge pull request #415 from ukmda/master
Merge in changes from Master
2 parents 39eb1a6 + 7501c1a commit 45eff0f

141 files changed

Lines changed: 2192 additions & 2008 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/automated-testing.yml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: automated_testing
1+
name: Automated Testing
22
env:
33
AWS_REGION: eu-west-2
44
permissions:
@@ -7,10 +7,10 @@ permissions:
77

88
on:
99
push:
10-
branches: [ dev, markmac99 ]
10+
branches: [dev, markmac99]
1111
pull_request:
1212
# The branches below must be a subset of the branches above
13-
branches: [ master ]
13+
branches: [dev, markmac99]
1414
jobs:
1515
conttests:
1616
runs-on: thelinux
@@ -20,7 +20,7 @@ jobs:
2020
username: ${{ secrets.DH_LOGIN_MM }}
2121
password: ${{ secrets.DH_PATT_MM }}
2222
env:
23-
BRANCH: ${{ github.head_ref || github.ref_name }}
23+
BRANCH: ${{ github.head_ref || github.ref_name }}
2424
volumes:
2525
- testdata:/data
2626
steps:
@@ -32,21 +32,31 @@ jobs:
3232
aws-region: ${{ env.AWS_REGION }}
3333
- name: remote tests
3434
run: |
35-
chmod +x /tests.sh
3635
if [ ! -f /data/admin/cameraLocs.json ] ; then
3736
echo "getting test data"
3837
curl https://archive.ukmeteors.co.uk/browse/testdata/testdata.tar.gz -o /data/testdata.tar.gz
3938
cd /data && tar -xzf ./testdata.tar.gz
4039
else
4140
echo "test data available"
4241
fi
43-
mkdir -p ~/.aws
44-
cp /data/profile/credentials ~/.aws/
45-
/tests.sh
42+
aws sts get-caller-identity
43+
pip install --upgrade MeteorTools | grep -v 'already satisfied'
44+
pip install pytest pytest-cov | grep -v 'already satisfied'
45+
[ -d ./ukmda-dataprocessing ] && rm -Rf ./ukmda-dataprocessing
46+
git clone https://github.com/ukmda/ukmda-dataprocessing.git
47+
cd ./ukmda-dataprocessing/
48+
git checkout $BRANCH
49+
cd ./archive/ukmon_pylib/
50+
curdir=$(pwd -P)
51+
export DATADIR=/data
52+
echo DATADIR is $DATADIR curdir is $curdir
53+
export PYTHONPATH=/WesternMeteorPyLib:/RMS:${curdir}
54+
pytest -v ./tests --cov=. --cov-report=term-missing
55+
4656
apitests:
4757
runs-on: ubuntu-latest
4858
steps:
49-
- name: checkout code
59+
- name: checkout code
5060
uses: actions/checkout@v3
5161
- name: run api tests
5262
run: |

.github/workflows/build_usermgmt.yml

Lines changed: 0 additions & 71 deletions
This file was deleted.

.github/workflows/codeql-analysis.yml

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ name: "CodeQL"
1313

1414
on:
1515
push:
16-
branches: [ master ]
16+
branches: [master]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
19-
branches: [ master ]
19+
branches: [master]
2020
schedule:
21-
- cron: '26 14 * * 6'
21+
- cron: "26 14 * * 6"
2222

2323
jobs:
2424
analyze:
@@ -32,40 +32,40 @@ jobs:
3232
strategy:
3333
fail-fast: false
3434
matrix:
35-
language: [ 'javascript', 'python' ]
35+
language: ["javascript", "python"]
3636
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
3737
# Learn more:
3838
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
3939

4040
steps:
41-
- name: Checkout repository
42-
uses: actions/checkout@v3
41+
- name: Checkout repository
42+
uses: actions/checkout@v3
4343

44-
# Initializes the CodeQL tools for scanning.
45-
- name: Initialize CodeQL
46-
uses: github/codeql-action/init@v2
47-
with:
48-
languages: ${{ matrix.language }}
49-
# If you wish to specify custom queries, you can do so here or in a config file.
50-
# By default, queries listed here will override any specified in a config file.
51-
# Prefix the list here with "+" to use these queries and those in the config file.
52-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
44+
# Initializes the CodeQL tools for scanning.
45+
- name: Initialize CodeQL
46+
uses: github/codeql-action/init@v2
47+
with:
48+
languages: ${{ matrix.language }}
49+
# If you wish to specify custom queries, you can do so here or in a config file.
50+
# By default, queries listed here will override any specified in a config file.
51+
# Prefix the list here with "+" to use these queries and those in the config file.
52+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
5353

54-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
55-
# If this step fails, then you should remove it and run the build manually (see below)
56-
- name: Autobuild
57-
uses: github/codeql-action/autobuild@v2
54+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
55+
# If this step fails, then you should remove it and run the build manually (see below)
56+
- name: Autobuild
57+
uses: github/codeql-action/autobuild@v2
5858

59-
# ℹ️ Command-line programs to run using the OS shell.
60-
# 📚 https://git.io/JvXDl
59+
# ℹ️ Command-line programs to run using the OS shell.
60+
# 📚 https://git.io/JvXDl
6161

62-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
63-
# and modify them (or add more) to build your code if your project
64-
# uses a compiled language
62+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
63+
# and modify them (or add more) to build your code if your project
64+
# uses a compiled language
6565

66-
#- run: |
67-
# make bootstrap
68-
# make release
66+
#- run: |
67+
# make bootstrap
68+
# make release
6969

70-
- name: Perform CodeQL Analysis
71-
uses: github/codeql-action/analyze@v2
70+
- name: Perform CodeQL Analysis
71+
uses: github/codeql-action/analyze@v2

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,10 +593,19 @@ archive/samfunctions*/camDetails/pythoncode/camDetails.py
593593
archive/samfunctions*/camDetails/pythoncode/awskeys
594594
archive/containers/RMS-docker/rms_docker.tar
595595
archive/containers/RMS-docker/Dockerfile_orig.txt
596+
597+
usermgmt/windows/csvkeys
598+
usermgmt/windows/inifs
599+
usermgmt/windows/jsonkeys
600+
usermgmt/windows/keys
601+
usermgmt/windows/sshkeys
602+
usermgmt/windows/stationdetails
603+
usermgmt/windows/users
596604
usermgmt/gmailkeys/*
597605
usermgmt/server/ukmonfundraising.txt
598606
usermgmt/server/ukmoncommittee.txt
599607
usermgmt/server/ukmon*.json
608+
600609
**/awskeys.test
601610
**/trajsolver_old/*
602611
archive/tmp/*
@@ -605,3 +614,7 @@ tests/testing/RMS/
605614
tests/testing/WesternMeteorPyLib/
606615
archive/ukmon_pylib/tests/testdata.tar.gz
607616
servercopybkp/*
617+
fbcollector/config.ini
618+
usermgmt/windows/stationmaint.ini
619+
usermgmt/windows/README.md
620+
fbCollector/README.html

.vscode/c_cpp_properties.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
"includePath": [
66
"${workspaceFolder}/**",
77
"${vcpkgRoot}/x64-windows/include",
8-
"${vcpkgRoot}/x86-windows/include",
9-
"e:/dev/opencv3/opencv-3.4.11/build/install/include"
8+
"${vcpkgRoot}/x86-windows/include"
109
],
1110
"defines": [
1211
"_DEBUG",

archive/analysis/consolidateOutput.sh

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,23 +37,29 @@ consdir=${DATADIR}/consolidated/temp
3737
mkdir -p ${DATADIR}/single/rawcsvs
3838
ls -1 $consdir/*.csv | while read csvf
3939
do
40-
bn=$(basename $csvf)
41-
typ=${bn:0:3}
42-
if [ "$typ" != "M20" ] ; then
43-
pref="P"
44-
yr=${bn:7:4}
40+
flen=$(wc -l $csvf | awk '{print $1}')
41+
if [ $flen -lt 2 ] ; then
42+
logger -s -t consolidateOutput "skipping empty file $csvf"
43+
rm $csvf
4544
else
46-
pref="M"
47-
yr=${bn:1:4}
48-
fi
49-
mrgfile=${DATADIR}/consolidated/${pref}_${yr}-unified.csv
50-
if [ ! -f $mrgfile ] ; then
51-
cat $csvf >> $mrgfile
52-
else
53-
#echo $bn $mrgfile
54-
sed '1d' $csvf >> $mrgfile
45+
bn=$(basename $csvf)
46+
typ=${bn:0:3}
47+
if [ "$typ" != "M20" ] ; then
48+
pref="P"
49+
yr=${bn:7:4}
50+
else
51+
pref="M"
52+
yr=${bn:1:4}
53+
fi
54+
mrgfile=${DATADIR}/consolidated/${pref}_${yr}-unified.csv
55+
if [ ! -f $mrgfile ] ; then
56+
cat $csvf >> $mrgfile
57+
else
58+
#echo $bn $mrgfile
59+
sed '1d' $csvf >> $mrgfile
60+
fi
61+
mv $csvf ${DATADIR}/single/rawcsvs
5562
fi
56-
mv $csvf ${DATADIR}/single/rawcsvs
5763
done
5864

5965
logger -s -t consolidateOutput "pushing consolidated information back"

archive/containers/trajsolver/Dockerfile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
# Copyright (C) 2018-2023 Mark McIntyre
2-
FROM continuumio/miniconda3:4.11.0
2+
#FROM continuumio/miniconda3:4.11.0
3+
FROM continuumio/miniconda3:24.7.1-0
34

4-
RUN conda install -y -c conda-forge "numpy<1.25.0" scipy cython pytz pyqt
5+
#RUN conda install -y -c conda-forge "numpy<1.25.0" scipy cython pytz pyqt
6+
RUN conda install -y -c conda-forge "numpy<2" scipy cython pytz pyqt
57
RUN conda install -y -c conda-forge jplephem ephem
68
RUN conda install -y -c conda-forge basemap basemap-data-hires
79
RUN conda install -y -c conda-forge pandas cartopy
8-
RUN conda install -y matplotlib=3.4.3
10+
RUN conda install -y matplotlib
911
RUN pip install boto3
1012
RUN apt-get update && apt-get -y upgrade
1113
RUN conda install -y -c conda-forge numba
1214

1315
COPY WesternMeteorPyLib/ ./WesternMeteorPyLib
14-
ENV PYTHONPATH ./WesternMeteorPyLib
15-
ENV PROJ_LIB ./
16+
ENV PYTHONPATH=./WesternMeteorPyLib
17+
ENV PROJ_LIB=./
1618
COPY *.py ./
1719
#ENV NUMPY_EXPERIMENTAL_DTYPE_API 1
1820

archive/containers/trajsolver/build.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ write-output "building $imagename in $accid"
1717
$yn=read-host -prompt "update WMPL?"
1818
if ($yn.tolower() -eq "y") { bash -c "./update_wmpl.sh $env" }
1919

20-
if ($env -eq "test") { copy-item awskeys.test awskeys}
20+
if ($env -eq "test") { move-item awskeys.test awskeys}
2121

2222
docker build . -t ${imagename}
2323
if (! $?)
@@ -26,7 +26,7 @@ if (! $?)
2626
exit
2727
}
2828
set-location $loc
29-
if ($env -eq "test") { Remove-Item awskeys}
29+
if ($env -eq "test") { move-item awskeys awskeys.test }
3030

3131
$yn=read-host -prompt "upload to ECR?"
3232
if ($yn.tolower() -eq "y") {

0 commit comments

Comments
 (0)