Skip to content

Commit

Permalink
Merge pull request #78 from Kitware/auto-slicing
Browse files Browse the repository at this point in the history
Improve Coordinate Indexing & Slicing
  • Loading branch information
annehaley authored Jun 19, 2024
2 parents f1b5d74 + 1c4d30c commit c17d6b7
Show file tree
Hide file tree
Showing 28 changed files with 887 additions and 267 deletions.
57 changes: 31 additions & 26 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,37 +29,42 @@ jobs:
matrix:
python-version: [3.9]
config:
- {
name: "Linux",
os: ubuntu-latest
}
- {
name: "MacOSX",
os: macos-latest
}
- {
name: "Windows",
os: windows-latest
}
- { name: "Linux", os: ubuntu-latest }
- { name: "MacOSX", os: macos-latest }
- { name: "Windows", os: windows-latest }

defaults:
run:
shell: bash

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Set up NPM
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install Vue component dependencies
run: npm install
working-directory: pan3d-js
- name: Lint Vue components
run: npm run lint
working-directory: pan3d-js
- name: Build Vue components
run: npm run build
working-directory: pan3d-js

- name: Install and Run Tests
run: |
pip install .
pip install -r tests/requirements.txt
pytest -s ./tests/test_builder.py
pip install .[viewer]
pytest -s ./tests/test_viewer.py
working-directory: .
- name: Install and Run Tests
run: |
pip install .
pip install -r tests/requirements.txt
pytest -s ./tests/test_builder.py
pip install .[viewer]
pytest -s ./tests/test_viewer.py
working-directory: .
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ node_modules

examples/jupyter/*.gif
site/*
pan3d/ui/pan3d_components/module/serve

# local env files
.env.local
Expand Down
17 changes: 2 additions & 15 deletions examples/example_config_cmip.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,11 @@
"name": "zos",
"x": "i",
"y": "j",
"t": "time",
"t_index": 0
},
"data_slices": {
"j": [
0,
290,
1
],
"i": [
0,
359,
1
]
"t": "time"
},
"ui": {
"main_drawer": true,
"axis_drawer": true,
"expanded_coordinates": []
}
}
}
20 changes: 1 addition & 19 deletions examples/example_config_esgf.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,7 @@
"name": "sfcWind",
"x": "lon",
"y": "lat",
"t": "time",
"t_index": 0
},
"data_slices": {
"time": [
"Apr 01 2000 12:00",
"May 30 2001 12:00",
1
],
"lat": [
-89.72,
89.72,
1
],
"lon": [
0.42,
359.58,
1
]
"z": "time"
},
"ui": {
"main_drawer": false,
Expand Down
12 changes: 6 additions & 6 deletions examples/example_config_noaa.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
},
"data_slices": {
"lat": [
-90,
90,
20
0,
500,
5
],
"lon": [
-180,
180,
20
0,
500,
5
]
},
"ui": {
Expand Down
22 changes: 0 additions & 22 deletions examples/example_config_pangeo.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,6 @@
"t": "time",
"t_index": 0
},
"data_slices": {
"time": [
142560000,
171072000,
1
],
"Z": [
-2912.67,
-0.5,
1
],
"YC": [
1000,
1999000,
1
],
"XC": [
1000,
999000,
1
]
},
"ui": {
"main_drawer": false,
"axis_drawer": false,
Expand Down
17 changes: 0 additions & 17 deletions examples/example_config_xarray.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,6 @@
"t": "month",
"t_index": 0
},
"data_slices": {
"level": [
200,
850,
1
],
"latitude": [
-90,
0,
10
],
"longitude": [
-180,
0,
10
]
},
"ui": {
"main_drawer": true,
"axis_drawer": true,
Expand Down
12 changes: 12 additions & 0 deletions pan3d-js/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* eslint-env node */
module.exports = {
root: true,
extends: [
"plugin:vue/vue3-essential",
"eslint:recommended",
"@vue/eslint-config-prettier",
],
parserOptions: {
ecmaVersion: "latest",
},
};
7 changes: 7 additions & 0 deletions pan3d-js/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
serve
serve/*.map
serve/*.html
serve/*.common.*
serve/*-light.*
serve/*.umd.js
package-lock.json
42 changes: 42 additions & 0 deletions pan3d-js/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"name": "pan3d-components",
"version": "0.0.0",
"description": "Vue component for pan3d",
"main": "./dist/pan3d-components.umd.js",
"unpkg": "./dist/pan3d-components.umd.js",
"exports": {
".": {
"require": "./dist/pan3d-components.umd.js"
}
},
"scripts": {
"dev": "vite",
"build": "vite build --emptyOutDir",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore --ignore-pattern public",
"semantic-release": "semantic-release"
},
"dependencies": {},
"peerDependencies": {
"vue": "^2.7.0 || >=3.0.0"
},
"devDependencies": {
"@vue/eslint-config-prettier": "^7.0.0",
"eslint": "^8.33.0",
"eslint-plugin-vue": "^9.3.0",
"prettier": "^2.7.1",
"vite": "^4.1.0",
"vue": "^3.0.0"
},
"author": "Kitware Inc",
"license": "MIT",
"keywords": [
"Kitware",
"pan3d"
],
"files": [
"dist/*",
"src/*",
"*.json",
"*.js"
]
}
Loading

0 comments on commit c17d6b7

Please sign in to comment.