Skip to content

Commit

Permalink
Merge branch 'main' into script-server-cors
Browse files Browse the repository at this point in the history
  • Loading branch information
ccmaymay committed Oct 12, 2023
2 parents c1d6290 + 209c986 commit f21c03f
Show file tree
Hide file tree
Showing 102 changed files with 1,188 additions and 243 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Python tests

on: [push]

jobs:
main-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install tox (and any other packages)
run: pip install tox
- name: Run tox
run: |
tox run -e pep8,docs
tox run -e cov -- tests
tox run -e py -- integration-tests
compatibility-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install tox (and any other packages)
run: pip install tox
- name: Run tox
run: |
tox run -e pep8
tox run -e py -- tests
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
/setuptools*.zip
/setuptools*.egg
/testfixtures*.egg
/coverage.xml
71 changes: 29 additions & 42 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
stages:
- build
- stylecheck
- test
- docker-build
- docker-test

.dind:
image: docker:latest
Expand All @@ -16,70 +16,57 @@ stages:
tags:
- docker

build:
docker-build:
extends: .dind
stage: build
stage: docker-build
script:
- docker build -t $CONTAINER_TEST_IMAGE .
- docker push $CONTAINER_TEST_IMAGE

test-pep8:
docker-tests:
extends: .dind
stage: stylecheck
stage: docker-test
script:
- docker pull $CONTAINER_TEST_IMAGE
- docker run $CONTAINER_TEST_IMAGE tox run -e pep8
- docker run $CONTAINER_TEST_IMAGE tox run -e pep8,docs
- docker run $CONTAINER_TEST_IMAGE tox run -e py -- tests
- docker run $CONTAINER_TEST_IMAGE tox run -e py -- integration-tests

test-docs:
extends: .dind
stage: test
script:
- docker pull $CONTAINER_TEST_IMAGE
- docker run $CONTAINER_TEST_IMAGE tox run -e docs

test-unit-tests:
extends: .dind
coverage-test:
image: python:3.8
stage: test
before_script:
- pip install tox
script:
- docker pull $CONTAINER_TEST_IMAGE
- touch coverage.xml
- docker run --mount type=bind,source=$PWD/coverage.xml,target=/tmp/concrete-python/coverage.xml $CONTAINER_TEST_IMAGE tox run -e cov -- tests
- tox run -e pep8
- tox run -e cov -- tests
tags:
- docker
coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: coverage/cobertura-coverage.xml
path: coverage.xml

test-integration-tests:
extends: .dind
stage: test
script:
- docker pull $CONTAINER_TEST_IMAGE
- docker run $CONTAINER_TEST_IMAGE tox run -e py37 -- integration-tests

.test-compat:
.compatibility-tests:
stage: test
before_script:
- python setup.py install
- pip install flake8
- pip install -r test-requirements.txt
- pip install tox
script:
- flake8
- pytest tests integration-tests
only:
- main
- tags
- tox run -e pep8
- tox run -e py -- tests
tags:
- docker

test-py38:
extends: .test-compat
image: python:3.8

test-py39:
extends: .test-compat
extends: .compatibility-tests
image: python:3.9

test-py310:
extends: .test-compat
extends: .compatibility-tests
image: python:3.10

test-py311:
extends: .compatibility-tests
image: python:3.11
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .travis/install.bash

This file was deleted.

27 changes: 26 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,9 +1,34 @@
4.17.1 (unreleased)
4.18.3 (unreleased)
-------------------

- Nothing changed yet.


4.18.2 (2023-07-10)
-------------------

- Fix bug, improve error reporting in annotate batch client.
- Remove errant print statement.
- Use fixed base image to reduce Docker build time.


4.18.1 (2023-07-09)
-------------------

- Build Updates:
- Fix coverage report generation in GitLab build
- Created GitHub Actions build
- Switched to Python 3.8 as minimal version
- Fixed CommunicationReader to skip directories in zip archives


4.18.0 (2023-07-09)
-------------------

- Updated to Concrete schema 4.18, which adds
AnnotateCommunicationBatchService


4.17.0 (2023-02-06)
-------------------

Expand Down
15 changes: 3 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
# Build 'accelerated' concrete-python with C bindings for Python Thrift
FROM python:3.7-bullseye

RUN curl -O http://archive.apache.org/dist/thrift/0.16.0/thrift-0.16.0.tar.gz && \
tar xvfz thrift-0.16.0.tar.gz && \
cd thrift-0.16.0 && \
./configure --with-python && \
make && \
make install
FROM ccmaymay/concrete-python-base:thrift-0.19.0

RUN pip install 'tox>=4'

ADD . /opt/concrete-python
WORKDIR /opt/concrete-python
RUN python setup.py install

RUN thrift-is-accelerated.py
RUN pip install . && \
thrift-is-accelerated.py
6 changes: 4 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
Tutorial
========

.. image:: https://travis-ci.org/hltcoe/concrete-python.svg
:target: https://travis-ci.org/hltcoe/concrete-python
.. image:: https://badge.fury.io/py/concrete.svg
:target: https://badge.fury.io/py/concrete
.. image:: https://github.com/hltcoe/concrete-python/actions/workflows/tox.yml/badge.svg
:target: https://github.com/hltcoe/concrete-python/actions/workflows/tox.yml
.. image:: https://ci.appveyor.com/api/projects/status/0346c3lu11vj8xqj?svg=true
:target: https://ci.appveyor.com/project/cjmay/concrete-python-f3iqf

Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: '{build}-{branch}'
skip_branch_with_pr: false

install:
- set PATH=C:\Python37-x64\scripts;C:\Python37-x64;%PATH%
- set PATH=C:\Python38-x64\scripts;C:\Python38-x64;%PATH%
- pip install 'tox>=4'
- git config core.symlinks true
- git reset --hard
Expand All @@ -12,4 +12,4 @@ build_script:
# configured in tox.ini
- tox run -e pep8,docs
- tox run -e cov -- tests
- tox run -e py37 -- integration-tests
- tox run -e py -- integration-tests
2 changes: 1 addition & 1 deletion concrete/access/FetchCommunicationService-remote
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Autogenerated by Thrift Compiler (0.17.0)
# Autogenerated by Thrift Compiler (0.18.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
Expand Down
2 changes: 1 addition & 1 deletion concrete/access/FetchCommunicationService.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion concrete/access/StoreCommunicationService-remote
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Autogenerated by Thrift Compiler (0.17.0)
# Autogenerated by Thrift Compiler (0.18.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
Expand Down
2 changes: 1 addition & 1 deletion concrete/access/StoreCommunicationService.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion concrete/access/constants.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion concrete/access/ttypes.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f21c03f

Please sign in to comment.