Skip to content

Commit 6bfee93

Browse files
committed
Initial commit
0 parents  commit 6bfee93

35 files changed

+1322
-0
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*/_version_git.py export-subst

.github/pages/index.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Redirecting to master branch</title>
5+
<meta charset="utf-8">
6+
<meta http-equiv="refresh" content="0; url=./master/index.html">
7+
<link rel="canonical" href="master/index.html">
8+
</head>
9+
</html>

.github/workflows/code.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
2+
name: Code CI
3+
4+
on:
5+
push:
6+
pull_request:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
python: ["3.7", "3.8", "3.9"]
15+
16+
steps:
17+
- name: Checkout Source
18+
uses: actions/checkout@v2
19+
20+
- name: Set up Python ${{ matrix.python }}
21+
uses: actions/setup-python@v2
22+
with:
23+
python-version: ${{ matrix.python }}
24+
25+
- name: Install Python Dependencies
26+
run: |
27+
pip install pipenv twine
28+
pipenv install --dev --deploy --python $(which python) && pipenv graph
29+
30+
- name: Check wheel version is specified
31+
run: grep '"wheel":' Pipfile.lock
32+
33+
- name: Create Sdist and Wheel
34+
# for reproducible builds set SOURCE_DATE_EPOCH to the date of the last commit
35+
# See here for more info : https://reproducible-builds.org/
36+
run: |
37+
export SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)
38+
pipenv run build
39+
40+
- name: Run Tests
41+
run: pipenv run tests
42+
43+
- name: Publish Sdist and Wheel to PyPI
44+
# Only once when on a tag
45+
if: matrix.python == '3.7' && startsWith(github.ref, 'refs/tags')
46+
env:
47+
TWINE_USERNAME: __token__
48+
TWINE_PASSWORD: ${{ secrets.pypi_token }}
49+
run: twine upload dist/*
50+
51+
- name: Upload coverage to Codecov
52+
uses: codecov/codecov-action@v1
53+
with:
54+
name: ${{ matrix.python }}
55+
files: cov.xml
56+

.github/workflows/docs.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
2+
name: Docs CI
3+
4+
on:
5+
push:
6+
pull_request:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout Source
14+
uses: actions/checkout@v2
15+
with:
16+
# require all of history to see all tagged versions' docs
17+
fetch-depth: 0
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: "3.7"
23+
24+
- name: Install Packages
25+
# Can delete this if you don't use graphviz in your docs
26+
run: sudo apt-get install graphviz
27+
28+
- name: Install Python Dependencies
29+
run: |
30+
pip install pipenv
31+
pipenv install --dev --deploy --python $(which python) && pipenv graph
32+
33+
- name: Deploy index
34+
# We pin to the SHA, not the tag, for security reasons.
35+
# https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions
36+
uses: peaceiris/actions-gh-pages@bbdfb200618d235585ad98e965f4aafc39b4c501 # v3.7.3
37+
with:
38+
github_token: ${{ secrets.GITHUB_TOKEN }}
39+
publish_dir: .github/pages
40+
keep_files: true
41+
42+
- name: Checkout gh-pages
43+
# As we already did a deploy of gh-pages above, it is guaranteed to be there
44+
# so check it out so we can selectively build docs below
45+
uses: actions/checkout@v2
46+
with:
47+
ref: gh-pages
48+
path: build/html
49+
50+
- name: Maybe use sphinx-multiversion
51+
# If we are building master or a tag we will publish
52+
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')
53+
# So use the args we normally pass to sphinx-build, but run sphinx-multiversion
54+
run: mv $(pipenv --venv)/bin/sphinx-multiversion $(pipenv --venv)/bin/sphinx-build
55+
56+
- name: Build Docs
57+
run: pipenv run docs
58+
59+
- name: Publish Docs to gh-pages
60+
# Only master and tags are published
61+
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')
62+
# We pin to the SHA, not the tag, for security reasons.
63+
# https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions
64+
uses: peaceiris/actions-gh-pages@bbdfb200618d235585ad98e965f4aafc39b4c501 # v3.7.3
65+
with:
66+
github_token: ${{ secrets.GITHUB_TOKEN }}
67+
publish_dir: build/html
68+
keep_files: true
69+

.gitignore

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
5+
# C extensions
6+
*.so
7+
8+
# Distribution / packaging
9+
.Python
10+
env/
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
*.egg-info/
23+
.installed.cfg
24+
*.egg
25+
26+
# PyInstaller
27+
# Usually these files are written by a python script from a template
28+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
29+
*.manifest
30+
*.spec
31+
32+
# Installer logs
33+
pip-log.txt
34+
pip-delete-this-directory.txt
35+
36+
# Unit test / coverage reports
37+
htmlcov/
38+
.tox/
39+
.coverage
40+
.coverage.*
41+
.cache
42+
nosetests.xml
43+
coverage.xml
44+
*,cover
45+
*.mypy_cache
46+
*.pytest_cache
47+
cov.xml
48+
49+
# Translations
50+
*.mo
51+
*.pot
52+
53+
# Django stuff:
54+
*.log
55+
56+
# Sphinx documentation
57+
docs/_build/
58+
59+
# PyBuilder
60+
target/
61+
62+
# DLS build dir and virtual environment
63+
/prefix/
64+
/venv/
65+
/lightweight-venv/
66+
/installed.files
67+

.gitlab-ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
include:
2+
- project: 'controls/reports/ci_templates'
3+
ref: master
4+
file: 'python3/dls_py3_template.yml'

.gitremotes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github [email protected]:dls-controls/k8s_epics_docs.git

.vscode/extensions.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"recommendations": [
3+
"ms-python.vscode-pylance",
4+
"ms-python.python",
5+
"ryanluker.vscode-coverage-gutters"
6+
]
7+
}

.vscode/launch.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Debug Unit Test",
9+
"type": "python",
10+
"request": "test",
11+
"justMyCode": false,
12+
"env": {
13+
"PYTEST_ADDOPTS": "--no-cov"
14+
}
15+
}
16+
]
17+
}

.vscode/settings.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"editor.defaultFormatter": "ms-python.python",
3+
"python.linting.pylintEnabled": false,
4+
"python.linting.flake8Enabled": true,
5+
"python.linting.enabled": true,
6+
"python.testing.pytestArgs": [],
7+
"python.testing.unittestEnabled": false,
8+
"python.testing.nosetestsEnabled": false,
9+
"python.testing.pytestEnabled": true,
10+
"python.formatting.provider": "black",
11+
"python.languageServer": "Pylance",
12+
"editor.formatOnSave": true,
13+
"editor.codeActionsOnSave": {
14+
"source.organizeImports": true
15+
},
16+
}

0 commit comments

Comments
 (0)