Skip to content

Add notam support for RTBA spaces in France #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
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
16 changes: 8 additions & 8 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"[typescriptreact]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
// "editor.codeActionsOnSave": {
// "source.organizeImports": true
// }
},
"files.exclude": {
"**/._*": true,
Expand All @@ -13,10 +13,10 @@
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
"editor.defaultFormatter": "esbenp.prettier-vscode"
// "editor.codeActionsOnSave": {
// "source.organizeImports": true
// }
},
"typescript.updateImportsOnFileMove.enabled": "always",
"[yaml]": {
Expand Down
14 changes: 7 additions & 7 deletions jobs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion jobs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"lodash": "^4.17.21",
"node-cron": "^3.0.2",
"node-fetch": "^3.2.10",
"ts-aerodata-france": "^0.1.11"
"ts-aerodata-france": "^0.1.12"
},
"scripts": {
"start": "node --es-module-specifier-resolution=node .",
Expand Down
2 changes: 1 addition & 1 deletion jobs/src/fetchMetarsAviationWeather.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as dotenv from "dotenv";
import { getFirestore } from "firebase-admin/firestore";
import fetch from "node-fetch";
import { AiracData } from "ts-aerodata-france";
import dataJson from "ts-aerodata-france/build/jsonData/2022-11-03.json" assert { type: "json" };
import dataJson from "ts-aerodata-france/build/jsonData/2023-02-23.json" assert { type: "json" };

dotenv.config();
const METAR_API_URL = "https://api.checkwx.com/metar";
Expand Down
2 changes: 1 addition & 1 deletion jobs/src/fetchMetarsCheckWx.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as dotenv from "dotenv";
import { getFirestore } from "firebase-admin/firestore";
import fetch from "node-fetch";
import { AiracData } from "ts-aerodata-france";
import dataJson from "ts-aerodata-france/build/jsonData/2022-11-03.json" assert { type: "json" };
import dataJson from "ts-aerodata-france/build/jsonData/2023-02-23.json" assert { type: "json" };

dotenv.config();
const METAR_API_URL = "https://api.checkwx.com/metar";
Expand Down
2 changes: 1 addition & 1 deletion jobs/src/fetchMetarsNoaa.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as dotenv from "dotenv";
import { AiracData } from "ts-aerodata-france";
import dataJson from "ts-aerodata-france/build/jsonData/2022-11-03.json" assert { type: "json" };
import dataJson from "ts-aerodata-france/build/jsonData/2023-02-23.json" assert { type: "json" };
import fetch from "node-fetch";
import _ from "lodash";
import { initializeApp } from "./initializeApp";
Expand Down
2 changes: 1 addition & 1 deletion jobs/src/fetchTafs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as dotenv from "dotenv";
import { getFirestore } from "firebase-admin/firestore";
import fetch from "node-fetch";
import { AiracData } from "ts-aerodata-france";
import dataJson from "ts-aerodata-france/build/jsonData/2022-11-03.json" assert { type: "json" };
import dataJson from "ts-aerodata-france/build/jsonData/2023-02-23.json" assert { type: "json" };
import { initializeApp } from "./initializeApp";

dotenv.config();
Expand Down
12 changes: 5 additions & 7 deletions jobs/src/fetchTafsNoaa.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as dotenv from "dotenv";
import { AiracData } from "ts-aerodata-france";
import dataJson from "ts-aerodata-france/build/jsonData/2022-11-03.json" assert { type: "json" };
import dataJson from "ts-aerodata-france/build/jsonData/2023-02-23.json" assert { type: "json" };
import { getFirestore } from "firebase-admin/firestore";
import fetch from "node-fetch";
import _ from "lodash";
Expand Down Expand Up @@ -61,12 +61,10 @@ export const fetchMetars = async () => {
`found ${Object.keys(frenchMetarsByIcaoCode).length} unique french metars`
);
const db = getFirestore();
await db
.collection("metars")
.add({
queriedAt: new Date(),
metars: Object.values(frenchMetarsByIcaoCode),
});
await db.collection("metars").add({
queriedAt: new Date(),
metars: Object.values(frenchMetarsByIcaoCode),
});
console.log("wrote metars to firestore");
};

Expand Down
Loading