Skip to content

Commit

Permalink
Merge pull request #85 from Erotemic/dev/0.10.0
Browse files Browse the repository at this point in the history
Dev/0.10.0
  • Loading branch information
Erotemic authored Aug 22, 2021
2 parents 4f103b1 + a20f210 commit 725805f
Show file tree
Hide file tree
Showing 38 changed files with 2,395 additions and 576 deletions.
92 changes: 55 additions & 37 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
__doc__: &__doc__
- |
__doc__="""
============
CIRCLECI INSTRUCTIONS
============
Expand Down Expand Up @@ -66,10 +64,26 @@ __doc__: &__doc__
This is only needed if you want to automatically sign published
wheels with a gpg key.
* GITHUB_PUSH_TOKEN -
This is only needed if you want to automatically git-tag release branches.
* PERSONAL_GITHUB_PUSH_TOKEN -
This is only needed if you want to automatically git-tag release
branches. This token is global to an entire account, so it only
needs to be done once per user.
To create this token go to:
https://github.com/settings/tokens/new
And create a token with "write:packages" checked.
Name (via the Note field) the token something like "github-push-token".
Copy the value of that token and store it somewhere secure (like a
secret environment file).
The environment variable should have the form:
PERSONAL_GITHUB_PUSH_TOKEN="{token-name}:{token-password}"
For instance it may look like this:
PERSONAL_GITHUB_PUSH_TOKEN=git-push-token:thisshouldbealongrandomsecretstringfj62fdsla
To make a API token go to:
Other References:
https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token
Instructions:
Expand All @@ -80,7 +94,7 @@ __doc__: &__doc__
Do whatever you need to locally access the values of these variables
echo $TWINE_USERNAME
echo $GITHUB_PUSH_TOKEN
echo $PERSONAL_GITHUB_PUSH_TOKEN
echo $CIRCLE_CI_SECRET
echo $TWINE_PASSWORD
Expand Down Expand Up @@ -122,7 +136,7 @@ __doc__: &__doc__
export TWINE_USERNAME=<pypi-username>
export TWINE_PASSWORD=<pypi-password>
export CIRCLE_CI_SECRET="<a-very-long-secret-string>"
export GITHUB_PUSH_TOKEN='git-push-token:<token-password>'
export PERSONAL_GITHUB_PUSH_TOKEN='git-push-token:<token-password>'
```
You should also make a secret_unloader.sh that points to a script that
Expand Down Expand Up @@ -180,10 +194,10 @@ __doc__: &__doc__
```
TEST GITHUB_PUSH_TOKEN
TEST PERSONAL_GITHUB_PUSH_TOKEN
-------------------
The following script tests if your GITHUB_PUSH_TOKEN environment variable is correctly setup.
The following script tests if your PERSONAL_GITHUB_PUSH_TOKEN environment variable is correctly setup.
```bash
docker run -it ubuntu
Expand All @@ -193,30 +207,27 @@ __doc__: &__doc__
# do sed twice to handle the case of https clone with and without a read token
git config user.email "[email protected]"
git config user.name "CircleCI-User"
URL_HOST=$(git remote get-url origin | sed -e 's|https\?://.*@||g' | sed -e 's|https\?://||g')
URL_HOST=$(git remote get-url origin | sed -e 's|https\?://.*@||g' | sed -e 's|https\?://||g' | sed -e 's|git@||g' | sed -e 's|:|/|g')
echo "URL_HOST = $URL_HOST"
git tag "test-tag4"
git push --tags "https://${GITHUB_PUSH_TOKEN}@${URL_HOST}"
git push --tags "https://${PERSONAL_GITHUB_PUSH_TOKEN}@${URL_HOST}"
# Cleanup after you verify the tags shows up on the remote
git push --delete origin test-tag4
git tag --delete test-tag4
```
""" # " # hack for vim yml syntax highlighter
version: 2
workflows:
version: 2
test:
jobs:
#- test_full/cp3_10-3_10-linux:
# filters: &__ignore_release__ # this yaml anchor to ignore tests on the release branch
# branches:
# ignore:
# - release
#- test_full/cp3_10-3_10-linux:
# filters: &__ignore_release__ # this yaml anchor to ignore tests on the release branch
# branches:
# ignore:
# - release
- test_full/cp39-39-linux:
filters: &__ignore_release__ # this yaml anchor to ignore tests on the release branch
branches:
Expand All @@ -234,9 +245,9 @@ workflows:
- test_full/cp35-35m-linux:
filters:
<<: *__ignore_release__
- test_full/cp34-34m-linux:
filters:
<<: *__ignore_release__
#- test_full/cp34-34m-linux:
# filters:
# <<: *__ignore_release__
- test_full/cp27-27mu-linux:
filters:
<<: *__ignore_release__
Expand All @@ -259,9 +270,9 @@ workflows:
- test_minimal/cp35-35m-linux:
filters:
<<: *__ignore_release__
- test_minimal/cp34-34m-linux:
filters:
<<: *__ignore_release__
#- test_minimal/cp34-34m-linux:
# filters:
# <<: *__ignore_release__
- test_minimal/cp27-27mu-linux:
filters:
<<: *__ignore_release__
Expand Down Expand Up @@ -378,7 +389,7 @@ jobs:
steps:
- checkout
- run:
name: build_gpg_deps
name: gpg_sign_dist
command: |
$PYTHON_EXE -m venv venv || virtualenv -v venv # first command is python3 || second is python2
. venv/bin/activate
Expand Down Expand Up @@ -437,7 +448,7 @@ jobs:
# Have the server git-tag the release and push the tags
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')
URL_HOST=$(git remote get-url origin | sed -e 's|https\?://.*@||g' | sed -e 's|https\?://||g' | sed -e 's|git@||g' | sed -e 's|:|/|g')
echo "URL_HOST = $URL_HOST"
# A git config user name and email is required. Set if needed.
if [[ "$(git config user.email)" == "" ]]; then
Expand All @@ -448,7 +459,7 @@ jobs:
echo "Tag already exists"
else
git tag $VERSION -m "tarball tag $VERSION"
git push --tags "https://${GITHUB_PUSH_TOKEN}@${URL_HOST}"
git push --tags "https://${PERSONAL_GITHUB_PUSH_TOKEN}@${URL_HOST}"
fi
Expand Down Expand Up @@ -492,10 +503,10 @@ jobs:
docker:
- image: circleci/python:3.5

