Skip to content

Commit

Permalink
Merge pull request #94 from Erotemic/dev/0.15.4
Browse files Browse the repository at this point in the history
Start branch for 0.15.4
  • Loading branch information
Erotemic authored Jan 29, 2021
2 parents 62552e9 + 2a089d8 commit b18d75a
Show file tree
Hide file tree
Showing 10 changed files with 71 additions and 202 deletions.
42 changes: 30 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ __doc__: &__doc__
Instructions:
Browse to:
https://app.circleci.com/settings/project/github/GITHUB_USER/PYPKG/environment-variables
https://app.circleci.com/settings/project/github/Erotemic/xdoctest/environment-variables
Do whatever you need to locally access the values of these variables
Expand Down Expand Up @@ -211,6 +211,7 @@ workflows:
version: 2
test:
jobs:
- test_full/cp310-310-linux
- test_full/cp39-39-linux
- test_full/cp38-38-linux
- test_full/cp37-37m-linux
Expand All @@ -219,6 +220,7 @@ workflows:
- test_full/cp34-34m-linux
- test_full/cp27-27mu-linux

- test_minimal/cp310-310-linux
- test_minimal/cp39-39-linux
- test_minimal/cp38-38-linux
- test_minimal/cp37-37m-linux
Expand Down Expand Up @@ -260,6 +262,7 @@ jobs:
- image: circleci/python
steps:
- checkout
#working_directory: ~/{{ .Environment.CIRCLE_JOB }}

.test_minimal_template: &test_minimal_template
<<:
Expand Down Expand Up @@ -289,12 +292,15 @@ jobs:
name: run tests
command: |
. venv/bin/activate
# pip install pytest-cov==2.8.1 # hack to avoid regression
#python run_tests.py
python -m pytest --cov=xdoctest --cov-config .coveragerc --cov-report term -s
$PYTHON_EXE run_tests.py
# Upload to codecov.io (requires a CODECOV_TOKEN environ or github+circleci integration)
codecov
- store_artifacts:
path: test-reports
destination: test-reports
- store_artifacts:
path: .coverage
destination: .coverage


.test_full_template: &test_full_template
Expand Down Expand Up @@ -325,12 +331,15 @@ jobs:
name: run tests
command: |
. venv/bin/activate
# pip install pytest-cov==2.8.1 # hack to avoid regression
#python run_tests.py
python -m pytest --cov=xdoctest --cov-config .coveragerc --cov-report term -s
$PYTHON_EXE run_tests.py
# Upload to codecov.io (requires a CODECOV_TOKEN environ or github+circleci integration)
codecov
- store_artifacts:
path: test-reports
destination: test-reports
- store_artifacts:
path: .coverage
destination: .coverage

