Skip to content

Commit 11cdbfa

Browse files
committed
Replace Travis by CircleCI
1 parent da8a40f commit 11cdbfa

File tree

5 files changed

+54
-21
lines changed

5 files changed

+54
-21
lines changed

.circleci/config.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Use the latest 2.1 version of CircleCI pipeline process engine.
2+
# See: https://circleci.com/docs/2.0/configuration-reference
3+
version: 2.1
4+
5+
# Orbs are reusable packages of CircleCI configuration that you may share across projects, enabling you to create encapsulated, parameterized commands, jobs, and executors that can be used across multiple projects.
6+
# See: https://circleci.com/docs/2.0/orb-intro/
7+
orbs:
8+
# The python orb contains a set of prepackaged CircleCI configuration you can use repeatedly in your configuration files
9+
# Orb commands and jobs help you with common scripting around a language/tool
10+
# so you dont have to copy and paste it everywhere.
11+
# See the orb documentation here: https://circleci.com/developer/orbs/orb/circleci/python
12+
python: circleci/python@1.2
13+
14+
# Define a job to be invoked later in a workflow.
15+
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
16+
jobs:
17+
build-and-test: # This is the name of the job, feel free to change it to better match what you're trying to do!
18+
# These next lines defines a Docker executors: https://circleci.com/docs/2.0/executor-types/
19+
# You can specify an image from Dockerhub or use one of the convenience images from CircleCI's Developer Hub
20+
# A list of available CircleCI Docker convenience images are available here: https://circleci.com/developer/images/image/cimg/python
21+
# The executor is the environment in which the steps below will be executed - below will use a python 3.8 container
22+
# Change the version below to your required version of python
23+
machine:
24+
image: ubuntu-2204:2022.04.2
25+
# Checkout the code as the first step. This is a dedicated CircleCI step.
26+
# The python orb's install-packages step will install the dependencies from a Pipfile via Pipenv by default.
27+
# Here we're making sure we use just use the system-wide pip. By default it uses the project root's requirements.txt.
28+
# Then run your tests!
29+
# CircleCI will report the results back to your VCS provider.
30+
steps:
31+
- checkout
32+
- run:
33+
name: Build docker image
34+
command: docker build -t trdg .
35+
- run:
36+
name: Install local python deps
37+
command: pip install codecov
38+
- run:
39+
name: Run tests
40+
# This assumes pytest is installed via the install-package step above
41+
command: docker run -e CIRCLECI=true -e CODECOV_TOKEN=$CODECOV_TOKEN -v $(pwd):/app/ -it trdg:latest bash -c 'git config --global --add safe.directory /app && coverage run tests.py && codecov'
42+
43+
# Invoke jobs via workflows
44+
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
45+
workflows:
46+
sample: # This is the name of the workflow, feel free to change it to better match your workflow.
47+
# Inside the workflow, you define the jobs you want to run.
48+
jobs:
49+
- build-and-test

.travis.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

Dockerfile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# We use Ubuntu as base image
2-
FROM ubuntu:18.04
2+
FROM ubuntu:22.04
33

44
WORKDIR /app
55

@@ -37,11 +37,6 @@ COPY . /app/
3737
RUN pip install --upgrade pip
3838
RUN pip install codecov
3939

40-
RUN git clone https://github.com/python-pillow/Pillow.git \
41-
&& cd Pillow \
42-
&& git checkout 7.0.x \
43-
&& python setup.py build_ext --enable-freetype install
44-
4540
RUN python setup.py install
4641
RUN pip install -r requirements.txt
4742
RUN pip install pytest

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# TextRecognitionDataGenerator [![TravisCI](https://travis-ci.org/Belval/TextRecognitionDataGenerator.svg?branch=master)](https://travis-ci.org/Belval/TextRecognitionDataGenerator) [![PyPI version](https://badge.fury.io/py/trdg.svg)](https://badge.fury.io/py/trdg) [![codecov](https://codecov.io/gh/Belval/TextRecognitionDataGenerator/branch/master/graph/badge.svg)](https://codecov.io/gh/Belval/TextRecognitionDataGenerator) [![Documentation Status](https://readthedocs.org/projects/textrecognitiondatagenerator/badge/?version=latest)](https://textrecognitiondatagenerator.readthedocs.io/en/latest/?badge=latest)
1+
# TextRecognitionDataGenerator [![CircleCI](https://circleci.com/gh/Belval/TextRecognitionDataGenerator/tree/master.svg?style=svg)](https://circleci.com/gh/Belval/TextRecognitionDataGenerator/tree/master) [![PyPI version](https://badge.fury.io/py/trdg.svg)](https://badge.fury.io/py/trdg) [![codecov](https://codecov.io/gh/Belval/TextRecognitionDataGenerator/branch/master/graph/badge.svg)](https://codecov.io/gh/Belval/TextRecognitionDataGenerator) [![Documentation Status](https://readthedocs.org/projects/textrecognitiondatagenerator/badge/?version=latest)](https://textrecognitiondatagenerator.readthedocs.io/en/latest/?badge=latest)
22

33
A synthetic data generator for text recognition
44

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@
3030
"Intended Audience :: Developers",
3131
"License :: OSI Approved :: MIT License",
3232
"Programming Language :: Python :: 3",
33-
"Programming Language :: Python :: 3.4",
34-
"Programming Language :: Python :: 3.5",
3533
"Programming Language :: Python :: 3.6",
3634
"Programming Language :: Python :: 3.7",
35+
"Programming Language :: Python :: 3.8",
36+
"Programming Language :: Python :: 3.9",
37+
"Programming Language :: Python :: 3.10",
3738
],
3839
keywords="synthetic data text-recognition training-set-generator ocr dataset fake text",
3940
packages=find_packages(exclude=["contrib", "docs", "tests"]),

0 commit comments

Comments
 (0)