Skip to content
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

Version 7.0.1 #248

Merged
merged 28 commits into from
Feb 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
b8bfdd6
Stop installing docs straight into site-packages (#245)
mgorny Feb 4, 2023
3a01dab
poetry build changes
cdgriffith Feb 4, 2023
8732ada
make editable for safety
cdgriffith Feb 4, 2023
7978dbc
try using mac_11
cdgriffith Feb 5, 2023
5c03301
skip python 3.7 mac build
cdgriffith Feb 5, 2023
71b7eb2
try just universal2 builds
cdgriffith Feb 5, 2023
011fc16
try to update pip first
cdgriffith Feb 5, 2023
5357b8b
try skipping python 3.8
cdgriffith Feb 6, 2023
aa1fbd0
only x86_64 mac
cdgriffith Feb 6, 2023
f9d31b9
cache and universal
cdgriffith Feb 6, 2023
e56c4de
try setting macos version
cdgriffith Feb 7, 2023
eb343d5
try with mac 11
cdgriffith Feb 8, 2023
172341f
add debug info
cdgriffith Feb 8, 2023
ada0a94
add debug info
cdgriffith Feb 9, 2023
61ec71a
try with 3.8
cdgriffith Feb 9, 2023
5c2d4be
Switching off of poetry due to multiple build issues
cdgriffith Feb 22, 2023
883a2e2
try with cibuildwheel
cdgriffith Feb 22, 2023
671d614
pre-commit less version for test
cdgriffith Feb 22, 2023
6d106c4
reduce pre commands
cdgriffith Feb 22, 2023
8dc9bd1
actaully use pip
cdgriffith Feb 22, 2023
cff997d
try old test method
cdgriffith Feb 22, 2023
cefbe6e
try older version
cdgriffith Feb 22, 2023
249cb20
try older version 6
cdgriffith Feb 22, 2023
ab2102c
only build up to 310 for now
cdgriffith Feb 22, 2023
99d5909
find the files
cdgriffith Feb 22, 2023
ed9be39
Try removing pyproject totally
cdgriffith Feb 22, 2023
bfbd72f
maybe fix build finally
cdgriffith Feb 22, 2023
63121db
restore all tests
cdgriffith Feb 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .black.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.black]
line-length = 120
target-version = ['py36', 'py37', 'py38']
target-version = ['py37', 'py38', 'py39', 'py310', 'py311']
exclude = '''
/(
\.eggs
Expand Down
81 changes: 46 additions & 35 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,54 +23,65 @@ jobs:
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install poetry --upgrade
poetry config virtualenvs.create false --local
pip install setuptools wheel twine --upgrade

- name: Poetry Install
run: poetry install --with dev
continue-on-error: true

- name: Poetry Install 2
run: poetry install --with dev

- name: Build and Publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}

run: |
poetry build
python setup.py sdist bdist_wheel
twine upload dist/*

deploy-cython:
strategy:
matrix:
os: [ ubuntu-latest, macos-12, windows-latest ]
os: [macos-11, windows-latest]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install cibuildwheel twine --upgrade

- name: Build Wheels
env:
CIBW_SKIP: "cp36-* pp* *i686"
CIBW_BUILD_VERBOSITY: 1
CIBW_TEST_REQUIRES: "pytest msgpack ruamel.yaml tomli tomli-w"
CIBW_TEST_COMMAND: "pytest {package}/test"
run: python -m cibuildwheel --output-dir wheels

- name: Publish Wheels
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
twine upload wheels/*
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine Cython --upgrade
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py bdist_wheel
twine upload dist/*

deploy-cython-manylinux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"

- uses: RalfG/[email protected]_x86_64
with:
python-versions: 'cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310'
build-requirements: 'cython'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install twine --upgrade

- name: Publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
twine upload dist/*-manylinux*.whl
153 changes: 79 additions & 74 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,117 +10,122 @@ on:
branches: [ master, development, develop, test, tests ]

jobs:
build-checks:
package-checks:
strategy:
matrix:
os: [ubuntu-latest, macos-12, windows-latest]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "pypy-3.8"]
os: [ubuntu-latest, macos-11, windows-latest]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3

- name: Set up Python 3.11
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Build Wheels
env:
CIBW_SKIP: "cp36-* pp* *i686"
CIBW_BUILD_VERBOSITY: 1
CIBW_TEST_REQUIRES: "pytest msgpack ruamel.yaml tomli tomli-w"
CIBW_TEST_COMMAND: "pytest {package}/test"
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: package-check-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-test.txt') }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install cibuildwheel --upgrade
python -m cibuildwheel --output-dir wheels

pip install -r requirements.txt
pip install -r requirements-test.txt
pip install coveralls flake8 flake8-print mypy setuptools wheel twine Cython
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors, undefined names or print statements
flake8 box --count --select=E9,F63,F7,F82,T001,T002,T003,T004 --show-source --statistics
# exit-zero treats all errors as warnings.
flake8 . --count --exit-zero --max-complexity=20 --max-line-length=120 --statistics --extend-ignore E203
- name: Run mypy
run: mypy box
- name: Build Wheel and check distribution log description
run: |
python setup.py sdist bdist_wheel
twine check dist/*
- name: Test packaged wheel on *nix
if: matrix.os != 'windows-latest'
run: |
pip install dist/*.whl
rm -rf box
python -m pytest
- name: Test packaged wheel on Windows
if: matrix.os == 'windows-latest'
run: |
$wheel = (Get-ChildItem dist\*.whl | Sort lastWriteTime | Select-Object -last 1).Name
pip install dist\${wheel}
Remove-item box -recurse -force
python -m pytest
- name: Upload wheel artifact
uses: actions/upload-artifact@v2
with:
name: python_box
path: wheels/*.whl
path: dist/*.whl

lint-and-mypy:
package-manylinux-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"

- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: lint-and-mypy-${{ hashFiles('pyproject.toml') }}

- name: Install Dependencies
run: |
python -m pip install poetry --upgrade
poetry config virtualenvs.create false --local
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Poetry Install
run: poetry install --with dev
continue-on-error: true
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: package-manylinux-check-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-test.txt') }}

- name: Poetry Install 2
run: poetry install --with dev
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-test.txt
pip install coveralls flake8 flake8-print mypy setuptools wheel twine Cython

- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors, undefined names or print statements
python -m flake8 box --count --select=E9,F63,F7,F82,T001,T002,T003,T004 --show-source --statistics
# exit-zero treats all errors as warnings.
python -m flake8 . --count --exit-zero --max-complexity=20 --max-line-length=120 --statistics --extend-ignore E203
- uses: RalfG/[email protected]_x86_64
with:
python-versions: 'cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310'
build-requirements: 'cython'

- name: Run mypy
run: python -m mypy box
- name: Test packaged wheel on linux
run: |
pip install dist/*cp310-manylinux*.whl
rm -rf box
python -m pytest

- name: Build Wheel and Check Distribution Log Description
run: |
poetry build
python -m twine check dist/*
- name: Upload wheel artifact
uses: actions/upload-artifact@v2
with:
name: python_box
path: dist/*-manylinux*.whl

test-non-cython:
test:
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-11, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: test-${{ hashFiles('pyproject.toml') }}

- name: Install Dependencies
key: test-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-test.txt') }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry --upgrade
poetry config virtualenvs.create false --local

- name: Poetry Install
run: poetry install --with dev --with test
continue-on-error: true

- name: Poetry Install 2
run: poetry install --with dev --with test

- name: Poetry Build
run: poetry build
continue-on-error: true

pip install -r requirements.txt
pip install -r requirements-test.txt
pip install setuptools wheel Cython
python setup.py build_ext --inplace
- name: Test with pytest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python -m pytest --cov=box test/
pytest --cov=box test/
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,7 @@ coverage/
# don't upload cython files
box/*.c
.pytest_cache/

box/*.rst
box/LICENSE
box/*png
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ repos:
exclude: ^test/data/.+

- repo: https://github.com/ambv/black
rev: 22.12.0
rev: 23.1.0
hooks:
- id: black
args: [--config=.black.toml]
Expand All @@ -38,7 +38,7 @@ repos:
hooks:
- id: cythonize-check
name: Cythonize
entry: python -m poetry build
entry: pip install -e .
language: system
types: [python]
pass_filenames: false
Expand All @@ -51,7 +51,7 @@ repos:
always_run: true

- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v0.991'
rev: 'v1.0.1'
hooks:
- id: mypy
types: [python]
Expand Down
5 changes: 5 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
=========

Version 7.0.1
-------------

* Switching off of poetry due to multiple build issues

Version 7.0.0
-------------

Expand Down
2 changes: 1 addition & 1 deletion box/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

__author__ = "Chris Griffith"
__version__ = "7.0.0"
__version__ = "7.0.1"

from box.box import Box
from box.box_list import BoxList
Expand Down
34 changes: 0 additions & 34 deletions build.py

This file was deleted.

Loading