.gpgsign_template: &gpgsign_template
<<:
Expand Down Expand Up @@ -395,20 +404,20 @@ jobs:
# Execute the publish script for real this time
MB_PYTHON_TAG=$MB_PYTHON_TAG DO_GPG=True GPG_KEYID=$GPG_KEYID TWINE_PASSWORD=$TWINE_PASSWORD TWINE_USERNAME=$TWINE_USERNAME GPG_EXECUTABLE=$GPG_EXECUTABLE CURRENT_BRANCH=release DEPLOY_BRANCH=release DO_UPLOAD=True DO_TAG=False ./publish.sh
# Have the server git-tag the release and push the tags
VERSION=$(python -c "import setup; print(setup.VERSION)")
VERSION=$($PYTHON_EXE -c "import setup; print(setup.VERSION)")
# do sed twice to handle the case of https clone with and without a read token
URL_HOST=$(git remote get-url origin | sed -e 's|https\?://.*@||g' | sed -e 's|https\?://||g')
echo "URL_HOST = $URL_HOST"
# A git config user name and email is required. Set if needed.
if [[ "$(git config user.email)" == "" ]; then
if [[ "$(git config user.email)" == "" ]]; then
git config user.email "[email protected]"
git config user.name "CircleCI"
fi
if [ $(git tag -l "$VERSION") ]; then
echo "Tag already exists"
else
git tag $VERSION -m "tarball tag $VERSION"
git push --tags "https://${GIT_PUSH_TOKEN}@${URL_HOST}"
else
echo "Tag already exists"
fi
Expand All @@ -421,6 +430,11 @@ jobs:
#
# All we need to do is change the base docker image so python is the
# version we want we can reuse everything else from the template
#
test_full/cp310-310-linux:
<<: *test_full_template
docker:
- image: circleci/python:3.10-rc

test_full/cp39-39-linux:
<<: *test_full_template
Expand Down Expand Up @@ -458,9 +472,13 @@ jobs:
- image: circleci/python:2.7

# ------------
test_minimal/cp310-310-linux:
<<: *test_minimal_template
docker:
- image: circleci/python:3.10-rc

test_minimal/cp39-39-linux:
<<: *test_full_template
<<: *test_minimal_template
docker:
- image: circleci/python:3.9

Expand Down
6 changes: 5 additions & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@ coverage:
range: "70...100"

status:
project: yes
project:
default:
threshold: 10%
patch: yes
changes: no



parsers:
gcov:
branch_detection:
Expand Down
12 changes: 9 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ We are currently working on porting this changelog to the specifications in
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## Version 0.15.3 - Unreleased
## Version 0.15.4 - Unreleased

### Fixed
* Minor issues with release tarballs.


## Version 0.15.3 - Released 2021-01-28

### Fixed
* Color issues on win32
Expand All @@ -15,13 +21,13 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
* Moved to CircleCI deploy scripts


## Version 0.15.2 - Unreleased
## Version 0.15.2 - Released 2021-01-28

### Fixed
* Bug where references to doctest variables were never released


## Version 0.15.1 - Unreleased
## Version 0.15.1 - Released 2021-01-28

### Added
* Documentation improvements
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ recursive-include docs *.txt
recursive-include docs Makefile
recursive-include requirements *.txt
recursive-include testing *.py
recursive-include testing *.ipynb
4 changes: 4 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Notes: Rolling Builds AKA Autocancel redundant builds
# https://www.appveyor.com/docs/build-configuration/#rolling-builds
# https://ci.appveyor.com/project/Erotemic/xdoctest/settings

image:
- Visual Studio 2015

Expand Down
12 changes: 8 additions & 4 deletions run_tests.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
if __name__ == '__main__':
import pytest
import sys
# NOTE: it is important to return the correct error code
sys.exit(pytest.main([
package_name = 'xdoctest'
pytest_args = [
'-p', 'pytester',
'-p', 'no:doctest',
'--cov=xdoctest',
'--cov-config', '.coveragerc',
'--cov-report', 'html',
'--cov-report', 'term',
'--xdoctest',
] + sys.argv[1:]))
'--cov=' + package_name,
package_name, 'testing'
]
pytest_args = pytest_args + sys.argv[1:]
sys.exit(pytest.main(pytest_args))
14 changes: 11 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
TODO:
look into pbr for versioning?
"""
from setuptools import setup
import sys
from os.path import exists
Expand Down Expand Up @@ -150,7 +154,11 @@ def native_mb_python_tag(plat_impl=None, version_info=None):
version_info = sys.version_info

major, minor = version_info[0:2]
ver = '{}{}'.format(major, minor)
major, minor = version_info[0:2]
if minor > 9:
ver = '{}_{}'.format(major, minor)
else:
ver = '{}{}'.format(major, minor)

if plat_impl == 'CPython':
# TODO: get if cp27m or cp27mu
Expand All @@ -162,8 +170,8 @@ def native_mb_python_tag(plat_impl=None, version_info=None):
else:
abi = 'm'
else:
if ver == '38':
# no abi in 38?
if sys.version_info[:2] >= (3, 8):
# bpo-36707: 3.8 dropped the m flag
abi = ''
else:
abi = 'm'
Expand Down
Loading

0 comments on commit b18d75a

Please sign in to comment.