Skip to content

Commit

Permalink
chore: Use 'python -m pip' pattern for best practice
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewfeickert authored and mwouts committed Feb 3, 2023
1 parent ec966d4 commit e097422
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
python -m pip install -r requirements.txt
python -m pip install -r requirements-dev.txt
# install sphinx_gallery and matplotlib if available (may not work on pypy)
pip install sphinx_gallery~=0.7.0 || true
pip install jupyter-fs || true
python -m pip install sphinx_gallery~=0.7.0 || true
python -m pip install jupyter-fs || true
- name: Install from source (required for the pre-commit tests)
run: pip install .
run: python -m pip install .
- name: Install a Jupyter Kernel
run: python -m ipykernel install --name python_kernel --user
- name: Install Quarto
Expand Down Expand Up @@ -152,7 +152,7 @@ jobs:
- name: Install from source
# This is required for the pre-commit tests
shell: pwsh
run: pip install .
run: python -m pip install .
- name: Create kernel
shell: pwsh
run: |
Expand Down Expand Up @@ -190,8 +190,8 @@ jobs:
run: |
python -m pip install --upgrade pip
# All dependencies but markdown-it-py
pip install nbformat pyyaml toml
pip install -r requirements-dev.txt
python -m pip install nbformat pyyaml toml
python -m pip install -r requirements-dev.txt
- name: Install a Jupyter Kernel
run: python -m ipykernel install --name python_kernel --user
- name: Test with pytest
Expand All @@ -216,8 +216,8 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
python -m pip install -r requirements.txt
python -m pip install -r requirements-dev.txt
- name: Test with pytest
run: pytest --cov=./ --cov-report=xml
- name: Upload coverage
Expand All @@ -241,10 +241,10 @@ jobs:
run: |
python -m pip install --upgrade pip
# All dependencies but markdown-it-py
pip install -r requirements.txt
pip install -r requirements-dev.txt
python -m pip install -r requirements.txt
python -m pip install -r requirements-dev.txt
# Notebook pre-release version #933
pip install --pre -U notebook
python -m pip install --pre -U notebook
- name: Install a Jupyter Kernel
run: python -m ipykernel install --name python_kernel --user
- name: Test with pytest
Expand All @@ -264,7 +264,7 @@ jobs:
python-version: 3.9
- name: Build package
run: |
pip install wheel jupyter-packaging jupyterlab>=3
python -m pip install wheel jupyter-packaging jupyterlab>=3
BUILD_JUPYTERLAB_EXTENSION=1 python setup.py sdist bdist_wheel
# Don't publish a tar.gz file over 1MB (Issue #730)
if (($(wc -c < dist/*.tar.gz) > 1000000)); then exit 1; fi
Expand All @@ -274,7 +274,7 @@ jobs:
if (($(tar -tf dist/*.tar.gz | grep packages/labextension/package.json$ | wc -l)==0)); then echo "Missing lab extension" && exit 1; fi
if (($(tar -tf dist/*.tar.gz | grep jupytext/nbextension/index.js$ | wc -l)==0)); then echo "Missing notebook extension" && exit 1; fi
# Install
pip install dist/*.tar.gz
python -m pip install dist/*.tar.gz
echo "Install went OK"
publish:
name: Publish to PyPi
Expand All @@ -290,7 +290,7 @@ jobs:
python-version: 3.9
- name: Build package
run: |
pip install wheel jupyter-packaging jupyterlab>=3
python -m pip install wheel jupyter-packaging jupyterlab>=3
BUILD_JUPYTERLAB_EXTENSION=1 python setup.py sdist bdist_wheel
- name: Publish
uses: pypa/[email protected]
Expand Down

0 comments on commit e097422

Please sign in to comment.