Skip to content

Commit

Permalink
bump version, next release v1.15.2 (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Jul 13, 2022
2 parents 08f62ec + 020d418 commit 045a5de
Show file tree
Hide file tree
Showing 17 changed files with 228 additions and 231 deletions.
7 changes: 0 additions & 7 deletions .coveragerc

This file was deleted.

56 changes: 33 additions & 23 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v2
python-version: '3.x'
- name: Prepare cache
run: echo "PYSHA=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
- uses: actions/cache@v1
Expand All @@ -23,7 +23,7 @@ jobs:
- name: Dependencies
run: pip install -U pre-commit
- uses: reviewdog/action-setup@v1
- if: github.event_name != 'schedule'
- if: github.event_name == 'push' || github.event_name == 'pull_request'
name: Comment
run: |
if [[ $EVENT == pull_request ]]; then
Expand All @@ -40,33 +40,39 @@ jobs:
run: pre-commit run -a --show-diff-on-failure
test:
if: github.event_name != 'pull_request' || github.head_ref != 'devel'
name: py${{ matrix.python }}-${{ matrix.os }}
strategy:
matrix:
python: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9]
name: Python ${{ matrix.python }}
runs-on: ubuntu-latest
os: [ubuntu]
python: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, '3.10']
include:
- os: macos
python: 3.9
- os: windows
python: 3.9
runs-on: ${{ matrix.os }}-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install
run: pip install -U tox
run: pip install -U tox tox-gh-actions
- name: Test
run: |
if [[ "$PYVER" == py3.8 ]]; then
tox -e py${PYVER/./},nodeps # full:incl nodeps
else
tox -e py${PYVER/./} # normal
fi
run: tox -e py${PYVER/./}
env:
PYVER: ${{ matrix.python }}
COVERALLS_FLAG_NAME: py${{ matrix.python }}
PLATFORM: ${{ matrix.os }}
COVERALLS_FLAG_NAME: py${{ matrix.python }}-${{ matrix.os }}
COVERALLS_PARALLEL: true
COVERALLS_SERVICE_NAME: github
# coveralls needs explicit token
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
finish:
if: github.event_name != 'pull_request' || github.head_ref != 'devel'
Expand All @@ -75,23 +81,26 @@ jobs:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Coveralls Finished
run: |
pip install -U coveralls
coveralls --finish || :
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
deploy:
if: github.event_name != 'pull_request' || github.head_ref != 'devel'
name: Deploy
needs: [check, test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install
run: |
sudo apt-get install -yqq pandoc
Expand All @@ -118,7 +127,7 @@ jobs:
fi
echo ::set-output name=tag::${GITHUB_REF#refs/tags/}
git log --pretty='format:%d%n- %s%n%b---' $(git tag --sort=v:refname | tail -n2 | head -n1)..HEAD > _CHANGES.md
- if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
Expand All @@ -134,9 +143,10 @@ jobs:
- if: github.event_name == 'push' && steps.collect_assets.outputs.snap_channel
uses: snapcore/action-publish@v1
with:
store_login: ${{ secrets.SNAP_TOKEN }}
snap: ${{ steps.snap_build.outputs.snap }}
release: ${{ steps.collect_assets.outputs.snap_channel }}
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_TOKEN }}
- name: Docker build push
uses: elgohr/Publish-Docker-Github-Action@master
with:
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ __pycache__/
/*.egg*/
/build/
/dist/
/git-fame_*_amd64.snap
/git-fame_*.snap
/.dockerignore

# Unit test / coverage reports
/.tox/
/.coverage*
/coverage.xml
nosetests.xml
/.pytest_cache/
2 changes: 1 addition & 1 deletion .meta/.git-fame.1.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
% GIT-FAME(1) git-fame User Manuals
% Casper da Costa-Luis <https://github.com/casperdcl>
% 2016-2018
% 2016-2022

# NAME

