Skip to content

Commit

Permalink
Revert "Merge branch 'xli-ai-duckdb' of github.com:keplergl/kepler.gl…
Browse files Browse the repository at this point in the history
… into duckdb-plugin"

This reverts commit 9881670, reversing
changes made to 66ac4d4.
  • Loading branch information
ilyabo committed Dec 16, 2024
1 parent 9881670 commit dc3504d
Show file tree
Hide file tree
Showing 93 changed files with 3,662 additions and 4,250 deletions.
11 changes: 0 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,6 @@ Each version should:
Ref: http://keepachangelog.com/en/0.3.0/
-->

## [3.1.0-alpha.1] - December 3 2024

- f6b37c6af [fix] fixes for exported maps
- 979c9a5a1 [fix] align upload icon (#2799)
- 6862eb85c [fix] Fix for Try Sample Data (#2796)
- f4f7fd2b4 [fix] fix examples - proper publicPath to include bundle chunks (#2795)
- 7ca7f9178 [chore] prepublishOnly command fixes (#2793)
- 40c6c8b09 [chore] npmpublish fixes - set npm registry manually (#2792)
- f60b94f48 [chore] fix npmpublish action (#2791)
- e77981e13 [chore] fix for package publishing (#2790)

## [3.1.0-alpha.0] - November 26 2024

- 5b4f6537 [feat] create new dataset action (#2778)
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
<a href='https://app.fossa.com/projects/custom%2B4458%2Fgit.luolix.top%2Fkeplergl%2Fkepler.gl?ref=badge_shield'>
<img src='https://app.fossa.com/api/projects/custom%2B4458%2Fgit.luolix.top%2Fkeplergl%2Fkepler.gl.svg?type=shield' alt='Fossa' />
</a>
<a href="https://app.netlify.com/sites/keplergl/deploys">
<img src="https://api.netlify.com/api/v1/badges/0c9b895c-acd0-43fd-8af7-fe960181b686/deploy-status" alt="Netlify Status"/>
<a href="https://app.netlify.com/sites/keplergl/deploys" alt="Netlify Status">
<img src="https://api.netlify.com/api/v1/badges/0c9b895c-acd0-43fd-8af7-fe960181b686/deploy-status" />
</a>
<a href='https://coveralls.io/github/keplergl/kepler.gl?branch=master'>
<img src='https://coveralls.io/repos/github/keplergl/kepler.gl/badge.svg?branch=master' alt='Coverage Status' />
</a>
</p>

<h1 align="center">
kepler.gl | <a href="https://kepler.gl">Website</a> | <a href="https://kepler.gl/#/demo">Demo App</a> | <a href="https://docs.kepler.gl/">Docs</a>
kepler.gl | <a href="http://kepler.gl">Website</a> | <a href="http://kepler.gl/#/demo">Demo App</a> | <a href="https://docs.kepler.gl/">Docs</a>
</h1>
<h3></h3>

Expand Down Expand Up @@ -54,29 +54,29 @@ Kepler.gl is also a React component that uses [Redux](https://redux.js.org/) to
Use Node 18.18.2 or above, older node versions have not been supported/ tested.
For best results, use [nvm](https://github.com/creationix/nvm) `nvm install`.

## Install kepler.gl modules
## Install kepler.gl

Kepler.gl consists of different modules. Each module can be added to the project like this:
Install node (`> 18.18.2`), yarn, and project dependencies

```sh
npm install --save @kepler.gl/components
npm install --save kepler.gl
// or
yarn add @kepler.gl/components
yarn add kepler.gl
```

kepler.gl is built upon [mapbox][mapbox]. You will need a [Mapbox Access Token][mapbox-token] to use it.

If you don't use a module bundler, it's also fine. Kepler.gl npm package includes precompiled production UMD builds in the [umd folder](https://unpkg.com/kepler.gl/umd).
You can add the script tag to your html file as it follows (latest version of Kepler.gl):
You can add the script tag to your html file as it follows:

```html
<script src="https://unpkg.com/kepler.gl/umd/keplergl.min.js" />
```
or if you would like, you can load a specific version:
or if you would like, you can load a specific version
```html
<script src="https://unpkg.com/kepler.gl@3.0.0/umd/keplergl.min.js" />
<script src="https://unpkg.com/kepler.gl@2.5.5/umd/keplergl.min.js" />
```
## Develop kepler.gl
Expand Down
6 changes: 3 additions & 3 deletions bindings/kepler.gl-jupyter/js/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8382,8 +8382,8 @@ __metadata:
linkType: hard

"elliptic@npm:^6.5.3, elliptic@npm:^6.5.5":
version: 6.6.1
resolution: "elliptic@npm:6.6.1"
version: 6.5.7
resolution: "elliptic@npm:6.5.7"
dependencies:
bn.js: "npm:^4.11.9"
brorand: "npm:^1.1.0"
Expand All @@ -8392,7 +8392,7 @@ __metadata:
inherits: "npm:^2.0.4"
minimalistic-assert: "npm:^1.0.1"
minimalistic-crypto-utils: "npm:^1.0.1"
checksum: 10c0/8b24ef782eec8b472053793ea1e91ae6bee41afffdfcb78a81c0a53b191e715cbe1292aa07165958a9bbe675bd0955142560b1a007ffce7d6c765bcaf951a867
checksum: 10c0/799959b6c54ea3564e8961f35abdf8c77e37617f3051614b05ab1fb6a04ddb65bd1caa75ed1bae375b15dda312a0f79fed26ebe76ecf05c5a7af244152a601b8
languageName: node
linkType: hard

Expand Down
35 changes: 5 additions & 30 deletions contributing/DEVELOPERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ explains the basic mechanics of using `git`, `node`, `yarn`.

### Installing Dependencies

Before you can build Kepler.gl, you must install and configure the following dependencies on your machine:
Before you can build Kepler.gl, you must install and configure the following dependencies on your
machine:

- [Git](http://git-scm.com/): The [Github Guide to Installing Git][git-setup] is a good source of information.

Expand All @@ -42,12 +43,6 @@ If you plan to contribute code to kepler.gl, you must have a [GitHub account](ht

#### Developing kepler.gl

If you are using Windows then using `WSL (Windows Subsystem for Linux)` is recommended. You can download a Linux Distribution like e.g. `Ubuntu` and inside of that distribution you can follow along with the next steps. You can find the detailed instructions about `WSL` [here](https://learn.microsoft.com/en-us/windows/wsl/).

If you are using MacOS or Linux then you can follow along.

Also please make sure the code editor you are using it has proper support for [EditorConfig](https://editorconfig.org/).VSCode has the [EditorConfig for VS Code](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig) Plugin. Please install necessary support for EditorConfig for your editor so that other code formatters do not have an effect on the Kepler.GL code.

To develop features, debug code, run tests, we use webpack to start a local web server and serve the kepler.gl demo app from the src directory.

```bash
Expand All @@ -68,25 +63,13 @@ On Unix, MacOS
# install Volta on Unix
curl https://get.volta.sh | bash
```

On Windows

```bash
winget install Volta.Volta
```

Install `nvm` to set the proper Node.js version for the project. Follow instructions to install nvm [here](https://github.com/nvm-sh/nvm).

```bash
# Install the proper Node.js version for the Kepler.gl project
nvm install

# Use the downloaded Node.js version for the Kepler.gl project
nvm use

# Enable Yarn
corepack enable
```

Install dependencies with Yarn

```bash
Expand All @@ -98,16 +81,8 @@ yarn global add puppeteer
yarn install
yarn bootstrap

# Setup Mapbox access token locally
export MapboxAccessToken=<MapboxAccessToken>
# Set up other environment variables
export DropboxClientId=<DropboxClientId>
export MapboxExportToken=<MapboxExportToken>
export CartoClientId=<CartoClientId>
export FoursquareClientId=<FoursquareClientId>
export FoursquareDomain=<FoursquareDomain>
export FoursquareAPIURL=<FoursquareAPIURL>
export FoursquareUserMapsURL=<FoursquareUserMapsURL>
# Setup mapbox access token locally
export MapboxAccessToken=<insert_your_token>

# Start the kepler.gl demo app
yarn start
Expand Down
2 changes: 1 addition & 1 deletion docs/api-reference/custom-theme/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ You can pass theme name or object used to customize Kepler.gl style. Kepler.gl p


```js
import KeplerGl from '@kepler.gl/components';
import KeplerGl from 'kepler.gl';

const Map = props => (
<KeplerGl
Expand Down
58 changes: 0 additions & 58 deletions esbuild/umd-esbuild.config.mjs

This file was deleted.

3 changes: 1 addition & 2 deletions examples/demo-app/esbuild.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ const config = {
'process.env.FoursquareClientId': JSON.stringify(process.env.FoursquareClientId || ''),
'process.env.FoursquareDomain': JSON.stringify(process.env.FoursquareDomain || ''),
'process.env.FoursquareAPIURL': JSON.stringify(process.env.FoursquareAPIURL || ''),
'process.env.FoursquareUserMapsURL': JSON.stringify(process.env.FoursquareUserMapsURL || ''),
'process.env.OpenAIToken': JSON.stringify(process.env.OpenAIToken || '')
'process.env.FoursquareUserMapsURL': JSON.stringify(process.env.FoursquareUserMapsURL || '')
},
plugins: [
// automatically injected kepler.gl package version into the bundle
Expand Down
14 changes: 3 additions & 11 deletions examples/demo-app/src/app.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
// SPDX-License-Identifier: MIT
// Copyright contributors to the kepler.gl project

import React, {useCallback, useEffect, useRef, useMemo, useState} from 'react';
import React, {useCallback, useEffect, useMemo, useState} from 'react';
import AutoSizer from 'react-virtualized/dist/commonjs/AutoSizer';
import styled, {ThemeProvider} from 'styled-components';
import window from 'global/window';
import {connect, useDispatch} from 'react-redux';
import cloneDeep from 'lodash.clonedeep';
import isEqual from 'lodash.isequal';

import {ScreenshotWrapper} from 'react-ai-assist';
import {
Expand Down Expand Up @@ -130,26 +129,19 @@ const App = props => {
state => state?.demo?.keplerGl?.map?.uiState.mapControls.sqlPanel.active
);

const prevQueryRef = useRef<number>(null);

useEffect(() => {
// if we pass an id as part of the url
// we try to fetch along map configurations
// we ry to fetch along map configurations

const cloudProvider = CLOUD_PROVIDERS.find(c => c.name === provider);
if (cloudProvider) {
// Prevent constant reloading after change of the location
if (isEqual(prevQueryRef.current, {provider, id, query})) {
return;
}

dispatch(
loadCloudMap({
loadParams: query,
provider: cloudProvider,
onSuccess: onLoadCloudMapSuccess
})
);
prevQueryRef.current = {provider, id, query};
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@ import {Auth0Client} from '@auth0/auth0-spa-js';

const NAME = 'foursquare';
const DISPLAY_NAME = 'Foursquare';
const STORAGE_MESSAGE = 'modal.loadStorageMap.foursquareStorageMessage';

const APP_NAME = 'Kepler.gl';

const FOURSQUARE_PRIVATE_STORAGE_ENABLED = true;
const FOURSQUARE_SHARING_ENABLED = false;
const FOURSQUARE_AUTH_AUDIENCE = 'https://foursquare.com/api/';
const FOURSQUARE_AUTH_SCOPE = 'openid profile email';

Expand All @@ -38,22 +35,6 @@ function convertFSQModelToMapItem(model, baseApi) {
};
}

/**
* Custom Auth0 popup window to change window height to fit FSQ auth window.
*/
export const openPopup = url => {
const width = 400;
const height = 765;
const left = window.screenX + (window.innerWidth - width) / 2;
const top = window.screenY + (window.innerHeight - height) / 2;

return window.open(
url,
'auth0:authorize:popup',
`left=${left},top=${top},width=${width},height=${height},resizable,scrollbars=yes,status=1`
);
};

function extractMapFromFSQResponse(response) {
const {
latestState: {data}
Expand All @@ -63,7 +44,7 @@ function extractMapFromFSQResponse(response) {

export default class FoursquareProvider extends Provider {
constructor({clientId, authDomain, apiURL, userMapsURL}) {
super({name: NAME, displayName: DISPLAY_NAME, storageMessage: STORAGE_MESSAGE, icon: FSQIcon});
super({name: NAME, displayName: DISPLAY_NAME, icon: FSQIcon});
this.icon = FSQIcon;
this.appName = APP_NAME;
this.apiURL = apiURL;
Expand All @@ -88,16 +69,12 @@ export default class FoursquareProvider extends Provider {
return FOURSQUARE_PRIVATE_STORAGE_ENABLED;
}

hasSharingUrl() {
return FOURSQUARE_SHARING_ENABLED;
}

async getUser() {
return this._auth0.getUser();
}

async login() {
return this._auth0.loginWithPopup(undefined, {popup: openPopup()});
return this._auth0.loginWithPopup();
}

async logout() {
Expand Down Expand Up @@ -133,9 +110,9 @@ export default class FoursquareProvider extends Provider {
}
);

const createdMap = await mapResponse.json();
const createMap = await mapResponse.json();

await fetch(`${this.apiURL}/v1/maps/${createdMap.id}/thumbnail`, {
await fetch(`${this.apiURL}/v1/maps/${createMap.id}/thumbnail`, {
method: 'PUT',
headers: {
...headers,
Expand All @@ -162,19 +139,9 @@ export default class FoursquareProvider extends Provider {
}

async downloadMap(loadParams) {
let {id, path} = loadParams;
if (!id) {
// try to get map id from foursquare map path
if (typeof path === 'string') {
const pathId = /((\w{4,12}-?)){5}/.exec(path)[0];
if (pathId) {
id = pathId;
}
}
}

const {id} = loadParams;
if (!id) {
return Promise.reject('No Map id was provider as part of loadParams');
return Promise.reject('No Map is was provider as part of loadParams');
}
const headers = await this.getHeaders();

Expand All @@ -193,7 +160,7 @@ export default class FoursquareProvider extends Provider {

getMapUrl(loadParams) {
const {id} = loadParams;
return id ? `${this.apiURL}/v1/maps/${id}` : null;
return `${this.apiURL}/v1/maps/${id}`;
}

getManagementUrl() {
Expand Down
Loading

0 comments on commit dc3504d

Please sign in to comment.