generated from microsoft/python-package-template
-
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.
- Loading branch information
0 parents
commit cd2d503
Showing
41 changed files
with
1,803 additions
and
0 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,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 |
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,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" | ||
} |
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,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: " |
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,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" |
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,21 @@ | ||
name: Python CI | ||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
release: | ||
types: [created] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
validation: | ||
uses: microsoft/action-python/.github/workflows/[email protected] | ||
with: | ||
workdir: '.' | ||
|
||
publish: | ||
uses: microsoft/action-python/.github/workflows/[email protected] | ||
secrets: | ||
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
TEST_PYPI_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }} |
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,10 @@ | ||
name: Python Publish Workflow | ||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
publish: | ||
uses: microsoft/action-python/.github/workflows/[email protected] | ||
secrets: | ||
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
TEST_PYPI_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }} |
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,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/[email protected] | ||
with: | ||
# [Required] Access token with `workflow` scope. | ||
token: ${{ secrets.PAT }} | ||
|
||
- name: Run GitHub Actions Version Updater | ||
uses: saadmk11/[email protected] | ||
with: | ||
# [Required] Access token with `workflow` scope. | ||
token: ${{ secrets.PAT }} | ||
pull_request_title: "ci: Update GitHub Actions to Latest Version" |
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,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/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,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 |
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,12 @@ | ||
name: Template Sync | ||
on: | ||
workflow_dispatch: | ||
jobs: | ||
sync: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] # important! | ||
- uses: euphoricsystems/[email protected] | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
dry-run: true |
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,129 @@ | ||
# 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/ | ||
pip-wheel-metadata/ | ||
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/ | ||
|
||
# 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 | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
.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 | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow | ||
__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/ |
Oops, something went wrong.