-
Notifications
You must be signed in to change notification settings - Fork 87
Support profile regex #261
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
Open
IliaFeldgun
wants to merge
5
commits into
man-group:master
Choose a base branch
from
IliaFeldgun:support-profile-regex
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
1b7d62a
all: fix: Change runner to modern pytest runner
IliaFeldgun ec373e3
pytest-profiling: feat: support cProfile output filtering via regex
IliaFeldgun cb9ef5c
ubuntu-20 depreacted in circle-ci
IliaFeldgun 706254e
install versioned pips and versioned distutils
IliaFeldgun 0e48638
pytest-virtualenv: fix: Preserve python3.7 test behaviour while suppo…
IliaFeldgun File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 +1 @@ | ||
| 1.8.1 | ||
| 1.9.0 |
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -28,28 +28,33 @@ function install_python_ppa { | |
| function install_python_packaging { | ||
| local py=$1 | ||
| $py -m pip install --upgrade pip | ||
| $py -m pip install --upgrade setuptools | ||
| $py -m pip install --upgrade setuptools wheel | ||
| $py -m pip install --upgrade packaging | ||
| $py -m pip install --upgrade virtualenv | ||
| } | ||
|
|
||
|
|
||
| function install_python { | ||
| local py=$1 | ||
| sudo apt-get install -y $py $py-dev | ||
| sudo apt-get install -y $py | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. deadsnakes-ppa py3.6 is no longer supported, apt-get install succeeds with no op. |
||
| local version=$(echo $py | grep -oP '(?<=python)\d+\.\d+') | ||
|
|
||
| if [ "$version" = "3.6" ] || [ "$version" = "3.7" ]; then | ||
| sudo apt-get install ${py}-distutils || { | ||
| curl --silent --show-error --retry 5 https://bootstrap.pypa.io/pip/$version/get-pip.py | sudo $py | ||
| sudo $py -m pip install setuptools | ||
| } | ||
| elif [ "$version" = "3.10" ] || [ "$version" = "3.11" ] || [ "$version" = "3.12" ]; then | ||
| sudo apt-get install ${py}-distutils | ||
| curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo $py | ||
| else | ||
| sudo apt-get install ${py} | ||
| curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo $py | ||
| fi | ||
| case $version in | ||
| "3.6" | "3.7" | "3.8" | "3.9" ) | ||
| sudo apt-get install -y $py-distutils | ||
| ;; | ||
| *) | ||
| echo "" | ||
| ;; | ||
| esac | ||
|
|
||
| case $version in | ||
| "3.6" | "3.7" | "3.8" ) | ||
| curl --silent --show-error --retry 5 https://bootstrap.pypa.io/pip/$version/get-pip.py | sudo $py | ||
| ;; | ||
| *) | ||
| curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo $py | ||
| ;; | ||
| esac | ||
| install_python_packaging $py | ||
| } | ||
|
|
||
|
|
@@ -92,7 +97,7 @@ function install_windows_python() { | |
|
|
||
| function init_venv { | ||
| local py=$1 | ||
| virtualenv venv --python=$py | ||
| $py -m virtualenv venv | ||
| if [ -f venv/Scripts/activate ]; then | ||
| . venv/Scripts/activate | ||
| else | ||
|
|
@@ -106,11 +111,13 @@ function update_apt_sources { | |
| curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key | gpg --dearmor -o /usr/share/keyrings/jenkins-archive-keyring.gpg | ||
| echo "deb [signed-by=/usr/share/keyrings/jenkins-archive-keyring.gpg] https://pkg.jenkins.io/debian-stable binary/" | tee /etc/apt/sources.list.d/jenkins.list > /dev/null | ||
|
|
||
| # Add MongoDB GPG key and repository | ||
| curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | \ | ||
| sudo gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg \ | ||
| --dearmor | ||
| echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list | ||
| MONGODB_MAJOR="8.0" | ||
| MONGODB_MINOR="8.2" | ||
| curl -fsSL https://www.mongodb.org/static/pgp/server-${MONGODB_MAJOR}.asc | \ | ||
| gpg -o /usr/share/keyrings/mongodb-server-${MONGODB_MAJOR}.gpg \ | ||
| --dearmor | ||
| echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-${MONGODB_MAJOR}.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/${MONGODB_MINOR} multiverse" | tee /etc/apt/sources.list.d/mongodb-org-${MONGODB_MINOR}.list | ||
|
|
||
|
|
||
| apt install ca-certificates | ||
| apt-get update | ||
|
|
@@ -145,7 +152,7 @@ function install_jenkins { | |
| } | ||
|
|
||
| function install_mongodb { | ||
| apt-get install -y mongodb mongodb-server | ||
| apt-get install -y mongodb-org | ||
| } | ||
|
|
||
| function install_apache { | ||
|
|
||
This file contains hidden or 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 hidden or 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
6 changes: 6 additions & 0 deletions
6
pytest-profiling/tests/integration/profile/tests/unit/test_regex.py
This file contains hidden or 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,6 @@ | ||
| import os | ||
|
|
||
|
|
||
| def test_regex(): | ||
| os.makedirs("bar", exist_ok=True) | ||
| os.chdir("bar") |
This file contains hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -89,7 +89,6 @@ def get_args(self, **kwargs): | |
| '--port=%s' % self.port, | ||
| '--nounixsocket', | ||
| '--syncdelay=0', | ||
| '--nojournal', | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unsupported anymore |
||
| '--quiet', | ||
| ] | ||
|
|
||
|
|
||
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically ubuntu 20 is unsupported