Skip to content

Commit

Permalink
build: switch to pyproject.toml and GitHub Actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
SEIAROTg committed Sep 10, 2023
1 parent b0bb627 commit 9e6f2d8
Show file tree
Hide file tree
Showing 9 changed files with 800 additions and 83 deletions.
40 changes: 0 additions & 40 deletions .circleci/config.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: build
on: [push, pull_request]
env:
PY_COLORS: "1"
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.x']
steps:
- uses: actions/checkout@v3
- name: Set up PDM
uses: pdm-project/setup-pdm@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pdm sync --dev
- name: Run tests
run: pdm run -v pytest autobean --cov autobean --cov-report xml
- name: Run type checks
run: pdm run -v mypy autobean
- name: Upload coverage
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
19 changes: 19 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up PDM
uses: pdm-project/setup-pdm@v3
with:
python-version: 3.x
- name: Publish to PyPI
run: pdm publish
env:
PDM_PUBLISH_USERNAME: __token__
PDM_PUBLISH_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# autobean
[![CircleCI](https://circleci.com/gh/SEIAROTg/autobean.svg?style=shield)](https://circleci.com/gh/SEIAROTg/autobean)
[![build](https://github.com/SEIAROTg/autobean/actions/workflows/build.yml/badge.svg)](https://github.com/SEIAROTg/autobean/actions/workflows/build.yml)
[![pypi](https://img.shields.io/pypi/v/autobean)](https://pypi.org/project/autobean/)
[![codecov](https://codecov.io/gh/SEIAROTg/autobean/branch/master/graph/badge.svg)](https://codecov.io/gh/SEIAROTg/autobean)
[![Maintainability](https://api.codeclimate.com/v1/badges/65e79b66e57139ed8bd0/maintainability)](https://codeclimate.com/github/SEIAROTg/autobean/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/65e79b66e57139ed8bd0/test_coverage)](https://codeclimate.com/github/SEIAROTg/autobean/test_coverage)
[![license](https://img.shields.io/github/license/SEIAROTg/autobean.svg)](https://github.com/SEIAROTg/autobean)
Expand Down
715 changes: 715 additions & 0 deletions pdm.lock

Large diffs are not rendered by default.

39 changes: 39 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[project]
name = "autobean"
version = "0.2.1"
description = "A collection of plugins and scripts that help automating bookkeeping with beancount"
authors = [
{name = "SEIAROTg", email = "[email protected]"},
]
dependencies = [
"beancount>=2.3.5",
"python-dateutil>=2.8.2",
"pyyaml>=6.0.1",
"requests>=2.31.0",
]
requires-python = ">=3.10"
readme = "README.md"
license = {text = "GPL2"}

[build-system]
requires = ["pdm-pep517>=1.0"]
build-backend = "pdm.pep517.api"

[tool.pdm]
[tool.pdm.build]
includes = [
"autobean/",
]
excludes = [
"autobean/*/tests/",
]

[tool.pdm.dev-dependencies]
dev = [
"pytest>=7.4.2",
"pytest-cov>=4.1.0",
"mypy>=1.5.1",
"types-python-dateutil>=2.8.19.14",
"types-pyyaml>=6.0.12.11",
"types-requests>=2.31.0.2",
]
8 changes: 0 additions & 8 deletions requirements-dev.txt

This file was deleted.

5 changes: 0 additions & 5 deletions requirements.txt

This file was deleted.

28 changes: 0 additions & 28 deletions setup.py

This file was deleted.

0 comments on commit 9e6f2d8

Please sign in to comment.