test_full/cp34-34m-linux:
<<: *test_full_template
docker:
- image: circleci/python:3.4
#test_full/cp34-34m-linux:
# <<: *test_full_template
# docker:
# - image: circleci/python:3.4

test_full/cp27-27mu-linux:
<<: *test_full_template
Expand Down Expand Up @@ -534,10 +545,10 @@ jobs:
docker:
- image: circleci/python:3.5

test_minimal/cp34-34m-linux:
<<: *test_minimal_template
docker:
- image: circleci/python:3.4
#test_minimal/cp34-34m-linux:
# <<: *test_minimal_template
# docker:
# - image: circleci/python:3.4

test_minimal/cp27-27mu-linux:
<<: *test_minimal_template
Expand Down Expand Up @@ -582,9 +593,16 @@ jobs:
steps:
- |
__heredoc__="
circleci local execute --job test_full/pypy3
# Install CircleCI (todo check hashes)
# https://github.com/CircleCI-Public/circleci-cli/releases/download/v0.1.15848/circleci-cli_0.1.15848_linux_amd64.tar.gz
# https://github.com/CircleCI-Public/circleci-cli/releases/download/v0.1.15848/circleci-cli_0.1.15848_checksums.txt
curl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/master/install.sh | DESTDIR=$HOME/.local/bin bash
# Run entire script end-to-end
circleci local execute --job test_full/pypy3
# Manually drop into docker and run things
docker run -v $(pwd):/io -it pypy:3 bash
cd /io
Expand Down
1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ exclude_lines =
if __name__ == .__main__.:
.*if six.PY2:
.*if PY2:
.*sys.version_info[0] == 2:

omit =
ubelt/tests/*
Expand Down
30 changes: 29 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,35 @@ 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.9.5 - Unreleased
## Version 0.10.0 - Unreleased

### Added
* new hashing 36-character base with alias (alphanum / abc123 / 36)
* Added "compact" argument to `ub.repr2`
* added candidate utilities: `named_product`, `varied_values` to `util_dict`
* added candidate utilities: `compatible` to `util_func`
* Added `util_indexable` and `IndexableWalker` (ported from kwcoco)
* Added `util_futures` with `ub.JobPool` and `ub.Executor` (ported from kwcoco)
* Added `util_download_manager` with simple implementation of `ub.DownloadManager`
* Added candidate functions to `ubelt` proper

### Fixed
* `ubelt.download` now errors earlier if the parent directory does not exist
* PyTest no longer throws warnings
* Fixed issue with `download` and ByteIO objects in 3.8
* Bug in Python 3.8+ on win32 that did not account for the change on
`os.readlink` behavior


### Changed

* Modified corner cases in `ub.repr2` to move towards behavior that is easier
to reason about.

* Remove support for Python 3.4


## Version 0.9.5 - Released 2021-02-05


### Added
Expand Down
Loading

0 comments on commit 725805f

Please sign in to comment.