Skip to content

Commit

Permalink
Use poetry + add exceptions (#15)
Browse files Browse the repository at this point in the history
* use poetry

* add `exceptions.NonUniqueRepresentation`

* disable windows test; fix 3.7 support

* drop Python 3.7 support
  • Loading branch information
PythonFZ committed Jul 21, 2022
1 parent c21c6ac commit edadb06
Show file tree
Hide file tree
Showing 11 changed files with 464 additions and 83 deletions.
40 changes: 0 additions & 40 deletions .github/workflows/publish-to-pypi.yaml

This file was deleted.

27 changes: 17 additions & 10 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ name: pytest
on:
push:
pull_request:
schedule:
- cron: '14 3 * * 1' # at 03:14 on Monday.

jobs:
build:
Expand All @@ -18,28 +20,33 @@ jobs:
- "3.10"
- 3.9
- 3.8
- 3.7
os:
- ubuntu-latest
- windows-latest
# - windows-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install requirements
run: |
pip3 install -r requirements.txt
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Install package
run: |
pip3 install .
poetry install --no-interaction
- name: Pytest
run: |
source .venv/bin/activate
coverage run -m pytest
coverage xml
coverage lcov
- name: Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.lcov
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ fail_fast: true

repos:
- repo: https://github.com/psf/black
rev: 22.1.0
rev: 22.6.0
hooks:
- id: black

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[![Coverage Status](https://coveralls.io/repos/github/zincware/ZnJSON/badge.svg?branch=main)](https://coveralls.io/github/zincware/ZnJSON?branch=main)
[![Code Style](https://img.shields.io/badge/code%20style-black-black)](https://github.com/psf/black/)
[![Tests](https://github.com/zincware/ZnJSON/actions/workflows/pytest.yaml/badge.svg)](https://coveralls.io/github/zincware/ZnJSON?branch=main)
[![PyPI version](https://badge.fury.io/py/znjson.svg)](https://badge.fury.io/py/znjson)


# ZnJSON

Expand Down

0 comments on commit edadb06

Please sign in to comment.