Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preparing For V1.0 Release #3

Merged
merged 24 commits into from
Jul 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
51c8115
Removing old code for v1 re-write
MattLimb Jul 23, 2022
ddcf606
Adding Cookie Cutter Template for Hypermodern Python
MattLimb Jul 23, 2022
317ef15
Added VSCode Linting and Formatting options
MattLimb Jul 24, 2022
723158b
Removed CLI package click and removed tests pertaining to click.
MattLimb Jul 24, 2022
1019b48
Adding previous JSON Formatters
MattLimb Jul 24, 2022
4d5ed82
Updating documentation to account for new formatters.
MattLimb Jul 24, 2022
65fd348
Adding tests for Bunyan formatter
MattLimb Jul 24, 2022
c1831d8
Tweaking pylogformats in response to tests. Removed unncessassary lin…
MattLimb Jul 24, 2022
9a04493
Running pre-commit hooks manually. Fixed output
MattLimb Jul 24, 2022
3e5b8d2
Fixing Doctests for JSON formats and fixing Bunyan tests
MattLimb Jul 24, 2022
48f7979
Adding tests for JsonFormatter and AdvJsonFormatter
MattLimb Jul 24, 2022
fa46a12
Updating documentation
MattLimb Jul 24, 2022
d020c34
Updating imports on docstrings for JSON formatters
MattLimb Jul 28, 2022
f8b995c
Adding Compact Text Formatter
MattLimb Jul 28, 2022
35a5daa
Added additional test for datetime in the bunyan formatter
MattLimb Jul 28, 2022
71b9d29
Added tests for the Comoact Text Formatter
MattLimb Jul 28, 2022
73ad851
Re-formatting code with black
MattLimb Jul 28, 2022
c718354
Setting a Flake8 ignore due to subclassing a pre-existing non-pep8 co…
MattLimb Jul 28, 2022
6462cf9
Fixing linting and formatting errors
MattLimb Jul 28, 2022
a077f05
Updating docstring on Compact to ensure correct documentation
MattLimb Jul 28, 2022
009e8c7
Adding a new simple text format
MattLimb Jul 28, 2022
38a8bfe
Adding tests for new text format
MattLimb Jul 28, 2022
283fc28
Linting and Formatting Code
MattLimb Jul 28, 2022
44ae7db
Updating docs with new Text Formatters
MattLimb Jul 28, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .cookiecutter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"_output_dir": "K:\\python\\pylogformats",
"_template": "gh:cjolowicz/cookiecutter-hypermodern-python",
"author": "Matt Limb",
"copyright_year": "2022",
"development_status": "Development Status :: 4 - Beta",
"email": "matt.limb17@gmail.com",
"friendly_name": "PyLogFormats",
"github_user": "MattLimb",
"license": "MIT",
"package_name": "pylogformats",
"project_name": "pylogformats",
"version": "1.0.0"
}
2 changes: 2 additions & 0 deletions .darglint
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[darglint]
strictness = long
11 changes: 11 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[flake8]
select = B,B9,C,D,DAR,E,F,N,RST,S,W
ignore = E203,E501,RST201,RST203,RST301,W503
max-line-length = 80
max-complexity = 10
docstring-convention = google
per-file-ignores = tests/*:S101,src/pylogformats/__init__.py:RST307
rst-roles = class,const,func,meth,mod,ref
rst-directives = deprecated
exclude =
noxfile.py,
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
21 changes: 21 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
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
versioning-strategy: lockfile-only
allow:
- dependency-type: "all"
66 changes: 66 additions & 0 deletions .github/labels.yml
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
29 changes: 29 additions & 0 deletions .github/release-drafter.yml
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
5 changes: 5 additions & 0 deletions .github/workflows/constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pip==22.1.2
nox==2022.1.7
nox-poetry==1.0.0
poetry==1.1.13
virtualenv==20.14.1
19 changes: 19 additions & 0 deletions .github/workflows/labeler.yml
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@v3

- name: Run Labeler
uses: crazy-max/ghaction-github-labeler@v4.0.0
with:
skip-delete: true
79 changes: 79 additions & 0 deletions .github/workflows/release.yml
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@v3
with:
fetch-depth: 2

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.10"

- 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.5.0
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.5.0
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.20.0
with:
publish: ${{ steps.check-version.outputs.tag != '' }}
tag: ${{ steps.check-version.outputs.tag }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading