forked from LandRegistry/govuk-frontend-jinja
-
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.
Merge pull request #23 from tim-s-ccs/reconfigure-the-project-a-bit
Reconfigure the project to make it more like other projects
- Loading branch information
Showing
40 changed files
with
446 additions
and
1,285 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,13 @@ | ||
[flake8] | ||
# Rule definitions: http://flake8.pycqa.org/en/latest/user/error-codes.html | ||
# D203: 1 blank line required before class docstring | ||
# F401: 'identifier' imported but unused | ||
# E402: module level import not at top of file | ||
# C901: too complex | ||
# W503: line break before binary operator | ||
exclude = venv*,__pycache__,node_modules,bower_components | ||
ignore = D203,W503,W504 | ||
max-complexity = 12 | ||
max-line-length = 120 | ||
per-file-ignores = | ||
app/__init__.py : E501 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,19 +1,18 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
# - package-ecosystem: "pip" # See documentation for possible values | ||
# directory: "/" # Location of package manifests | ||
# schedule: | ||
# interval: "daily" | ||
|
||
- package-ecosystem: npm | ||
directory: / | ||
open-pull-requests-limit: 10 | ||
|
||
schedule: | ||
interval: weekly | ||
day: "sunday" | ||
- package-ecosystem: pip | ||
directory: "/" | ||
schedule: | ||
interval: weekly | ||
time: "03:00" | ||
open-pull-requests-limit: 10 | ||
- package-ecosystem: "npm" | ||
directory: "/" | ||
schedule: | ||
interval: weekly | ||
time: "03:00" | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: weekly | ||
time: "03:00" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,36 @@ | ||
# Upload a Python package to PyPI when a release is created | ||
# | ||
# For more information see: | ||
# https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries | ||
|
||
name: Upload Python package to PyPI | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
publish: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine | ||
- name: Build and publish | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
twine upload dist/* |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,47 @@ | ||
# Create a release using the version number from the Python package | ||
# | ||
# This workflow is designed to create a GitHub release whenever a pull request | ||
# is merged to the main branch that updates the version number for this repo's | ||
# Python package. | ||
# | ||
# The release is created with the tag and name of the version number. | ||
# | ||
# If there already exists a tag for the package version number the release | ||
# should not be created. | ||
|
||
name: Create a GitHub release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Get package version | ||
id: package_version | ||
run: echo "python=$(python setup.py --version)" >> $GITHUB_OUTPUT | ||
|
||
- name: Check if version tag already exists | ||
id: version_tag | ||
uses: mukunku/tag-exists-action@bdad1eaa119ce71b150b952c97351c75025c06a9 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag: ${{ steps.package_version.outputs.python }} | ||
|
||
- name: Create GitHub release | ||
if: ${{ steps.version_tag.outputs.exists == 'false' }} | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
token: ${{ secrets.DM_GITHUB_TOKEN }} | ||
tag: ${{ steps.package_version.outputs.python }} | ||
name: Release v${{ steps.package_version.outputs.python }} |
Oops, something went wrong.