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

Remove enableImmutableInstalls: false #39

Merged
merged 5 commits into from
Aug 16, 2023
Merged
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
10 changes: 6 additions & 4 deletions .github/workflows/check-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
working-directory: myextension
run: |
set -eux
jlpm
YARN_ENABLE_IMMUTABLE_INSTALLS=false jlpm
jlpm test

- name: Install the extension
Expand All @@ -47,10 +47,11 @@ jobs:
run: |
jupyter labextension list

- name: Install dependencies
- name: Install UI tests dependencies
working-directory: myextension/ui-tests
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
YARN_ENABLE_IMMUTABLE_INSTALLS: false
run: jlpm install

- name: Set up browser cache
Expand Down Expand Up @@ -100,16 +101,17 @@ jobs:
working-directory: myextension
run: |
set -eux
python -m pip install -v .
YARN_ENABLE_IMMUTABLE_INSTALLS=false python -m pip install -v .

- name: List extensions
run: |
jupyter labextension list

- name: Install dependencies
- name: Install UI tests dependencies
working-directory: myextension/ui-tests
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
YARN_ENABLE_IMMUTABLE_INSTALLS: false
run: jlpm install

- name: Set up browser cache
Expand Down
18 changes: 12 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
python -m copier copy -l -d author_name="My Name" -d labextension_name="${NAME}" -d python_name="${PYNAME}" -d repository="https://github.com/test/lab-extension" --vcs-ref HEAD --UNSAFE . ${NAME}
pushd ${NAME}
python -m pip install "jupyterlab>=4.0.0,<5"
jlpm
YARN_ENABLE_IMMUTABLE_INSTALLS=false jlpm
jlpm lint:check
python -m pip install -e .
jupyter labextension develop . --overwrite
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
python -m copier copy -l -d author_name="My Name" -d test=n -d repository="https://github.com/test/lab-extension" --vcs-ref HEAD --UNSAFE . myextension
pushd myextension
pip install "jupyterlab>=4.0.0,<5"
jlpm
YARN_ENABLE_IMMUTABLE_INSTALLS=false jlpm
jlpm lint:check
pip install -e .
jupyter labextension develop . --overwrite
Expand Down Expand Up @@ -136,7 +136,7 @@ jobs:
python -m copier copy -l -d author_name="My Name" -d has_settings=y -d repository="https://github.com/test/lab-extension" --vcs-ref HEAD --UNSAFE . myextension
pushd myextension
pip install "jupyterlab>=4.0.0,<5"
jlpm
YARN_ENABLE_IMMUTABLE_INSTALLS=false jlpm
# It is not easily possible to get this version compatible with linter rules
jlpm lint
jlpm lint:check
Expand Down Expand Up @@ -178,6 +178,8 @@ jobs:
git config --global user.email "github-actions[bot]@users.noreply.github.com"

- name: Create server extension pip install
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
run: |
mkdir myextension
python -m copier copy -l -d kind=server -d author_name="My Name" -d repository="https://github.com/test/lab-extension" --vcs-ref HEAD --UNSAFE . myextension
Expand All @@ -204,6 +206,8 @@ jobs:
shell: bash

- name: Create server extension pip develop
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
run: |
mkdir myextension
python -m copier copy -l -d kind=server -d author_name="My Name" -d repository="https://github.com/test/lab-extension" --vcs-ref HEAD --UNSAFE . myextension
Expand Down Expand Up @@ -242,6 +246,8 @@ jobs:
shell: bash

- name: Install server extension from a tarball
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
run: |
mkdir myextension
python -m copier copy -l -d kind=server -d author_name="My Name" -d repository="https://github.com/test/lab-extension" --vcs-ref HEAD --UNSAFE . myextension
Expand Down Expand Up @@ -348,7 +354,7 @@ jobs:
python -m copier copy -l -d kind=theme -d author_name="My Name" -d repository="https://github.com/test/lab-extension" --vcs-ref HEAD --UNSAFE . mytheme
pushd mytheme
python -m pip install "jupyterlab>=4.0.0,<5"
jlpm
YARN_ENABLE_IMMUTABLE_INSTALLS=false jlpm
jlpm lint:check
python -m pip install -e .
jupyter labextension develop . --overwrite
Expand Down Expand Up @@ -392,7 +398,7 @@ jobs:
python -m copier copy -l -d kind=mimerenderer -d viewer_name="My Viewer" -d mimetype="application/vnd.my_org.my_type" -d mimetype_name="my_type" -d file_extension=".my_type" -d author_name="My Name" -d repository="https://github.com/test/lab-extension" --vcs-ref HEAD --UNSAFE . myextension
pushd myextension
python -m pip install "jupyterlab>=4.0.0,<5"
jlpm
YARN_ENABLE_IMMUTABLE_INSTALLS=false jlpm
jlpm lint:check
python -m pip install -e .
jupyter labextension develop . --overwrite
Expand Down Expand Up @@ -438,7 +444,7 @@ jobs:
pushd myextension
sed -i 's/^\(nodeLinker:\s\).*$/\1pnpm/' .yarnrc.yml
python -m pip install "jupyterlab>=4.0.0,<5"
jlpm
YARN_ENABLE_IMMUTABLE_INSTALLS=false jlpm
if [ ! -d node_modules/.store ] ; then echo 'nodes_module directory should contain a .store directory when using pnpm nodeLinker'; exit 1; fi;
jlpm build
popd
Expand Down
2 changes: 0 additions & 2 deletions template/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
enableImmutableInstalls: false

nodeLinker: node-modules
4 changes: 2 additions & 2 deletions template/{% if test %}ui-tests{% endif %}/package.json.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"test:update": "jlpm playwright test --update-snapshots"
},
"devDependencies": {
"@jupyterlab/galata": "^5.0.0",
"@playwright/test": "^1.32.0"
"@jupyterlab/galata": "^5.0.5",
"@playwright/test": "^1.37.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ test('should emit an activation console message', async ({ page }) => {

await page.getByRole('button', { name: 'Rename' }).click();

// Close file opened as editor
await page.activity.closePanel('test.my_type');
Copy link
Member Author

Choose a reason for hiding this comment

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

@jtpio @krassowski I would like your input on this.

With 4.0.5, the page.filebrowser.open(filename) code now fails if a file is opened multiple times (different viewers) as in this case. My question, should it be fixed per test as here or fix upstream by allowing to find any number of panel opened for a given filename?

Copy link
Member

@jtpio jtpio Aug 16, 2023

Choose a reason for hiding this comment

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

(different viewers) as in this case. My question, should it be fixed per test as here or fix upstream by allowing to find any number of panel opened for a given filename?

I would say upstream ideally? Could this also fix jupyterlab/jupyterlab#10969 maybe?

Copy link
Member Author

Choose a reason for hiding this comment

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


await page.filebrowser.open(filename);

const view = page.getByRole('main').locator('.mimerenderer-{{ mimetype_name }}');
Expand Down
Loading