Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ module.exports = {
}
],
"prefer-arrow-callback": "error",
"no-console": ["error", {"allow": ["error", "warn", "debug"]}],
"no-duplicate-imports": "error",
},
};
3 changes: 1 addition & 2 deletions packages/base/src/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,6 @@ export function addCommands(
if (!currentWidget || !completionProviderManager) {
return;
}
console.log('zooming');
const model = tracker.currentWidget.model;
const selectedItems = model.localState?.selected.value;

Expand Down Expand Up @@ -961,7 +960,7 @@ namespace Private {
const selected = model?.localState?.selected?.value;

if (!selected) {
console.info('Nothing selected');
console.error('Failed to remove selected item -- nothing selected');
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,6 @@ const Categorized: React.FC<ISymbologyTabbedDialogWithAttributesProps> = ({
const newStyle = { ...layer.parameters.color };

if (method === 'color') {
console.log('delecol');

delete newStyle['fill-color'];
delete newStyle['stroke-color'];
delete newStyle['circle-fill-color'];
Expand Down
2 changes: 1 addition & 1 deletion packages/base/src/mainview/mainView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2110,7 +2110,7 @@ export class MainView extends React.Component<IProps, IStates> {
const olLayer = this.getLayer(layerId);

if (!jgisLayer || !olLayer) {
console.log('Layer not found');
console.error('Failed to update layer -- layer not found');
return;
}

Expand Down
4 changes: 2 additions & 2 deletions packages/base/src/stacBrowser/hooks/useStacSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ function useStacSearch({ model }: IUseStacSearchProps): IUseStacSearchReturn {
)) as IStacSearchResult;

if (!data) {
console.log('No Results found');
console.debug('STAC search failed -- no results found');
setResults([]);
setTotalPages(1);
setTotalResults(0);
Expand All @@ -221,7 +221,7 @@ function useStacSearch({ model }: IUseStacSearchProps): IUseStacSearchReturn {
setTotalPages(Math.ceil(pages));
setTotalResults(data.context.matched);
} catch (error) {
console.error('Error fetching data:', error);
console.error('STAC search failed -- error fetching data:', error);
setResults([]);
setTotalPages(1);
setTotalResults(0);
Expand Down
5 changes: 4 additions & 1 deletion packages/base/src/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@ export async function requestAPI<T>(
try {
data = JSON.parse(data);
} catch (error) {
console.log('Not a JSON response body.', response);
console.error(
'Jupyter API request failed -- not a JSON response body:',
response,
);
}
}

Expand Down
3 changes: 1 addition & 2 deletions packages/schema/src/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ export class JupyterGISModel implements IJupyterGISModel {

setting.changed.connect(() => {
this._settings = setting.composite as any;
console.log('JupyterGIS Settings updated:', this._settings);
});
}
}
Expand Down Expand Up @@ -628,7 +627,7 @@ export class JupyterGISModel implements IJupyterGISModel {
layerTreeInfo.mainGroup,
);
} else {
console.log('Something went wrong when renaming layer');
console.error('Layer group rename failed -- could not get layer tree.');
}
}

Expand Down
5 changes: 1 addition & 4 deletions python/jupytergis_core/src/jgisplugin/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,8 @@ const activate = async (
window.jupytergisMaps = {};
}

let settings: ISettingRegistry.ISettings | null = null;

try {
settings = await settingRegistry.load(SETTINGS_ID);
console.log(`Loaded settings for ${SETTINGS_ID}`, settings);
await settingRegistry.load(SETTINGS_ID);
} catch (error) {
console.warn(`Failed to load settings for ${SETTINGS_ID}`, error);
}
Expand Down
3 changes: 0 additions & 3 deletions python/jupytergis_core/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ export const trackerPlugin: JupyterFrontEndPlugin<IJupyterGISTracker> = {
const tracker = new WidgetTracker<IJupyterGISWidget>({
namespace: NAME_SPACE,
});
console.log('jupytergis:core:tracker is activated!');
return tracker;
},
};
Expand Down Expand Up @@ -80,8 +79,6 @@ export const layerBrowserRegistryPlugin: JupyterFrontEndPlugin<IJGISLayerBrowser
requires: [],
provides: IJGISLayerBrowserRegistryToken,
activate: (app: JupyterFrontEnd) => {
console.log('jupytergis:core:layer-browser-registry is activated');

const registry = new JupyterGISLayerBrowserRegistry();
return registry;
},
Expand Down
1 change: 0 additions & 1 deletion python/jupytergis_lab/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ const plugin: JupyterFrontEndPlugin<void> = {
translator?: ITranslator,
completionProviderManager?: ICompletionProviderManager,
): void => {
console.log('jupytergis:lab:main-menu is activated!');
translator = translator ?? nullTranslator;
const isEnabled = (): boolean => {
return (
Expand Down
2 changes: 0 additions & 2 deletions python/jupytergis_qgis/src/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,6 @@ const activate = async (
});
}
}

console.log('@jupytergis/jupytergis-qgis:qgisplugin is activated!');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we keep these as console.debug? I figured it wasn't important to print this information, but I could be missing the point :)

};

export const qgisplugin: JupyterFrontEndPlugin<void> = {
Expand Down
Loading