Skip to content

Commit

Permalink
Heatmap layer (QuantStack#24)
Browse files Browse the repository at this point in the history
* fix map css+ implement HeatmapLayer

* take off duplicated class

* Update package.json

Co-authored-by: martinRenou <martin.renou@gmail.com>

* add await before screenshot

* restore package

* jlpm install

* jlpm install

* yarn.lock

* await layer

* ui file

* Restore yarn.lock to previous state

* Restore yarn.lock to previous state

* Update Playwright Snapshots

* Update ipyopenlayers/Map.py

Co-authored-by: martinRenou <martin.renou@gmail.com>

* Update ipyopenlayers/Map.py

Co-authored-by: martinRenou <martin.renou@gmail.com>

---------

Co-authored-by: martinRenou <martin.renou@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Jul 1, 2024
1 parent 602fb6c commit f7f6a7e
Show file tree
Hide file tree
Showing 26 changed files with 141,084 additions and 129 deletions.
12 changes: 6 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ module.exports = {
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended'
'plugin:prettier/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.eslint.json',
sourceType: 'module'
sourceType: 'module',
},
plugins: ['@typescript-eslint'],
rules: {
Expand All @@ -19,10 +19,10 @@ module.exports = {
'@typescript-eslint/quotes': [
'error',
'single',
{ avoidEscape: true, allowTemplateLiterals: false }
{ avoidEscape: true, allowTemplateLiterals: false },
],
curly: ['error', 'all'],
eqeqeq: 'error',
'prefer-arrow-callback': 'error'
}
};
'prefer-arrow-callback': 'error',
},
};
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: main
pull_request:
branches: "*"
branches: '*'

jobs:
build:
Expand All @@ -13,7 +13,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.8", "3.12"]
python-version: ['3.8', '3.12']
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ $RECYCLE.BIN/
**/node_modules/
ipyopenlayers/nbextension/index.*

# Ignoring the package-lock.json file
package-lock.json

# Coverage data
# -------------
**/coverage/
Expand All @@ -156,4 +159,7 @@ ipyopenlayers/nbextension/index.*
ipyopenlayers/labextension
ipyopenlayers/nbextension

!ipyopenlayers/nbextension/extension.js


.yarn
4 changes: 2 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"singleQuote": true
}
"singleQuote": true
}
1 change: 0 additions & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ compressionLevel: mixed
enableGlobalCache: false

nodeLinker: node-modules

9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@

# ipyopenlayers

[![Build Status](https://travis-ci.org/QuantStack/ipyopenlayers.svg?branch=master)](https://travis-ci.org/QuantStack/ipyopenlayers)
[![codecov](https://codecov.io/gh/QuantStack/ipyopenlayers/branch/master/graph/badge.svg)](https://codecov.io/gh/QuantStack/ipyopenlayers)


OpenLayers Jupyter Widget

## Installation
Expand All @@ -17,19 +15,22 @@ pip install ipyopenlayers

If you are using Jupyter Notebook 5.2 or earlier, you may also need to enable
the nbextension:

```bash
jupyter nbextension enable --py [--sys-prefix|--user|--system] ipyopenlayers
```

## Development Installation

Create a dev environment:

```bash
conda create -n ipyopenlayers-dev -c conda-forge nodejs python jupyterlab=4.0.11
conda activate ipyopenlayers-dev
```

Install the python. This will also build the TS package.

```bash
pip install -e ".[test, examples]"
```
Expand All @@ -55,7 +56,9 @@ you might also need another flag instead of `--sys-prefix`, but we won't cover t
of those flags here.

### How to see your changes

#### Typescript:

If you use JupyterLab to develop then you can watch the source directory and run JupyterLab at the same time in different
terminals to watch for changes in the extension's source and automatically rebuild the widget.

Expand All @@ -69,6 +72,7 @@ jupyter lab
After a change wait for the build to finish and then refresh your browser and the changes should take effect.

#### Python:

If you make a change to the python code then you will need to restart the notebook kernel to have it take effect.

## Updating the version
Expand All @@ -80,4 +84,3 @@ By default it will also create a tag.
pip install tbump
tbump <new-version>
```

2 changes: 1 addition & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ coverage:
default:
target: 0%
ignore:
- "ipyopenlayers/tests"
- 'ipyopenlayers/tests'
22 changes: 20 additions & 2 deletions css/widget.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
.custom-widget {
padding: 0px 2px;
.lm-Widget.lm-Panel.jp-OutputArea-output.ipyopenlayer-map-container-wrapper {
height: 100%;
}
.lm-Widget.lm-Panel.jp-OutputArea-child.jp-OutputArea-executeResult.ipyopenlayer-map-container-wrapper-parent {
height: 100%;
}

.ol-container {
height: 100%;
width: 100%;
}
.jp-LinkedOutputView .jupyter-widgets.ipyopenlayer-widgets {
min-height: 500px;
height: 100%;
}

.jupyter-widgets.ipyopenlayer-widgets {
height: 400px;
overflow: hidden;
flex: 1 1 auto;
}
1 change: 0 additions & 1 deletion docs/environment.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: ipyopenlayers_docs
channels:
- conda-forge
Expand Down
140,634 changes: 140,633 additions & 1 deletion examples/demo.json

Large diffs are not rendered by default.

Loading

0 comments on commit f7f6a7e

Please sign in to comment.