Skip to content

Commit a0edc3f

Browse files
Initial commit
0 parents  commit a0edc3f

41 files changed

Lines changed: 1803 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM mcr.microsoft.com/devcontainers/python:3
2+
3+
RUN python -m pip install --upgrade pip \
4+
&& python -m pip install 'flit>=3.8.0'
5+
6+
ENV FLIT_ROOT_INSTALL=1
7+
8+
COPY pyproject.toml .
9+
RUN touch README.md \
10+
&& mkdir -p src/python_package \
11+
&& python -m flit install --only-deps --deps develop \
12+
&& rm -r pyproject.toml README.md src

.devcontainer/devcontainer.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.222.0/containers/python-3-miniconda
3+
{
4+
"name": "Python Environment",
5+
"build": {
6+
"dockerfile": "Dockerfile",
7+
"context": ".."
8+
},
9+
"customizations": {
10+
"vscode": {
11+
"extensions": [
12+
"editorconfig.editorconfig",
13+
"github.vscode-pull-request-github",
14+
"ms-azuretools.vscode-docker",
15+
"ms-python.python",
16+
"ms-python.vscode-pylance",
17+
"ms-python.pylint",
18+
"ms-python.isort",
19+
"ms-python.flake8",
20+
"ms-python.black-formatter",
21+
"ms-vsliveshare.vsliveshare",
22+
"ryanluker.vscode-coverage-gutters",
23+
"bungcip.better-toml",
24+
"GitHub.copilot"
25+
],
26+
"settings": {
27+
"python.defaultInterpreterPath": "/usr/local/bin/python",
28+
"black-formatter.path": [
29+
"/usr/local/py-utils/bin/black"
30+
],
31+
"pylint.path": [
32+
"/usr/local/py-utils/bin/pylint"
33+
],
34+
"flake8.path": [
35+
"/usr/local/py-utils/bin/flake8"
36+
],
37+
"isort.path": [
38+
"/usr/local/py-utils/bin/isort"
39+
]
40+
}
41+
}
42+
},
43+
"onCreateCommand": "pre-commit install-hooks"
44+
}

.github/dependabot.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: pip
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
time: "13:00"
8+
open-pull-requests-limit: 10
9+
reviewers:
10+
- dciborow
11+
allow:
12+
- dependency-type: direct
13+
- dependency-type: indirect
14+
commit-message:
15+
prefix: "fix: "
16+
- package-ecosystem: "github-actions"
17+
directory: "/"
18+
schedule:
19+
interval: daily
20+
time: "13:00"
21+
commit-message:
22+
prefix: "fix: "

.github/template-sync.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
files:
2+
- ".gitignore" # include
3+
- ".github"
4+
- ".vscode"
5+
- "tests/conftest.py"
6+
- ".flake8"
7+
- ".pre-commit-config.yml"
8+
- ".pypirc"
9+
- "docs"
10+
- "src/README.md"
11+
- "CODE_OF_CONDUCT.md"
12+
- "LICENSE"
13+
- "README.md"
14+
- "SECURITY.md"
15+
- "SUPPORT.md"
16+
- "pyproject.toml"
17+
18+
- "!.github/workflows/template-sync.yml"
19+
- "!.github/template-sync.yml"
20+
- "!src/python_project"
21+
- "!tests/test_methods.py"

.github/workflows/CI.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Python CI
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
7+
release:
8+
types: [created]
9+
workflow_dispatch:
10+
11+
jobs:
12+
validation:
13+
uses: microsoft/action-python/.github/workflows/validation.yml@0.6.4
14+
with:
15+
workdir: '.'
16+
17+
publish:
18+
uses: microsoft/action-python/.github/workflows/publish.yml@0.6.4
19+
secrets:
20+
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
21+
TEST_PYPI_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }}

.github/workflows/publish.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Python Publish Workflow
2+
on:
3+
workflow_call:
4+
5+
jobs:
6+
publish:
7+
uses: microsoft/action-python/.github/workflows/publish.yml@0.6.4
8+
secrets:
9+
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
10+
TEST_PYPI_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: GitHub Actions Version Updater
2+
3+
# Controls when the action will run.
4+
on:
5+
workflow_dispatch:
6+
schedule:
7+
# Automatically run on every Sunday
8+
- cron: '0 0 * * 0'
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v3.5.2
16+
with:
17+
# [Required] Access token with `workflow` scope.
18+
token: ${{ secrets.PAT }}
19+
20+
- name: Run GitHub Actions Version Updater
21+
uses: saadmk11/github-actions-version-updater@v0.7.4
22+
with:
23+
# [Required] Access token with `workflow` scope.
24+
token: ${{ secrets.PAT }}
25+
pull_request_title: "ci: Update GitHub Actions to Latest Version"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: "Semantic PR Check"
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
10+
jobs:
11+
main:
12+
name: Validate PR title
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: amannn/action-semantic-pull-request@v5.2.0
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/sphinx.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Deploy Sphinx documentation to Pages
2+
3+
on:
4+
push:
5+
branches: [main] # branch to trigger deployment
6+
7+
jobs:
8+
pages:
9+
runs-on: ubuntu-20.04
10+
environment:
11+
name: github-pages
12+
url: ${{ steps.deployment.outputs.page_url }}
13+
permissions:
14+
pages: write
15+
id-token: write
16+
steps:
17+
- id: deployment
18+
uses: sphinx-notes/pages@v3
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Template Sync
2+
on:
3+
workflow_dispatch:
4+
jobs:
5+
sync:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v3.5.2 # important!
9+
- uses: euphoricsystems/action-sync-template-repository@v2.5.1
10+
with:
11+
github-token: ${{ secrets.GITHUB_TOKEN }}
12+
dry-run: true

0 commit comments

Comments
 (0)