Skip to content

Commit

Permalink
Finalisation suite aux retours Github
Browse files Browse the repository at this point in the history
  • Loading branch information
martinratinaud committed Feb 3, 2025
1 parent f109595 commit 179954a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
"test": "vitest run",
"test:watch": "vitest dev",
"cli": "tsx scripts/cli.ts",
"db:migrate": "knex migrate:latest && yarn db:sync",
"db:migrate": "knex migrate:latest",
"db:new": "knex migrate:make",
"db:revert": "knex migrate:rollback && yarn db:sync",
"db:revert:one": "knex migrate:down && yarn db:sync",
"db:revert": "knex migrate:rollback",
"db:revert:one": "knex migrate:down",
"db:sync": "kysely-codegen --numeric-parser number --out-file ./src/server/db/kysely/database.ts --env-file=\"./.env.local\" --log-level=\"error\" --exclude-pattern=\"(public.spatial_ref_sys|topology.*|tiger.*|public.geography_columns|public.geometry_columns)\" && prettier --write ./src/server/db/kysely/database.ts",
"db:verify": "yarn db:introspect --verify",
"scalingo-postbuild": "yarn build && next-sitemap",
Expand Down
2 changes: 1 addition & 1 deletion scripts/data-import/adapters/etudes-en-cours.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const logger = parentLogger.child({
export default class EtudesEnCoursAdapter extends BaseAdapter {
/**
*
* @param filepath must be like in "data/sample.csv", initially taken from a Google Doc named "Extraction de DATA Cartographie - pour FCU_02122024"
* @param filepath must be like in "data/etudes-en-cours-sample.csv", initially taken from a Google Doc named "Extraction de DATA Cartographie - pour FCU_02122024"
*/
async importData(filepath?: string) {
if (!filepath) {
Expand Down
2 changes: 1 addition & 1 deletion scripts/data-import/base.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export abstract class BaseAdapter {
abstract importData(filepath?: string): Promise<any>;
abstract importData(filepath?: string): Promise<void>;
}
5 changes: 2 additions & 3 deletions scripts/data-import/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ export const loadDataFromFile = async (filepath: string, options: Parameters<typ
if (ext === '.csv') {
const data = await loadCsvFile(filepath, options);
return data;
} else {
console.error('Format de fichier non pris en charge');
throw new Error('Format de fichier non pris en charge');
}

throw new Error('Format de fichier non pris en charge');
};
2 changes: 1 addition & 1 deletion src/server/db/kysely/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3066,7 +3066,7 @@ export interface ReseauxDeFroid {
contenu_CO2_2023_tmp: number | null;
contenu_CO2_ACV_2023_tmp: number | null;
CP_MO: string | null;
departement: number | null;
departement: string | null;
fichiers: Json | null;
geom: string | null;
Gestionnaire: string | null;
Expand Down

0 comments on commit 179954a

Please sign in to comment.