-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #136 from twosigma/releng
refresh release engineering
- Loading branch information
Showing
76 changed files
with
1,783 additions
and
1,073 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
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 @@ | ||
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.191.0/containers/python-3/.devcontainer/base.Dockerfile | ||
|
||
# [Choice] Python version: 3, 3.9, 3.8, 3.7, 3.6 | ||
ARG VARIANT="3.10" | ||
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT} | ||
|
||
# [Choice] Node.js version: none, lts, 16, 14, 12, 10 | ||
ARG NODE_VERSION="none" | ||
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi | ||
|
||
# [Optional] If your pip requirements rarely change, uncomment this section to add them to the image. | ||
#COPY requirements-dev.txt /tmp/pip-tmp/ | ||
#RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements-dev.txt \ | ||
# && rm -rf /tmp/pip-tmp | ||
RUN pip3 --disable-pip-version-check --no-cache-dir install pip-tools | ||
|
||
# [Optional] Uncomment this section to install additional OS packages. | ||
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
&& apt-get -y install --no-install-recommends ripgrep | ||
|
||
# [Optional] Uncomment this line to install global node packages. | ||
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1 |
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,58 @@ | ||
// 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.191.0/containers/python-3 | ||
{ | ||
"name": "Python 3", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"context": "..", | ||
"args": { | ||
// Update 'VARIANT' to pick a Python version: 3, 3.6, 3.7, 3.8, 3.9 | ||
"VARIANT": "3.8", | ||
// Options | ||
"NODE_VERSION": "none" | ||
} | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
// Set *default* container specific settings.json values on container create. | ||
"settings": { | ||
"python.defaultInterpreterPath": "/usr/local/bin/python", | ||
"black-formatter.path": ["/usr/local/py-utils/bin/black"], | ||
"flake8.path": ["/usr/local/py-utils/bin/flake8"], | ||
"mypy-type-checker.path": ["/usr/local/py-utils/bin/mypy"], | ||
"files.exclude": { | ||
"**/.git": true, | ||
"**/.svn": true, | ||
"**/.hg": true, | ||
"**/CVS": true, | ||
"**/.DS_Store": true, | ||
"**/Thumbs.db": true, | ||
"**/.coverage": true, | ||
"**/.coverage.*": true, | ||
"**/*.egg-info": true, | ||
".eggs": true, | ||
".tox": true, | ||
"**/dist": true, | ||
"**/__pycache__": true | ||
} | ||
}, | ||
// Add the IDs of extensions you want installed when the container is created. | ||
"extensions": [ | ||
"ms-python.python", | ||
"ms-python.vscode-pylance", | ||
"ms-python.flake8", | ||
"ms-python.black-formatter", | ||
"ms-python.mypy-type-checker", | ||
"tamasfe.even-better-toml", | ||
"lextudio.restructuredtext", | ||
"trond-snekvik.simple-rst" | ||
] | ||
} | ||
}, | ||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
// Use 'postCreateCommand' to run commands after the container is created. | ||
"postCreateCommand": "pip3 install --user -r requirements/dev.txt && pip3 install --user -e marbles/core -e marbles/mixins", | ||
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. | ||
"remoteUser": "vscode" | ||
} |
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
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: Devcontainer CI | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Run devcontainer task | ||
uses: devcontainers/[email protected] | ||
with: | ||
runCmd: nox |
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,15 @@ | ||
name: Read the Docs Pull Request Preview | ||
on: | ||
pull_request: | ||
branches: [main] | ||
|
||
permissions: | ||
pull-requests: write | ||
|
||
jobs: | ||
documentation-links: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: readthedocs/actions/preview@v1 | ||
with: | ||
project-slug: marbles |
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,88 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
||
name: Python package | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
env: | ||
GITHUB_ACTIONS: 1 | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: [ubuntu-latest, macos-latest, windows-latest] | ||
python-version: ["3.8", "3.9", "3.10", "3.11"] | ||
|
||
runs-on: ${{ matrix.platform }} | ||
|
||
env: | ||
PLATFORM: ${{ matrix.platform }} | ||
PYTHON: ${{ matrix.python-version }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install nox | ||
- name: Test | ||
run: nox -p ${PYTHON} -t actions-test | ||
if: ${{ matrix.platform != 'windows-latest' }} | ||
- name: Test | ||
run: nox -p ${env:PYTHON} -t actions-test | ||
if: ${{ matrix.platform == 'windows-latest' }} | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
env_vars: PLATFORM,PYTHON | ||
files: ./coverage.xml | ||
|
||
check: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: [ubuntu-latest, macos-latest, windows-latest] | ||
python-version: ["3.8"] | ||
|
||
runs-on: ${{ matrix.platform }} | ||
|
||
env: | ||
PLATFORM: ${{ matrix.platform }} | ||
PYTHON: ${{ matrix.python-version }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install nox | ||
- name: Lint, build docs, and package | ||
run: nox -t actions-check | ||
- name: Upload docs | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: docs-${{ matrix.platform }} | ||
path: build/sphinx/html | ||
- name: Upload packages | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: packages-${{ matrix.platform }} | ||
path: | | ||
dist | ||
marbles/core/dist | ||
marbles/mixins/dist |
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 |
---|---|---|
|
@@ -6,4 +6,4 @@ dist/ | |
coverage.xml | ||
*.pyc | ||
.eggs | ||
.tox/ | ||
.venv/ |
This file was deleted.
Oops, something went wrong.
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,141 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "Run nox", | ||
"type": "shell", | ||
"command": "nox", | ||
"args": [ | ||
"--python", | ||
"3.8" | ||
], | ||
"options": { | ||
"cwd": "${workspaceFolder}" | ||
}, | ||
"isBackground": false, | ||
"group": { | ||
"kind": "test", | ||
"isDefault": true | ||
} | ||
}, | ||
{ | ||
"label": "Run coverage", | ||
"type": "shell", | ||
"command": "nox", | ||
"args": [ | ||
"--python", | ||
"3.8", | ||
"--session", | ||
"coverage" | ||
], | ||
"options": { | ||
"cwd": "${workspaceFolder}" | ||
}, | ||
"isBackground": false, | ||
"group": { | ||
"kind": "test", | ||
"isDefault": false | ||
}, | ||
"presentation": { | ||
"echo": true, | ||
"reveal": "always", | ||
"focus": false, | ||
"panel": "dedicated", | ||
"showReuseMessage": false, | ||
"clear": true | ||
}, | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "Serve coverage", | ||
"type": "shell", | ||
"command": "nox", | ||
"args": [ | ||
"--session", | ||
"serve_coverage" | ||
], | ||
"options": { | ||
"cwd": "${workspaceFolder}" | ||
}, | ||
"group": "none", | ||
"presentation": { | ||
"echo": true, | ||
"reveal": "never", | ||
"focus": false, | ||
"panel": "dedicated", | ||
"showReuseMessage": false, | ||
"clear": true | ||
}, | ||
"problemMatcher": [], | ||
"isBackground": true, | ||
"dependsOn": [ | ||
"Run coverage" | ||
] | ||
}, | ||
{ | ||
"label": "Build docs", | ||
"type": "shell", | ||
"command": "nox", | ||
"args": [ | ||
"--session", | ||
"docs" | ||
], | ||
"options": { | ||
"cwd": "${workspaceFolder}" | ||
}, | ||
"isBackground": false, | ||
"group": { | ||
"kind": "build", | ||
"isDefault": false | ||
}, | ||
"presentation": { | ||
"echo": true, | ||
"reveal": "silent", | ||
"focus": false, | ||
"panel": "dedicated", | ||
"showReuseMessage": false, | ||
"clear": true | ||
}, | ||
"problemMatcher": { | ||
"owner": "rst", | ||
"applyTo": "allDocuments", | ||
"fileLocation": "autoDetect", | ||
"pattern": { | ||
"regexp": "^(.*):(\\d+):\\s*([A-Za-z]*):(.*)$", | ||
"file": 1, | ||
"location": 2, | ||
"severity": 3, | ||
"message": 4 | ||
} | ||
} | ||
}, | ||
{ | ||
"label": "Serve docs", | ||
"type": "shell", | ||
"command": "nox", | ||
"args": [ | ||
"--session", | ||
"serve_docs" | ||
], | ||
"options": { | ||
"cwd": "${workspaceFolder}" | ||
}, | ||
"group": "none", | ||
"presentation": { | ||
"echo": true, | ||
"reveal": "never", | ||
"focus": false, | ||
"panel": "dedicated", | ||
"showReuseMessage": false, | ||
"clear": true | ||
}, | ||
"problemMatcher": [], | ||
"isBackground": true, | ||
"dependsOn": [ | ||
"Build docs" | ||
] | ||
} | ||
] | ||
} |
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
Oops, something went wrong.