Skip to content

Commit db6815a

Browse files
committed
initial files
1 parent d884dce commit db6815a

24 files changed

+1100
-129
lines changed

.gitconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[blame]
2+
ignoreRevsFile = .git-blame-ignore-revs
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Check Release
2+
on:
3+
push:
4+
branches: ["main"]
5+
pull_request:
6+
branches: ["*"]
7+
8+
jobs:
9+
check_release:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
group: [check_release, link_check]
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
- name: Base Setup
18+
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
19+
- name: Install Dependencies
20+
run: |
21+
pip install -e .
22+
- name: Check Release
23+
if: ${{ matrix.group == 'check_release' }}
24+
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v1
25+
with:
26+
token: ${{ secrets.GITHUB_TOKEN }}
27+
- name: Run Link Check
28+
if: ${{ matrix.group == 'link_check' }}
29+
uses: jupyter-server/jupyter_releaser/.github/actions/check-links@v1
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
# ******** NOTE ********
12+
13+
name: "CodeQL"
14+
15+
on:
16+
push:
17+
branches: ["main"]
18+
pull_request:
19+
# The branches below must be a subset of the branches above
20+
branches: ["main"]
21+
schedule:
22+
- cron: "25 18 * * 4"
23+
24+
permissions:
25+
security-events: write
26+
27+
jobs:
28+
analyze:
29+
name: Analyze
30+
runs-on: ubuntu-latest
31+
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
language: ["python"]
36+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
37+
# Learn more...
38+
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
39+
40+
steps:
41+
- name: Checkout repository
42+
uses: actions/checkout@v2
43+
44+
# Initializes the CodeQL tools for scanning.
45+
- name: Initialize CodeQL
46+
uses: github/codeql-action/init@v1
47+
with:
48+
languages: ${{ matrix.language }}
49+
# If you wish to specify custom queries, you can do so here or in a config file.
50+
# By default, queries listed here will override any specified in a config file.
51+
# Prefix the list here with "+" to use these queries and those in the config file.
52+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
53+
queries: security-and-quality
54+
55+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
56+
# If this step fails, then you should remove it and run the build manually (see below)
57+
- name: Autobuild
58+
uses: github/codeql-action/autobuild@v1
59+
60+
# ℹ️ Command-line programs to run using the OS shell.
61+
# 📚 https://git.io/JvXDl
62+
63+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
64+
# and modify them (or add more) to build your code if your project
65+
# uses a compiled language
66+
67+
#- run: |
68+
# make bootstrap
69+
# make release
70+
71+
- name: Perform CodeQL Analysis
72+
uses: github/codeql-action/analyze@v1
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Enforce PR label
2+
3+
on:
4+
pull_request:
5+
types: [labeled, unlabeled, opened, edited, synchronize]
6+
jobs:
7+
enforce-label:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: enforce-triage-label
11+
uses: jupyterlab/maintainer-tools/.github/actions/enforce-label@v1

.github/workflows/test.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Tests
2+
on:
3+
push:
4+
branches: "main"
5+
pull_request:
6+
branches: "*"
7+
jobs:
8+
# Run "pre-commit run --all-files"
9+
pre-commit:
10+
runs-on: ubuntu-20.04
11+
timeout-minutes: 2
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: actions/setup-python@v2
16+
with:
17+
python-version: 3.8
18+
19+
# ref: https://github.com/pre-commit/action
20+
- uses: pre-commit/[email protected]
21+
- name: Help message if pre-commit fail
22+
if: ${{ failure() }}
23+
run: |
24+
echo "You can install pre-commit hooks to automatically run formatting"
25+
echo "on each commit with:"
26+
echo " pre-commit install"
27+
echo "or you can run by hand on staged files with"
28+
echo " pre-commit run"
29+
echo "or after-the-fact on already committed files with"
30+
echo " pre-commit run --all-files"
31+
32+
test:
33+
runs-on: ${{ matrix.os }}-latest
34+
strategy:
35+
fail-fast: false
36+
matrix:
37+
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
38+
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "pypy3"]
39+
steps:
40+
- name: Checkout
41+
uses: actions/checkout@v2
42+
- name: Base Setup
43+
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
44+
- name: Install the Python dependencies
45+
run: |
46+
pip install -e ".[test]" codecov
47+
- name: List installed packages
48+
run: |
49+
pip freeze
50+
pip check
51+
- name: Run the tests with Coverage
52+
if: ${{ matrix.python-version != 'pypy3' || !startsWith(runner.os, 'Windows') }}
53+
run: |
54+
pytest -vv jupyter_server_terminals --cov jupyter_server_terminals --cov-branch --cov-report term-missing:skip-covered
55+
- name: Run the tests on pypy and Windows
56+
if: ${{ matrix.python-version == 'pypy3' || startsWith(runner.os, 'Windows') }}
57+
run: |
58+
pytest -vv jupyter_server_terminals
59+
- name: Coverage
60+
if: ${{ matrix.python-version != 'pypy3' }}
61+
run: |
62+
codecov
63+
- name: Test full install
64+
if: ${{ matrix.python-version != 'pypy3' || !startsWith(runner.os, 'Windows') }}
65+
run: |
66+
python -m venv test_install
67+
./test_install/bin/python -m pip install -U pip
68+
./test_install/bin/python -m pip install ".[test]"
69+
pushd test_install
70+
./bin/pytest --pyargs jupyter_server_terminals
71+
popd

.gitignore

Lines changed: 38 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -1,129 +1,40 @@
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
281
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
2+
build
3+
dist
4+
_build
5+
docs/man/*.gz
6+
docs/source/api/generated
7+
docs/source/config.rst
8+
docs/gh-pages
9+
node_modules
10+
*.py[co]
11+
__pycache__
12+
*.egg-info
13+
*~
14+
*.bak
7815
.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/
16+
.tox
17+
.DS_Store
18+
\#*#
19+
.#*
20+
.coverage*
21+
.pytest_cache
22+
src
23+
24+
*.swp
25+
*.map
26+
Read the Docs
27+
config.rst
28+
29+
/.project
30+
/.pydevproject
31+
32+
# jetbrains ide stuff
33+
*.iml
34+
.idea/
35+
36+
# vscode ide stuff
37+
*.code-workspace
38+
.history
39+
.vscode/*
40+
!.vscode/*.template

.pre-commit-config.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
repos:
2+
- repo: https://github.com/asottile/reorder_python_imports
3+
rev: v1.9.0
4+
hooks:
5+
- id: reorder-python-imports
6+
- repo: https://github.com/psf/black
7+
rev: 20.8b1
8+
hooks:
9+
- id: black
10+
args: ["--line-length", "100"]
11+
- repo: https://gitlab.com/pycqa/flake8
12+
rev: "3.8.4"
13+
hooks:
14+
- id: flake8
15+
- repo: https://github.com/pre-commit/pre-commit-hooks
16+
rev: v3.4.0
17+
hooks:
18+
- id: end-of-file-fixer
19+
- id: check-case-conflict
20+
- id: check-executables-have-shebangs
21+
- id: requirements-txt-fixer

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
<!-- <START NEW CHANGELOG ENTRY> -->
6+
7+
<!-- <END NEW CHANGELOG ENTRY> -->

0 commit comments

Comments
 (0)