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

Debug installation methods #1671

Merged
merged 10 commits into from
Sep 30, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/test-docs-python-nbextensions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,16 @@ jobs:
if: matrix.group == 'docs'
run: |
sudo apt-get install pandoc
# Remove node
sudo rm -rf $(which node)
sudo rm -rf $(which node)
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip wheel setuptools
python tasks.py install --group="$GROUP"
pip freeze
- name: Install Playwright
if: matrix.group != 'docs'
run: |
npx playwright install
- name: Run pytest
Expand All @@ -87,3 +91,28 @@ jobs:
# - name: Submit codecov report
# run: |
# codecov

make_sdist:
name: Make SDist
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- uses: jupyterlab/maintainer-tools/.github/actions/make-sdist@v1

test_sdist:
runs-on: ubuntu-latest
needs: [make_sdist]
name: Install from SDist and Test
timeout-minutes: 20
steps:
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Remove node
run: |
sudo rm -rf $(which node)
sudo rm -rf $(which node)
- uses: jupyterlab/maintainer-tools/.github/actions/test-sdist@v1
with:
package_spec: '--editable ."[tests]"'
test_command: python -m pytest -vv nbgrader/tests/api || python -m pytest -vv nbgrader/tests/api --lf
18 changes: 0 additions & 18 deletions buildapi.py

This file was deleted.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ exclude = [

[tool.hatch.build.hooks.jupyter-builder]
dependencies = [
"hatch-jupyter-builder>=0.6.2",
"hatch-jupyter-builder>=0.7",
]
build-function = "buildapi.builder"
build-function = "hatch_jupyter_builder.npm_builder"
ensured-targets = [
"nbgrader/labextension/static/style.js",
"nbgrader/labextension/package.json",
Expand Down
4 changes: 2 additions & 2 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@ def js(args):

def install(args):
if args.group == 'docs':
cmd = 'pip install -e .[docs,tests]'
cmd = 'pip install .[docs,tests]'
else:
cmd = 'pip install -e .[tests]'

env = os.environ.copy()
if args.group not in ['all', 'labextensions']:
env['NBGRADER_NO_LAB'] = '1'
env['SKIP_JUPYTER_BUILDER'] = '1'
run(cmd, env=env)


Expand Down