Skip to content

Commit

Permalink
Merge pull request #23 from tim-s-ccs/reconfigure-the-project-a-bit
Browse files Browse the repository at this point in the history
Reconfigure the project to make it more like other projects
  • Loading branch information
tim-s-ccs authored Nov 1, 2024
2 parents 4e44c02 + 1b1035d commit 27abbfb
Show file tree
Hide file tree
Showing 40 changed files with 446 additions and 1,285 deletions.
13 changes: 13 additions & 0 deletions .flake8
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
1 change: 0 additions & 1 deletion .github/CODEOWNERS

This file was deleted.

38 changes: 0 additions & 38 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

33 changes: 16 additions & 17 deletions .github/dependabot.yml
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"
72 changes: 0 additions & 72 deletions .github/workflows/codeql.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/workflows/dependency-review.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/publish.yml
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/*
45 changes: 0 additions & 45 deletions .github/workflows/python-package.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/workflows/python-publish.yml

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/release.yml
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 }}
Loading

0 comments on commit 27abbfb

Please sign in to comment.