Skip to content

Commit

Permalink
prettier formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
twelch committed Sep 10, 2024
1 parent 8ed2aea commit ec330bb
Show file tree
Hide file tree
Showing 98 changed files with 38,523 additions and 1,675 deletions.
18 changes: 9 additions & 9 deletions .storybook/genReportStories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if (!fs.existsSync(sketchDir)) {
const outputDir = path.join(PROJECT_PATH, "examples", "output");
if (!fs.existsSync(outputDir)) {
console.error(
`Example output path ${outputDir} does not exist. Have you added to examples/sketches and run the test suite?`
`Example output path ${outputDir} does not exist. Have you added to examples/sketches and run the test suite?`,
);
process.exit();
}
Expand All @@ -48,7 +48,7 @@ const storyPaths = await globby(
path.join(storyDir, "**/*.example-stories.ts"),
{
onlyFiles: true,
}
},
);
// console.log("storyPaths", storyPaths);
const storyConfigs: GpStoryConfig[] = [];
Expand All @@ -71,15 +71,15 @@ const sketchFilenames = fs
.filter((sketchFilename) => path.extname(sketchFilename) === ".json")
.filter(
(sketchFilename) =>
path.basename(sketchFilename).startsWith("gp", 0) === false
path.basename(sketchFilename).startsWith("gp", 0) === false,
);

// console.log("sketchFilenames", sketchFilenames);
const sketches: (Sketch | SketchCollection)[] = [];
for (const sketchFilename of sketchFilenames) {
try {
const sketch: Sketch | SketchCollection = fs.readJSONSync(
path.join(sketchDir, sketchFilename)
path.join(sketchDir, sketchFilename),
) as Sketch;
if (sketch && sketch.properties.name) {
sketches.push(sketch);
Expand Down Expand Up @@ -113,14 +113,14 @@ for (const sketch of sketches) {
for (const storyConfig of storyConfigs) {
for (const sketch of sketches) {
console.log(
`Generating story for ${storyConfig.componentName} - ${sketch.properties.name}`
`Generating story for ${storyConfig.componentName} - ${sketch.properties.name}`,
);

// Pull out relative path from import string and replace with path that will work from story cache subdirectory

if (!fs.existsSync(storyConfig.path!)) {
console.log(
`Story config path ${storyConfig.path} does not exist, skipping`
`Story config path ${storyConfig.path} does not exist, skipping`,
);
continue;
}
Expand All @@ -133,19 +133,19 @@ for (const storyConfig of storyConfigs) {
const storyName = storyTitleSplit[storyTitleSplit.length - 1];
const storyOutDir = path.join(
path.dirname(storyConfig.path!),
".story-cache"
".story-cache",
);
const storyOutPath = path.join(
storyOutDir,
`${storyName}-${sketch.properties.name}.stories.tsx`
`${storyName}-${sketch.properties.name}.stories.tsx`,
);

const exampleOutputs = outputs.filter((output) => {
return output.sketchName === sketch.properties.name;
});
if (!exampleOutputs) {
console.log(
`No results found for sketch ${sketch.properties.name}, skipping`
`No results found for sketch ${sketch.properties.name}, skipping`,
);
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
"amazonwebservices.aws-toolkit-vscode",
"DavidAnson.vscode-markdownlint"
]
}
}
50 changes: 24 additions & 26 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@
"version": "0.2.0",
"configurations": [
{
"name": "Debug Tests",
"type": "node",
"request": "launch",
"runtimeArgs": [
"--inspect-brk",
"${workspaceRoot}/node_modules/.bin/geoprocessing",
"test"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"port": 9229
},{
"name": "Debug Tests",
"type": "node",
"request": "launch",
"runtimeArgs": [
"--inspect-brk",
"${workspaceRoot}/node_modules/.bin/geoprocessing",
"test"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"port": 9229
},
{
"name": "Debug tests - with pattern",
"type": "node",
"request": "launch",
Expand All @@ -29,27 +30,24 @@
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"port": 9229
},{
"type": "node",
"request": "launch",
"name": "debug single script",
"runtimeArgs": [
"--import",
"tsx",
],
"args": [
"${workspaceRoot}/${input:scriptPath}"
]
}
"port": 9229
},
{
"type": "node",
"request": "launch",
"name": "debug single script",
"runtimeArgs": ["--import", "tsx"],
"args": ["${workspaceRoot}/${input:scriptPath}"]
}
],
"inputs": [
{
"type": "promptString",
"id": "scriptPath",
"description": "",
"default": "scripts/myscript.ts"
},{
},
{
"type": "promptString",
"id": "testNamePattern",
"description": "vitest -t 'regex pattern to select tests'",
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ This project uses data management [option ?](https://github.com/seasketch/geopro

Data is sourced from the following locations:

* ?
- ?
8 changes: 4 additions & 4 deletions data/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
version: '3'
version: "3"
services:
db:
container_name: db-project-name
image: seasketch/geoprocessing-db
# Port 54320 will be exposed on the host machine. For example, with
# QGIS installed you can connect to the database on this port. Use
# the username, password, and database name listed below.
# If working on more than one project at a time you may want to change the
# If working on more than one project at a time you may want to change the
# exposed port number to avoid conflicts
ports:
- "54320:5432"
Expand All @@ -21,11 +21,11 @@ services:
PGPASSWORD: "docker"
PGDATABASE: "gis"
# The contents of the project directory in the host will be mirrored
# within the workspace.
# within the workspace.
volumes:
- "..:/data"
# Switch to the data directory on startup
working_dir: /data
depends_on:
- "db"
command: ["bash"]
command: ["bash"]
2 changes: 1 addition & 1 deletion examples/output/CentralMPAs/bathymetry.json
Original file line number Diff line number Diff line change
Expand Up @@ -223,4 +223,4 @@
"sketchName": "CentralMPAs",
"isCollection": true
}
]
]
Loading

0 comments on commit ec330bb

Please sign in to comment.