Skip to content

Commit

Permalink
Updated build. Dropped Python 3.7 support.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmyersturnbull committed Jan 5, 2021
1 parent de035c6 commit 06ee298
Show file tree
Hide file tree
Showing 22 changed files with 773 additions and 831 deletions.
17 changes: 14 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
# Check http://editorconfig.org for more information
# Useful: https://ukupat.github.io/tabs-or-spaces/
root = true

[*]
charset = utf-8
trim_trailing_whitespace = true
end_of_line = lf
indent_style = space
charset = utf-8
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space

[*.{yml,yaml,json,scala,coffee,css,js,sh,sql,tex,xml,html,htm,hs,ml,pp,R,rb}]
indent_size = 2

[*.md]
indent_size = 2
trim_trailing_whitespace = false

[*.{go,lua,vala,v}]
indent_style = tab
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: "🎁 Feature"
about: Feature request
title: ''
labels: 'kind: feature'
labels: 'kind: new feature'
assignees: ''
---

Expand Down
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/security.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
name: "🔒 Security issue"
about: Security issue
name: "🎁 Feature"
about: Feature request
title: ''
labels: 'kind: security'
labels: 'kind: new feature'
assignees: ''
---

Expand Down
43 changes: 0 additions & 43 deletions .github/workflows/build.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build & test
on:
push:
branches:
- master
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
python-version:
# from tyrannosaurus "pymetaversion"; actual versions are handled in Tox
- 3.9
steps:
- name: Checkout
uses: actions/checkout@v2
- name: 'Set up Python ${{ matrix.python-version }}'
uses: actions/setup-python@v2
with:
python-version: '${{ matrix.python-version }}'
- name: Install build dependencies
run: |
pip install poetry tox
- name: Test with tox
run: |
tox -v
- name: Build the Docker image
run: |
docker build .
- name: Update coveralls/codecov
run: |
pip install coveralls codecov
coveralls || true
codecov || true
31 changes: 15 additions & 16 deletions .github/workflows/labels.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
name: Create Github labels
on:
push:
branches:
- master
name: Generate labels
push:
branches:
- master
- main
jobs:
labels:
name: DefaultLabelsActions
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Create labels
uses: lannonbr/issue-label-manager-action@2.0.0
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
labels:
name: DefaultLabelsActions
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Create labels
uses: lannonbr/issue-label-manager-action@2.0.0
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
79 changes: 36 additions & 43 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,38 @@
name: Publish
name: Publish on release creation
on:
release:
types:
- published
repository_dispatch:
types:
- release-made
release:
types:
- published
repository_dispatch:
types:
- release-made
jobs:
deploy:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
-
name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install poetry tox
-
name: Build and install with Poetry
run: |
poetry build
poetry install
-
name: Build the Docker image
run: |
docker build .
-
name: Upload the artifacts
uses: skx/github-action-publish-binaries@master
with:
args: 'dist/*'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
name: Publish on PyPi
run: |
poetry publish -vv --username __token__ --password ${{ secrets.PYPI_TOKEN }}
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
# from tyrannosaurus "pymetaversion"; actual versions are handled in Tox
python-version: 3.9
- name: Install build meta-dependencies
run: |
pip install poetry
- name: Build sdists and wheels with Poetry
run: |
poetry build
poetry install
- name: Build the Docker image
run: |
docker build .
- name: Attach artifacts to the Github release
uses: skx/github-action-publish-binaries@master
with:
args: 'dist/*'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to PyPi
run: |
poetry publish -vv --username __token__ --password ${{ secrets.PYPI_TOKEN }}
25 changes: 25 additions & 0 deletions .github/workflows/pull.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Test on pull request
on:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
python-version:
# from tyrannosaurus "pymetaversion"; actual versions are handled in Tox
- 3.9
steps:
- name: Checkout
uses: actions/checkout@v2
- name: 'Set up Python ${{ matrix.python-version }}'
uses: actions/setup-python@v2
with:
python-version: '${{ matrix.python-version }}'
- name: Install build meta-dependencies
run: |
pip install tox poetry
- name: Test with tox
run: |
tox -v
71 changes: 22 additions & 49 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,51 +1,24 @@
minimum_pre_commit_version: 2.5.0
minimum_pre_commit_version: 2.9.0

repos:
-
repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
-
repo: 'https://github.com/psf/black'
rev: stable
hooks:
-
id: black
-
repo: 'https://github.com/pre-commit/pre-commit-hooks'
rev: v3.2.0
hooks:
-
id: trailing-whitespace
-
id: end-of-file-fixer
-
id: debug-statements
-
id: check-builtin-literals
-
id: check-toml
name: Check Toml
description: Toml file syntax errors
entry: check-toml
language: python
types:
- toml
-
id: check-yaml
name: Check Yaml
description: Yaml file syntax errors
entry: check-yaml
language: python
types:
- yaml
exclude: ^recipes/.*
-
id: check-json
name: Check JSON
description: JSON file syntax errors
entry: check-json
language: python
types:
- json
- repo: meta
hooks:
- id: check-hooks-apply
# this is useful but problematic
# e.g. excluding recipes/*.yml, if they exist
# - id: check-useless-excludes
- repo: 'https://github.com/psf/black'
rev: 20.8b1
hooks:
- id: black
- repo: 'https://github.com/pre-commit/pre-commit-hooks'
rev: v3.4.0
hooks:
- id: fix-byte-order-marker
- id: end-of-file-fixer
- id: debug-statements
- id: check-builtin-literals
- id: check-toml
- id: check-json
- id: check-yaml
exclude: ^recipes/.*
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ Adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) and
[Keep a Changelog](https://keepachangelog.com/en/1.0.0/).


## [0.4.0] - 2020-08-29

### Removed
- support for Python 3.7

#### Changed
- Bumped Pandas to 1.2
- Updated build


## [0.3.0] - 2020-08-29

### Removed:
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# https://stackoverflow.com/questions/53835198/integrating-python-poetry-with-docker/54763270#54763270

FROM python:3.8
FROM python:3.9

ARG YOUR_ENV

Expand All @@ -11,7 +11,7 @@ ENV YOUR_ENV=${YOUR_ENV} \
PIP_NO_CACHE_DIR=off \
PIP_DISABLE_PIP_VERSION_CHECK=on \
PIP_DEFAULT_TIMEOUT=100 \
POETRY_VERSION=1.0.5
POETRY_VERSION=1.1.4

# System deps:
RUN pip install "poetry==$POETRY_VERSION"
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2016–2020, Douglas Myers-Turnbull & UCSF
Copyright 2016–2021, Douglas Myers-Turnbull & UCSF

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
in compliance with the License. You may obtain a copy of the License at
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ from typeddfs import TypedDfs

# Build me a Key-Value-Note class!
KeyValue = (
TypedDfs.typed('KeyValue') # typed means enforced requirements
.require('key', index=True) # automagically make this an index
.require('value') # required
.reserve('note') # permitted but not required
.strict() # don't allow other columns
TypedDfs.typed('KeyValue') # typed means enforced requirements
.require('key', str, index=True) # automagically make this an index
.require('value') # required
.reserve('note') # permitted but not required
.strict() # don't allow other columns
).build()

# This will self-organize and use 'key' as the index:
Expand Down
Loading

0 comments on commit 06ee298

Please sign in to comment.