Skip to content

Commit

Permalink
Merge pull request #67 from MC-kit/devel
Browse files Browse the repository at this point in the history
Devel
  • Loading branch information
dvp2015 authored Oct 4, 2022
2 parents 67c2545 + 71f5ff5 commit 5f77150
Show file tree
Hide file tree
Showing 14 changed files with 271 additions and 339 deletions.
4 changes: 4 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ ignore=
E501
# W503: Line break before binary operator: for compatibility with black settings
W503
# import is controlled by isort
I100
I201
I202
exclude=
.git
__pycache__
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v2
uses: actions/checkout@v3.1.0

- name: Sync GitHub Issue Labels
uses: crazy-max/ghaction-github-labeler@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ jobs:
draft_release:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
- uses: release-drafter/release-drafter@v5.21.0
env:
GITHUB_TOKEN: ${{ secrets.MCKIT_GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v3
uses: actions/checkout@v3.1.0
with:
fetch-depth: 2

Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
repository_url: https://test.pypi.org/legacy/

- name: Publish the release notes
uses: release-drafter/release-drafter@v5.15.0
uses: release-drafter/release-drafter@v5.21.0
with:
publish: ${{ steps.check-version.outputs.tag != '' }}
tag: ${{ steps.check-version.outputs.tag }}
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
- "**.yaml"
- "**.yml"
- "**.toml"
- "**/data/**"
- ".github/constraints.txt"
pull_request:
branches:
Expand All @@ -35,7 +36,7 @@ jobs:
!contains(github.event.head_commit.message, '[skip_ci]')
steps:
- name: Check out the repository
uses: actions/checkout@v3
uses: actions/checkout@v3.1.0

- name: Set up Python 3.10
uses: actions/[email protected]
Expand Down Expand Up @@ -75,7 +76,7 @@ jobs:
needs: lint
steps:
- name: Check out the repository
uses: actions/checkout@v3
uses: actions/checkout@v3.1.0

- name: Set up Python 3.10
uses: actions/[email protected]
Expand Down Expand Up @@ -114,13 +115,13 @@ jobs:
python-version: ['3.8', '3.9', '3.10']
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v3.1.0
- uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Checkout submodules
run: git submodule update --init --recursive --depth=1
# - name: Checkout submodules
# run: git submodule update --init --recursive --depth=1
- name: Install nox
run: pip install --constraint=.github/constraints.txt nox
- name: Install poetry
Expand All @@ -138,7 +139,7 @@ jobs:
needs: tests
steps:
- name: Check out the repository
uses: actions/checkout@v3
uses: actions/checkout@v3.1.0

- name: Set up Python 3.10
uses: actions/[email protected]
Expand Down
15 changes: 15 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ repos:
# entry: poetry run blacken-docs
# language: system

#- repo: https://github.com/sirosen/texthooks
# rev: "0.3.1"
# hooks:
# - id: fix-ligatures
# - id: fix-smartquotes


# Checking for common mistakes
#- repo: https://github.com/pre-commit/pygrep-hooks
Expand Down Expand Up @@ -116,6 +122,15 @@ repos:
# types: [file]
# files: (\.cmake|CMakeLists.txt)(.in)?$

# Check static types with mypy
#- repo: https://github.com/pre-commit/mirrors-mypy
# rev: "v0.942"
# hooks:
# - id: mypy
# args: [--show-error-codes]
# exclude: ^(tests|docs)/
# additional_dependencies: [nox, rich]

# Checks the manifest for missing files (native support)
#- repo: https://github.com/mgedmin/check-manifest
# rev: "0.48"
Expand Down
5 changes: 3 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ Contributing
.. image:: https://github.com/MC-kit/xpypact/workflows/Tests/badge.svg
:target: https://github.com/MC-kit/xpypact/actions?query=workflow%3ATests
:alt: Tests
.. image:: https://codecov.io/gh/MC-kit/xpypact/branch/master/graph/badge.svg?token=wlqoa368k8
:target: https://codecov.io/gh/MC-kit/xpypact
.. image:: https://codecov.io/gh/MC-kit/xpypact/branch/master/graph/badge.svg?token=P6DPGSWM94
:target: https://codecov.io/gh/MC-kit/xpypact
:alt: Coverage
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
.. image:: https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336
Expand Down
6 changes: 3 additions & 3 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
sphinx==4.2.0
sphinx==5.1.1
sphinx-autobuild==2021.3.14
sphinx-autodoc-typehints==1.12.0
sphinx-autodoc-typehints==1.19.2
sphinx-autorun==1.1.1
sphinx-click==3.0.2
sphinx-click==4.3.0
sphinx-rtd-theme==1.0.0
sphinxcontrib-napoleon==0.7
28 changes: 5 additions & 23 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
)


NAME_RGX = re.compile(r'name\s*=\s*"(?P<package>[_a-zA-Z]*)"')
NAME_RGX = re.compile(r'name\s*=\s*"(?P<package>[-_a-zA-Z]+)"')


def find_my_name() -> str:
Expand Down Expand Up @@ -147,7 +147,6 @@ def tests(s: Session) -> None:
"main,test,xdoctest,coverage",
external=True,
)
# s.install("pytest", "pygments", "coverage[toml]")
try:
s.run("coverage", "run", "--parallel", "-m", "pytest", *s.posargs)
finally:
Expand All @@ -171,7 +170,6 @@ def coverage(s: Session) -> None:
"coverage",
external=True,
)
# s.install("coverage[toml]")

if not s.posargs and any(Path().glob(".coverage.*")):
s.run("coverage", "combine")
Expand All @@ -190,7 +188,6 @@ def typeguard(s: Session) -> None:
"main,test,typeguard",
external=True,
)
# s.install("pytest", "typeguard", "pygments")
s.run("pytest", f"--typeguard-packages={package}", *s.posargs)


Expand Down Expand Up @@ -270,31 +267,23 @@ def mypy(s: Session) -> None:
"main,mypy",
external=True,
)
# s.install(*MYPY_DEPS)
s.run("mypy", *args)
if not s.posargs:
s.run("mypy", f"--python-executable={sys.executable}", "noxfile.py")


@session(python=supported_pythons)
@session(python="3.10")
def xdoctest(s: Session) -> None:
"""Run examples with xdoctest."""
args = s.posargs or ["all"]
# s.run(
# "poetry",
# "install",
# "--no-dev",
# external=True,
# )
# s.install("xdoctest[colors]")
args = s.posargs or ["--quiet", "-m", package]
s.run(
"poetry",
"install",
"--only",
"xdoctest",
"main,xdoctest",
external=True,
)
s.run("python", "-m", "xdoctest", package, *args)
s.run("python", "-m", "xdoctest", *args)


@session(name="docs-build", python="3.10")
Expand All @@ -319,13 +308,6 @@ def docs_build(s: Session) -> None:
def docs(s: Session) -> None:
"""Build and serve the documentation with live reloading on file changes."""
args = s.posargs or ["--open-browser", "docs/source", "docs/_build"]
# s.run(
# "poetry",
# "install",
# "--no-dev",
# external=True,
# )
# s.install("sphinx-autobuild", *SPHINX_DEPS)
s.run(
"poetry",
"install",
Expand Down
Loading

0 comments on commit 5f77150

Please sign in to comment.