-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 79cc815
Showing
33 changed files
with
1,059 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"_template": "gh:cjolowicz/cookiecutter-hypermodern-python", | ||
"author": "Nesta", | ||
"email": "software_development@nesta.org.uk", | ||
"friendly_name": "Nesta Data Science Utilities", | ||
"github_user": "nestauk", | ||
"package_name": "ds_utils", | ||
"project_name": "ds-utils", | ||
"version": "0.0.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[darglint] | ||
strictness = short |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
[flake8] | ||
# ANN - annotations | ||
# B,B9 - Bugbear | ||
# BLK - Black | ||
# C - complexity | ||
# D - docstrings | ||
# DAR - darglint (checks docstrings) | ||
# E - pycodestyle errors | ||
# F - pyflakes | ||
# I - Import order | ||
# N - PEP8 naming | ||
# W - pycodestyle warnings | ||
select = ANN,B,B9,BLK,C,D,DAR,E,F,I,N,W | ||
# E203 - whitespace before ':' | ||
# E501 - line length (dealt with by bugbear) | ||
# W503 - linebreak before binary op | ||
ignore = E203,E501,W503 | ||
max-complexity = 10 | ||
max-line-length = 80 | ||
application-import-names = ds_utils,tests | ||
import-order-style = google | ||
per-file-ignores = | ||
tests/*:ANN | ||
noxfile.py:ANN | ||
docstring-convention = google |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text=auto eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
- package-ecosystem: pip | ||
directory: "/.github/workflows" | ||
schedule: | ||
interval: daily | ||
- package-ecosystem: pip | ||
directory: "/docs" | ||
schedule: | ||
interval: daily | ||
- package-ecosystem: pip | ||
directory: "/" | ||
schedule: | ||
interval: daily |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
--- | ||
# Labels names are important as they are used by Release Drafter to decide | ||
# regarding where to record them in changelog or if to skip them. | ||
# | ||
# The repository labels will be automatically configured using this file and | ||
# the GitHub Action https://github.com/marketplace/actions/github-labeler. | ||
- name: breaking | ||
description: Breaking Changes | ||
color: bfd4f2 | ||
- name: bug | ||
description: Something isn't working | ||
color: d73a4a | ||
- name: build | ||
description: Build System and Dependencies | ||
color: bfdadc | ||
- name: ci | ||
description: Continuous Integration | ||
color: 4a97d6 | ||
- name: dependencies | ||
description: Pull requests that update a dependency file | ||
color: 0366d6 | ||
- name: documentation | ||
description: Improvements or additions to documentation | ||
color: 0075ca | ||
- name: duplicate | ||
description: This issue or pull request already exists | ||
color: cfd3d7 | ||
- name: enhancement | ||
description: New feature or request | ||
color: a2eeef | ||
- name: github_actions | ||
description: Pull requests that update Github_actions code | ||
color: "000000" | ||
- name: good first issue | ||
description: Good for newcomers | ||
color: 7057ff | ||
- name: help wanted | ||
description: Extra attention is needed | ||
color: 008672 | ||
- name: invalid | ||
description: This doesn't seem right | ||
color: e4e669 | ||
- name: performance | ||
description: Performance | ||
color: "016175" | ||
- name: python | ||
description: Pull requests that update Python code | ||
color: 2b67c6 | ||
- name: question | ||
description: Further information is requested | ||
color: d876e3 | ||
- name: refactoring | ||
description: Refactoring | ||
color: ef67c4 | ||
- name: removal | ||
description: Removals and Deprecations | ||
color: 9ae7ea | ||
- name: style | ||
description: Style | ||
color: c120e5 | ||
- name: testing | ||
description: Testing | ||
color: b1fc6f | ||
- name: wontfix | ||
description: This will not be worked on | ||
color: ffffff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
categories: | ||
- title: ":boom: Breaking Changes" | ||
label: "breaking" | ||
- title: ":rocket: Features" | ||
label: "enhancement" | ||
- title: ":fire: Removals and Deprecations" | ||
label: "removal" | ||
- title: ":beetle: Fixes" | ||
label: "bug" | ||
- title: ":racehorse: Performance" | ||
label: "performance" | ||
- title: ":rotating_light: Testing" | ||
label: "testing" | ||
- title: ":construction_worker: Continuous Integration" | ||
label: "ci" | ||
- title: ":books: Documentation" | ||
label: "documentation" | ||
- title: ":hammer: Refactoring" | ||
label: "refactoring" | ||
- title: ":lipstick: Style" | ||
label: "style" | ||
- title: ":package: Dependencies" | ||
labels: | ||
- "dependencies" | ||
- "build" | ||
template: | | ||
## Changes | ||
$CHANGES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pip==21.0 | ||
nox==2020.12.31 | ||
nox-poetry==0.7.1 | ||
poetry==1.1.4 | ||
virtualenv==20.4.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Labeler | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
|
||
jobs: | ||
labeler: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repository | ||
uses: actions/checkout@v2.3.3 | ||
|
||
- name: Run Labeler | ||
uses: crazy-max/ghaction-github-labeler@v3.1.1 | ||
with: | ||
skip-delete: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repository | ||
uses: actions/checkout@v2.3.4 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2.2.1 | ||
with: | ||
python-version: "3.9" | ||
|
||
- name: Upgrade pip | ||
run: | | ||
pip install --constraint=.github/workflows/constraints.txt pip | ||
pip --version | ||
- name: Install Poetry | ||
run: | | ||
pip install --constraint=.github/workflows/constraints.txt poetry | ||
poetry --version | ||
- name: Check if there is a parent commit | ||
id: check-parent-commit | ||
run: | | ||
echo "::set-output name=sha::$(git rev-parse --verify --quiet HEAD^)" | ||
- name: Detect and tag new version | ||
id: check-version | ||
if: steps.check-parent-commit.outputs.sha | ||
uses: salsify/action-detect-and-tag-new-version@v2.0.1 | ||
with: | ||
version-command: | | ||
bash -o pipefail -c "poetry version | awk '{ print \$2 }'" | ||
- name: Bump version for developmental release | ||
if: "! steps.check-version.outputs.tag" | ||
run: | | ||
poetry version patch && | ||
version=$(poetry version | awk '{ print $2 }') && | ||
poetry version $version.dev.$(date +%s) | ||
- name: Build package | ||
run: | | ||
poetry build --ansi | ||
- name: Publish package on PyPI | ||
if: steps.check-version.outputs.tag | ||
uses: pypa/gh-action-pypi-publish@v1.4.1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_TOKEN }} | ||
|
||
- name: Publish package on TestPyPI | ||
if: "! steps.check-version.outputs.tag" | ||
uses: pypa/gh-action-pypi-publish@v1.4.1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.TEST_PYPI_TOKEN }} | ||
repository_url: https://test.pypi.org/legacy/ | ||
|
||
- name: Publish the release notes | ||
uses: release-drafter/release-drafter@v5.13.0 | ||
with: | ||
publish: ${{ steps.check-version.outputs.tag != '' }} | ||
tag: ${{ steps.check-version.outputs.tag }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Oops, something went wrong.