Skip to content
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

Improve Coordinate Indexing & Slicing #78

Merged
merged 23 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
801735f
fix: slice by index instead of value to allow slicing time coord
annehaley Apr 26, 2024
73653e9
feat: Add BoundsConfigure component within render area
annehaley May 1, 2024
24c97ad
feat: Add `resolution` CLI arg and disable auto slicing when <= 1
annehaley May 2, 2024
cfa631b
style: reformat with black
annehaley May 2, 2024
5cac70e
fix: Update example config files
annehaley May 3, 2024
9c9ebf7
fix: Correct various bugs and unexpected behavior
annehaley May 3, 2024
e08af6b
test: Update expected values in tests
annehaley May 3, 2024
faabc39
fix: Move default resolution value (cmd arg is None if not specified)
annehaley May 16, 2024
ad2fcdc
feat: Generate cube face preview images and set up cube mode state vars
annehaley May 20, 2024
1d9c898
feat: Add PreviewBounds component, written with Vue
annehaley May 20, 2024
ce688ed
fix: Add npm installation steps to CI tests
annehaley May 23, 2024
1532b5a
fix: apply suggested usability changes
annehaley May 24, 2024
3247611
fix: add new folders to packages list in pyproject.toml
annehaley Jun 7, 2024
7aa8ea9
refactor: move javascript code to its own top-level directory
annehaley Jun 18, 2024
7432328
fix: update javscript path in CI for build step
annehaley Jun 18, 2024
73d24a4
refactor: move module and serve dirs back into python package
annehaley Jun 18, 2024
c9b449f
fix: include module and serve packages individusaly
annehaley Jun 18, 2024
c891b38
refactor: apply suggestions
annehaley Jun 18, 2024
bf128ba
style: Use double quotes
annehaley Jun 18, 2024
06bc8bd
refactor: move `serve` directory within `module` directory
annehaley Jun 18, 2024
a28e308
refactor: move widgets.py into pan3d_components
annehaley Jun 18, 2024
8389496
fix: Add "pan3d.ui.pan3d_components" to packages list
annehaley Jun 18, 2024
1c4d30c
refactor: Enable module in widgets, not dataset_viewer
annehaley Jun 18, 2024
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
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
annehaley marked this conversation as resolved.
Show resolved Hide resolved

# 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
Loading