Skip to content

Commit

Permalink
run auto formatters
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed Apr 7, 2022
1 parent a9c39b3 commit d6a8168
Show file tree
Hide file tree
Showing 37 changed files with 1,593 additions and 1,501 deletions.
63 changes: 31 additions & 32 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,15 @@ name: "CodeQL"

on:
push:
branches: [ master ]
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
branches: [master]
schedule:
- cron: '41 6 * * 6'
- cron: "41 6 * * 6"

permissions:
security-events:
write
security-events: write

jobs:
analyze:
Expand All @@ -33,41 +32,41 @@ jobs:
strategy:
fail-fast: false
matrix:
language: ['python' ]
language: ["python"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
queries: security-and-quality
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
queries: security-and-quality

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
63 changes: 31 additions & 32 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ name: Python package
on:
push:
pull_request:
branches: [ "master" ]
branches: ["master"]

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand All @@ -22,33 +21,33 @@ jobs:
- os: windows-latest
python-version: 3.10-dev
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: pip cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: |
${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('dev-requirements.txt', 'setup.cfg') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade setuptools wheel
pip install -r dev-requirements.txt .
- name: Test with pytest
run: |
pytest -vv jupyter_core --timeout 60 --cov jupyter_core --cov-report term-missing:skip-covered
- name: Check manifest
run: |
pip install check-manifest
check-manifest -v
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: pip cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: |
${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('dev-requirements.txt', 'setup.cfg') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade setuptools wheel
pip install -r dev-requirements.txt .
- name: Test with pytest
run: |
pytest -vv jupyter_core --timeout 60 --cov jupyter_core --cov-report term-missing:skip-covered
- name: Check manifest
run: |
pip install check-manifest
check-manifest -v
68 changes: 34 additions & 34 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,41 @@ repos:
rev: v4.1.0
hooks:
- id: debug-statements
# - id: end-of-file-fixer
# - id: check-case-conflict
# - id: check-executables-have-shebangs
# - id: requirements-txt-fixer
# - id: check-added-large-files
# - id: check-case-conflict
# - id: check-toml
# - id: check-yaml
# - id: forbid-new-submodules
# - id: check-builtin-literals
# - id: trailing-whitespace
- id: end-of-file-fixer
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: requirements-txt-fixer
- id: check-added-large-files
- id: check-case-conflict
- id: check-toml
- id: check-yaml
- id: forbid-new-submodules
- id: check-builtin-literals
- id: trailing-whitespace

# - repo: https://github.com/psf/black
# rev: 22.3.0
# hooks:
# - id: black
# args: ["--line-length", "100"]
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
args: ["--line-length", "100"]

# - repo: https://github.com/PyCQA/isort
# rev: 5.10.1
# hooks:
# - id: isort
# files: \.py$
# args: [--profile=black]
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort
files: \.py$
args: [--profile=black]

# - repo: https://github.com/pre-commit/mirrors-prettier
# rev: v2.6.2
# hooks:
# - id: prettier
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.6.2
hooks:
- id: prettier

# - repo: https://github.com/asottile/pyupgrade
# rev: v2.31.1
# hooks:
# - id: pyupgrade
# args: [--py37-plus]
- repo: https://github.com/asottile/pyupgrade
rev: v2.31.1
hooks:
- id: pyupgrade
args: [--py37-plus]

- repo: https://github.com/PyCQA/doc8
rev: 0.11.1
Expand All @@ -59,10 +59,10 @@ repos:
# "flake8-implicit-str-concat==0.2.0",
# ]

# - repo: https://github.com/pre-commit/mirrors-eslint
# rev: v8.12.0
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v0.942
# hooks:
# - id: eslint
# - id: mypy

- repo: https://github.com/sirosen/check-jsonschema
rev: 0.14.2
Expand Down
8 changes: 4 additions & 4 deletions COPYING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Expand All @@ -35,7 +35,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
## About the Jupyter Development Team

The Jupyter Development Team is the set of all contributors to the Jupyter
project. This includes all of the Jupyter subprojects. A full list with
project. This includes all of the Jupyter subprojects. A full list with
details is kept in the documentation directory, in the file
`about/credits.txt`.

Expand All @@ -48,8 +48,8 @@ Jupyter uses a shared copyright model. Each contributor maintains copyright
over their contributions to Jupyter. It is important to note that these
contributions are typically only changes to the repositories. Thus, the Jupyter
source code in its entirety is not the copyright of any single person or
institution. Instead, it is the collective copyright of the entire Jupyter
Development Team. If individual contributors want to maintain a record of what
institution. Instead, it is the collective copyright of the entire Jupyter
Development Team. If individual contributors want to maintain a record of what
changes/contributions they have specific copyright on, they should indicate
their copyright in the commit message of the change, when they commit the
change to one of the Jupyter repositories.
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Core common functionality of Jupyter projects.
This package contains base application classes and configuration inherited by other projects.
It doesn't do much on its own.


# Development Setup

The [Jupyter Contributor Guides](http://jupyter.readthedocs.io/en/latest/contributor/content-contributor.html) provide extensive information on contributing code or documentation to Jupyter projects. The limited instructions below for setting up a development environment are for your convenience.
Expand All @@ -23,8 +22,8 @@ and download the dependencies of code and test suite by executing:

The last command runs the test suite to verify the setup. During development, you can pass filenames to `py.test`, and it will execute only those tests.


## Code Styling

`jupyter_core` has adopted automatic code formatting so you shouldn't
need to worry too much about your code style.
As long as your code is valid,
Expand Down Expand Up @@ -69,5 +68,4 @@ The following commands build the documentation in HTML format and check for brok

Point your browser to the following URL to access the generated documentation:

_file:///my/projects/jupyter\_core/docs/\_build/html/index.html_

_file:///my/projects/jupyter_core/docs/\_build/html/index.html_
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ipykernel
pre-commit
pytest
pytest-cov
pytest-timeout
pre-commit
Loading

0 comments on commit d6a8168

Please sign in to comment.