Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
gitworkflows authored Jul 7, 2024
0 parents commit 7cf735c
Show file tree
Hide file tree
Showing 39 changed files with 1,802 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM mcr.microsoft.com/devcontainers/python:3

RUN python -m pip install --upgrade pip \
&& python -m pip install 'flit>=3.8.0'

ENV FLIT_ROOT_INSTALL=1

COPY pyproject.toml .
RUN touch README.md \
&& mkdir -p src/python_package \
&& python -m flit install --only-deps --deps develop \
&& rm -r pyproject.toml README.md src
44 changes: 44 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.222.0/containers/python-3-miniconda
{
"name": "Python Environment",
"build": {
"dockerfile": "Dockerfile",
"context": ".."
},
"customizations": {
"vscode": {
"extensions": [
"editorconfig.editorconfig",
"github.vscode-pull-request-github",
"ms-azuretools.vscode-docker",
"ms-python.python",
"ms-python.vscode-pylance",
"ms-python.pylint",
"ms-python.isort",
"ms-python.flake8",
"ms-python.black-formatter",
"ms-vsliveshare.vsliveshare",
"ryanluker.vscode-coverage-gutters",
"bungcip.better-toml",
"GitHub.copilot"
],
"settings": {
"python.defaultInterpreterPath": "/usr/local/bin/python",
"black-formatter.path": [
"/usr/local/py-utils/bin/black"
],
"pylint.path": [
"/usr/local/py-utils/bin/pylint"
],
"flake8.path": [
"/usr/local/py-utils/bin/flake8"
],
"isort.path": [
"/usr/local/py-utils/bin/isort"
]
}
}
},
"onCreateCommand": "pre-commit install-hooks"
}
22 changes: 22 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: 2
updates:
- package-ecosystem: pip
directory: "/"
schedule:
interval: daily
time: "13:00"
open-pull-requests-limit: 10
reviewers:
- dciborow
allow:
- dependency-type: direct
- dependency-type: indirect
commit-message:
prefix: "fix: "
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: daily
time: "13:00"
commit-message:
prefix: "fix: "
21 changes: 21 additions & 0 deletions .github/template-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
files:
- ".gitignore" # include
- ".github"
- ".vscode"
- "tests/conftest.py"
- ".flake8"
- ".pre-commit-config.yml"
- ".pypirc"
- "docs"
- "src/README.md"
- "CODE_OF_CONDUCT.md"
- "LICENSE"
- "README.md"
- "SECURITY.md"
- "SUPPORT.md"
- "pyproject.toml"

- "!.github/workflows/template-sync.yml"
- "!.github/template-sync.yml"
- "!src/python_project"
- "!tests/test_methods.py"
15 changes: 15 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Python CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
release:
types: [created]
workflow_dispatch:

jobs:
validation:
uses: microsoft/action-python/.github/workflows/validation.yml@0.7.3
with:
workdir: '.'
25 changes: 25 additions & 0 deletions .github/workflows/schedule-update-actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: GitHub Actions Version Updater

# Controls when the action will run.
on:
workflow_dispatch:
schedule:
# Automatically run on every Sunday
- cron: '0 0 * * 0'

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4.1.7
with:
# [Required] Access token with `workflow` scope.
token: ${{ secrets.PAT }}

- name: Run GitHub Actions Version Updater
uses: saadmk11/github-actions-version-updater@v0.8.1
with:
# [Required] Access token with `workflow` scope.
token: ${{ secrets.PAT }}
pull_request_title: "ci: Update GitHub Actions to Latest Version"
17 changes: 17 additions & 0 deletions .github/workflows/semantic-pr-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: "Semantic PR Check"

on:
pull_request_target:
types:
- opened
- edited
- synchronize

jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5.5.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18 changes: 18 additions & 0 deletions .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Deploy Sphinx documentation to Pages

on:
push:
branches: [main] # branch to trigger deployment

jobs:
pages:
runs-on: ubuntu-20.04
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
id-token: write
steps:
- id: deployment
uses: sphinx-notes/pages@v3
12 changes: 12 additions & 0 deletions .github/workflows/template-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Template Sync
on:
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.7 # important!
- uses: euphoricsystems/action-sync-template-repository@v2.5.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
dry-run: true
160 changes: 160 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
Loading

0 comments on commit 7cf735c

Please sign in to comment.