From b3f9e265204b80fb995606fa87e70ad3e0886b21 Mon Sep 17 00:00:00 2001 From: Emilio Reyes Date: Sat, 2 Oct 2021 14:03:09 -0700 Subject: [PATCH] Upgrade to Python 3.9 Signed-off-by: Emilio Reyes --- .github/workflows/main.yml | 10 ++++++---- .gitignore | 1 + Dockerfile | 10 ++++------ README.md | 8 ++++---- build.py | 11 +++++++++-- 5 files changed, 24 insertions(+), 16 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6a41965..6d578d2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,8 +9,8 @@ on: jobs: build: - runs-on: ubuntu-16.04 - container: python:3.6-slim + runs-on: ubuntu-20.04 + container: python:3.9-slim steps: - uses: actions/checkout@v2 @@ -18,6 +18,9 @@ jobs: - name: Install pybuilder run: pip install pybuilder + - name: Install dependencies + run: pyb install_dependencies + - name: Execute build run: pyb @@ -31,5 +34,4 @@ jobs: uses: codecov/codecov-action@v1 with: token: ${{ secrets.CODECOV_TOKEN }} - file: coverage.xml - + file: coverage.xml \ No newline at end of file diff --git a/.gitignore b/.gitignore index 586f321..9c804f1 100644 --- a/.gitignore +++ b/.gitignore @@ -131,3 +131,4 @@ dmypy.json # PyBuilder target/ +.pybuilder \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 8808d8b..03bba30 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,7 @@ -FROM python:3.6-slim +FROM python:3.9-slim ENV PYTHONDONTWRITEBYTECODE 1 -WORKDIR /pybuilder-radon - -COPY . /pybuilder-radon/ - +WORKDIR /code +COPY . /code/ RUN pip install pybuilder -RUN pyb +RUN pyb \ No newline at end of file diff --git a/README.md b/README.md index 16e7e55..1084b77 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ +# pybuilder-radon # [![GitHub Workflow Status](https://github.com/soda480/pybuilder-radon/workflows/build/badge.svg)](https://github.com/soda480/pybuilder-radon/actions) [![Code Coverage](https://codecov.io/gh/soda480/pybuilder-radon/branch/main/graph/badge.svg)](https://codecov.io/gh/soda480/pybuilder-radon) [![Code Grade](https://www.code-inspector.com/project/19887/status/svg)](https://frontend.code-inspector.com/project/19887/dashboard) [![PyPI version](https://badge.fury.io/py/pybuilder-radon.svg)](https://badge.fury.io/py/pybuilder-radon) - -# pybuilder-radon # +[![python](https://img.shields.io/badge/python-3.9-teal)](https://www.python.org/downloads/) A pybuilder plugin that checks the cyclomatic complexity of your project using `radon`. For more information about radon refer to the [radon pypi page](https://pypi.org/project/radon/). @@ -62,9 +62,9 @@ Run the Docker container: docker container run \ --rm \ -it \ --v $PWD:/pybuilder-radon \ +-v $PWD:/code \ pybradon:latest \ -/bin/sh +/bin/bash ``` Execute the build: diff --git a/build.py b/build.py index d0e1fb8..8fb4fc5 100644 --- a/build.py +++ b/build.py @@ -8,6 +8,7 @@ use_plugin('python.core') use_plugin('python.unittest') +use_plugin('python.install_dependencies') use_plugin('python.flake8') use_plugin('python.coverage') use_plugin('python.distutils') @@ -17,8 +18,11 @@ authors = [Author('Emilio Reyes', 'soda480@gmail.com')] summary = 'Pybuilder plugin for radon cyclomatic complexity' url = 'https://github.com/soda480/pybuilder-radon' -version = '0.2.3' -default_task = ['clean', 'publish'] +version = '0.3.0' +default_task = [ + 'clean', + 'publish' +] license = 'Apache License, Version 2.0' description = summary @@ -48,6 +52,9 @@ def set_properties(project): 'Operating System :: POSIX :: Linux', 'Programming Language :: Python', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', 'Topic :: Software Development :: Build Tools']) # only for functional testing plugin # project.set_property('radon_break_build_average_complexity_threshold', 2.74)