Expand Down
15 changes: 9 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ default_language_version:
python: python3
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v4.3.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand All @@ -25,15 +25,15 @@ repos:
args: [-i]
types: [text]
exclude: ^(.pre-commit-config.yaml|.github/workflows/test.yml)$
- id: nose
- id: pytest
name: Run tests
language: python
entry: nosetests
args: ['-d', tests/]
entry: pytest
args: [-qq, --durations=1]
types: [python]
pass_filenames: false
additional_dependencies:
- nose
- pytest-timeout
- argopt
- tabulate
- tqdm
Expand All @@ -43,11 +43,14 @@ repos:
- id: flake8
args: [-j8]
additional_dependencies:
- flake8-broken-line
- flake8-bugbear
- flake8-comprehensions
- flake8-debugger
- flake8-isort
- flake8-string-format
- flake8-type-annotations
- repo: https://github.com/PyCQA/isort
rev: 5.9.2
rev: 5.10.1
hooks:
- id: isort
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.7-alpine
FROM python:3.9-alpine
RUN apk update && apk add --no-cache git
COPY dist/*.whl .
RUN pip install -U $(ls *.whl)[full] && rm *.whl
Expand Down
2 changes: 1 addition & 1 deletion LICENCE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
* files: *
MPLv2.0 2016-2021 (c) Casper da Costa-Luis
MPLv2.0 2016-2022 (c) Casper da Costa-Luis
[casperdcl](https://github.com/casperdcl).


Expand Down
27 changes: 14 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
all
flake8
test
testnose
pytest
testsetup
testcoverage
testtimer
Expand All @@ -17,7 +17,7 @@
prebuildclean
clean
toxclean
installdev
install_dev
install
build
buildupload
Expand All @@ -41,13 +41,13 @@ all:
@+make build

flake8:
@+flake8 -j 8 --count --statistics --exit-zero .
@+pre-commit run -a flake8

test:
tox --skip-missing-interpreters -p all

testnose:
nosetests gitfame -d -v
pytest:
pytest

testsetup:
@make gitfame/git-fame.1
Expand All @@ -56,10 +56,10 @@ testsetup:

testcoverage:
@make coverclean
nosetests gitfame --with-coverage --cover-package=gitfame --cover-erase --cover-min-percentage=80 -d -v
pytest --cov=gitfame --cov-report=xml --cov-report=term --cov-fail-under=80

testtimer:
nosetests gitfame --with-timer -d -v
pytest

gitfame/git-fame.1: .meta/.git-fame.1.md gitfame/_gitfame.py
python -c 'import gitfame; print(gitfame._gitfame.__doc__.rstrip())' |\
Expand All @@ -86,8 +86,9 @@ prebuildclean:
@+python -c "import os; os.remove('gitfame/_dist_ver.py') if os.path.exists('gitfame/_dist_ver.py') else None"
coverclean:
@+python -c "import os; os.remove('.coverage') if os.path.exists('.coverage') else None"
@+python -c "import shutil; shutil.rmtree('gitfame/__pycache__', True)"
@+python -c "import os, glob; [os.remove(i) for i in glob.glob('.coverage.*')]"
@+python -c "import shutil; shutil.rmtree('tests/__pycache__', True)"
@+python -c "import shutil; shutil.rmtree('gitfame/__pycache__', True)"
clean:
@+python -c "import os, glob; [os.remove(i) for i in glob.glob('*.py[co]')]"
@+python -c "import os, glob; [os.remove(i) for i in glob.glob('gitfame/*.py[co]')]"
Expand All @@ -97,13 +98,13 @@ clean:
toxclean:
@+python -c "import shutil; shutil.rmtree('.tox', True)"


installdev:
python setup.py develop --uninstall
python setup.py develop

install:
python setup.py install
install_dev:
python setup.py develop --uninstall
python setup.py develop
install_build:
python -m pip install -r .meta/requirements-build.txt

build:
@make prebuildclean
Expand Down
8 changes: 0 additions & 8 deletions codecov.yml

This file was deleted.

9 changes: 1 addition & 8 deletions gitfame/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
from ._gitfame import (
__author__,
__copyright__,
__date__,
__licence__,
__license__,
__version__,
main,
)
__author__, __copyright__, __date__, __licence__, __license__, __version__, main)

__all__ = ['main', '__author__', '__date__', '__licence__', '__copyright__',
'__version__', '__license__']
23 changes: 6 additions & 17 deletions gitfame/_gitfame.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,24 +59,13 @@
import os
import re
import subprocess

# from __future__ import absolute_import
from functools import partial
from os import path

from ._utils import (
TERM_WIDTH,
Str,
TqdmStream,
_str,
check_output,
fext,
int_cast_or_len,
merge_stats,
print_unicode,
string_types,
tqdm,
)
TERM_WIDTH, Str, TqdmStream, _str, check_output, fext, int_cast_or_len, merge_stats,
print_unicode, string_types, tqdm)

# version detector. Precedence: installed dist, git, 'UNKNOWN'
try:
Expand Down Expand Up @@ -327,7 +316,7 @@ def stats_append(fname, auth, loc, tstamp):
try:
inss, dels, fname = i.split('\t')
except ValueError:
log.warn(i)
log.warning(i)
else:
fname = RE_RENAME.sub(r'\\2', fname)
loc = (
Expand Down Expand Up @@ -377,7 +366,7 @@ def run(args):
log.debug("parsing args")

if args.sort not in "loc commits files hours months".split():
log.warn("--sort argument (%s) unrecognised\n%s" % (
log.warning("--sort argument (%s) unrecognised\n%s" % (
args.sort, __doc__))
raise KeyError(args.sort)

Expand Down Expand Up @@ -441,8 +430,8 @@ def run(args):
churn = CHURN_SLOC

if churn & (CHURN_INS | CHURN_DEL) and args.excl:
log.warn("--loc=ins,del includes historical files"
" which may need to be added to --excl")
log.warning("--loc=ins,del includes historical files"
" which may need to be added to --excl")

auth_stats = {}
statter = partial(
Expand Down
Loading

0 comments on commit 045a5de

Please sign in to comment.