Skip to content

Commit 79f9edc

Browse files
authored
Initial commit
0 parents  commit 79f9edc

Some content is hidden

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

41 files changed

+1803
-0
lines changed

.devcontainer/Dockerfile

+12
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

+44
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

+22
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

+21
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

+21
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/[email protected]
14+
with:
15+
workdir: '.'
16+
17+
publish:
18+
uses: microsoft/action-python/.github/workflows/[email protected]
19+
secrets:
20+
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
21+
TEST_PYPI_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }}

.github/workflows/publish.yml

+10
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/[email protected]
8+
secrets:
9+
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
10+
TEST_PYPI_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }}
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/[email protected]
16+
with:
17+
# [Required] Access token with `workflow` scope.
18+
token: ${{ secrets.PAT }}
19+
20+
- name: Run GitHub Actions Version Updater
21+
uses: saadmk11/[email protected]
22+
with:
23+
# [Required] Access token with `workflow` scope.
24+
token: ${{ secrets.PAT }}
25+
pull_request_title: "ci: Update GitHub Actions to Latest Version"
+17
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/[email protected]
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/sphinx.yml

+18
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

.github/workflows/template-sync.yml

+12
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/[email protected] # important!
9+
- uses: euphoricsystems/[email protected]
10+
with:
11+
github-token: ${{ secrets.GITHUB_TOKEN }}
12+
dry-run: true

.gitignore

+129
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
pip-wheel-metadata/
24+
share/python-wheels/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
MANIFEST
29+
30+
# PyInstaller
31+
# Usually these files are written by a python script from a template
32+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
33+
*.manifest
34+
*.spec
35+
36+
# Installer logs
37+
pip-log.txt
38+
pip-delete-this-directory.txt
39+
40+
# Unit test / coverage reports
41+
htmlcov/
42+
.tox/
43+
.nox/
44+
.coverage
45+
.coverage.*
46+
.cache
47+
nosetests.xml
48+
coverage.xml
49+
*.cover
50+
*.py,cover
51+
.hypothesis/
52+
.pytest_cache/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
target/
76+
77+
# Jupyter Notebook
78+
.ipynb_checkpoints
79+
80+
# IPython
81+
profile_default/
82+
ipython_config.py
83+
84+
# pyenv
85+
.python-version
86+
87+
# pipenv
88+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
90+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
91+
# install all needed dependencies.
92+
#Pipfile.lock
93+
94+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
95+
__pypackages__/
96+
97+
# Celery stuff
98+
celerybeat-schedule
99+
celerybeat.pid
100+
101+
# SageMath parsed files
102+
*.sage.py
103+
104+
# Environments
105+
.env
106+
.venv
107+
env/
108+
venv/
109+
ENV/
110+
env.bak/
111+
venv.bak/
112+
113+
# Spyder project settings
114+
.spyderproject
115+
.spyproject
116+
117+
# Rope project settings
118+
.ropeproject
119+
120+
# mkdocs documentation
121+
/site
122+
123+
# mypy
124+
.mypy_cache/
125+
.dmypy.json
126+
dmypy.json
127+
128+
# Pyre type checker
129+
.pyre/

0 commit comments

Comments
 (0)