Skip to content

Create the conda environment after downloading the extension artifacts #705

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

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
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
9 changes: 5 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: debug
run: ls

- name: Install Conda environment with Micromamba
uses: mamba-org/setup-micromamba@v2
with:
Expand All @@ -267,10 +270,7 @@ jobs:
with:
name: extension-artifacts

- name: debug
run: ls

- name: Install the extension
- name: Install the extension artifacts
shell: bash -l {0}
run: |
set -eux
Expand All @@ -279,6 +279,7 @@ jobs:
cp ./jupytergis_qgis/dist/jupytergis*.whl jupytergis_qgis-0.0.1-py3-none-any.whl
cp ./jupytergis_lite/dist/jupytergis*.whl jupytergis_lite-0.0.1-py3-none-any.whl
cp ./jupytergis/dist/jupytergis*.whl jupytergis-0.0.1-py3-none-any.whl
pip install ./jupytergis_core/dist/jupytergis*.whl ./jupytergis_lab/dist/jupytergis*.whl ./jupytergis_lite/dist/jupytergis*.whl ./jupytergis/dist/jupytergis*.whl
Copy link
Member

Choose a reason for hiding this comment

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

We're already handling the whls in the jupyterlite-xeus environment here: https://github.com/geojupyter/jupytergis/blob/main/lite/environment.yml#L18

I believe we should fix jupyterlite/xeus#227

Copy link
Member

Choose a reason for hiding this comment

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

Adding a note that we need to keep it that way so that the Python API of JupyterGIS is available in the emscripten environment.

Installing those wheels in the host environment will result in an unneeded (harmless but unneeded) duplication of labextensions, so I'd suggest not applying this change.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for opening this though! That made me realize the actual issue jupyterlite/xeus#227 which was fairly hard to understand 😅


- name: Build JupyterLite
shell: bash -l {0}
Expand Down
7 changes: 1 addition & 6 deletions packages/base/src/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -394,13 +394,8 @@ const fetchWithProxies = async <T>(
model: IJupyterGISModel,
parseResponse: (response: Response) => Promise<T>
): Promise<T | null> => {
let settings: any = null;

try {
settings = await model.getSettings();
} catch (e) {
console.warn('Failed to get settings from model. Falling back.', e);
}
const settings = await model.getSettings();

const proxyUrl =
settings && settings.proxyUrl ? settings.proxyUrl : 'https://corsproxy.io';
Expand Down
8 changes: 2 additions & 6 deletions python/jupytergis_core/src/jgisplugin/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,8 @@ const activate = async (

let settings: ISettingRegistry.ISettings | null = null;

try {
settings = await settingRegistry.load(SETTINGS_ID);
console.log(`Loaded settings for ${SETTINGS_ID}`, settings);
} catch (error) {
console.warn(`Failed to load settings for ${SETTINGS_ID}`, error);
}
settings = await settingRegistry.load(SETTINGS_ID);
console.log(`Loaded settings for ${SETTINGS_ID}`, settings);

const widgetFactory = new JupyterGISDocumentWidgetFactory({
name: FACTORY,
Expand Down
Loading