-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cut over to devpi for tests and improve logging
- Verbose logs will now write gracefully to the terminal even while the spinner is running (i.e. during locking) - This PR also cuts over to Devpi for a backing cache rather than a hacked httpbin instance - Inclues a refactor of `pip_install` to deduplicate logic - Attempts to switch back to relying on native editable installs in pip as the current implementation is broken on master (i.e. nothing is installed in the virtualenv) - Fixes #3809 Signed-off-by: Dan Ryan <[email protected]>
- Loading branch information
1 parent
548109c
commit 1d79bbf
Showing
27 changed files
with
1,033 additions
and
563 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
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 |
---|---|---|
@@ -1,4 +1,50 @@ | ||
get_venv_dir:=$(shell mktemp -d 2>/dev/null || mktemp -d -t 'tmpvenv') | ||
venv_dir := $(get_venv_dir)/pipenv_venv | ||
venv_file := $(CURDIR)/.test_venv | ||
get_venv_path =$(file < $(venv_file)) | ||
|
||
format: | ||
black pipenv/*.py | ||
test: | ||
docker-compose up | ||
|
||
.PHONY: ramdisk | ||
ramdisk: | ||
sudo mkdir -p /mnt/ramdisk | ||
sudo mount -t tmpfs -o size=2g tmpfs /mnt/ramdisk | ||
sudo chown -R ${USER}:${USER} /mnt/ramdisk | ||
|
||
.PHONY: ramdisk-virtualenv | ||
ramdisk-virtualenv: ramdisk | ||
[ ! -e "/mnt/ramdisk/.venv/bin/activate" ] && \ | ||
python -m virtualenv /mnt/ramdisk/.venv | ||
@echo "/mnt/ramdisk/.venv" >> $(venv_file) | ||
|
||
.PHONY: virtualenv | ||
virtualenv: | ||
[ ! -e $(venv_dir) ] && rm -rf $(venv_file) && python -m virtualenv $(venv_dir) | ||
@echo $(venv_dir) >> $(venv_file) | ||
|
||
.PHONY: test-install | ||
test-install: virtualenv | ||
. $(get_venv_path)/bin/activate && \ | ||
python -m pip install --upgrade pip virtualenv -e .[tests,dev] && \ | ||
pipenv install --dev | ||
|
||
.PHONY: submodules | ||
submodules: | ||
git submodule sync | ||
git submodule update --init --recursive | ||
|
||
.PHONY: tests | ||
tests: virtualenv submodules test-install | ||
. $(get_venv_path)/bin/activate && \ | ||
pipenv run pytest -ra -vvv --full-trace --tb=long | ||
|
||
.PHONY: test-specific | ||
test-specific: submodules virtualenv test-install | ||
. $(get_venv_path)/bin/activate && pipenv run pytest -ra -k '$(tests)' | ||
|
||
.PHONY: retest | ||
retest: virtualenv submodules test-install | ||
. $(get_venv_path)/bin/activate && pipenv run pytest -ra -k 'test_check_unused or test_install_editable_git_tag or test_get_vcs_refs or test_skip_requirements_when_pipfile or test_editable_vcs_install or test_basic_vcs_install or test_git_vcs_install or test_ssh_vcs_install or test_vcs_can_use_markers' -vvv --full-trace --tb=long |
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
Fixed several bugs which could prevent editable VCS dependencies from being installed into target environments, even when reporting successful installation. |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
Improved verbose logging output during ``pipenv lock`` will now stream output to the console while maintaining a spinner. |
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
Oops, something went wrong.