-
Notifications
You must be signed in to change notification settings - Fork 391
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Use 'python -m pip' pattern for best practice
- Loading branch information
1 parent
ec966d4
commit e097422
Showing
1 changed file
with
16 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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: | | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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] | ||
|