Skip to content

Commit

Permalink
Setup pipeline.
Browse files Browse the repository at this point in the history
  • Loading branch information
antarcticrainforest committed Mar 20, 2024
1 parent 395a329 commit 6ad463a
Show file tree
Hide file tree
Showing 3 changed files with 141 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/ci_job.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: CLI Test
run-name: ${{ github.actor }} is testing the cli 🧉

on: [push]
jobs:
linting-and-testing:
env:
NUMEXPR_MAX_THREADS: 8
runs-on: ubuntu-latest
strategy:
python-version:
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{matrix.python-versoin}}
-
name: Install packages
run: |
python3 -m pip install tox
mkdir .mypy_cache
-
name: Running tests with tox
run: tox -p 3 --parallel-no-spinner
28 changes: 28 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
BSD 3-Clause License

Copyright (c) 2023, Climate Informatics and Technologies (CLINT)

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this 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 HOLDER 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
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
84 changes: 84 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
[build-system]
requires = ["flit_core >=3.2"]
build-backend = "flit_core.buildapi"

[project]
name = "kernel-install"
authors = [{name = "DKRZ, Clint", email = "freva@dkrz.de"}]
readme = "README.md"
license = {file = "LICENSE"}
classifiers = [
"Development Status :: 2 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
]
dynamic = ["version"]
description = "Utility to install various jupyter kernel specs."
requires-python = ">=3.8"
dependencies = [
"bash_kernel",
"ipykernel",
"rich",
"rich-argparse",
]
[project.optional-dependencies]
dev = ["flit", "tox"]


[project.urls]
Documentation = "https://github.com/FREVA-CLINT/install-kernelspec/README.md"
Issues = "https://github.com/FREVA-CLINT/install-kernelspec/issues"
Source = "https://github.com/FREVA-CLINT/install-kernelspec"
Home= "https://github.com/FREVA-CLINT/install-kernelspec"


[project.scripts]
jupyter-kernel-install = "kernel_install.cli:cli"

[tool.mypy]
files = "src/kernel_install"
strict = true
warn_unused_ignores = true
warn_unreachable = true
show_error_codes = true
install_types = true
non_interactive = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
warn_redundant_casts = true
ignore_missing_imports = true



[package-data]
freva_deployment = ["py.typed"]

[tool.tox]
legacy_tox_ini = """
[tox]
min_version = 4.0
env_list = types, lint
[testenv]
parallel_show_output = false
[testenv:lint]
deps = .
black
isort
flake8
pylint
commands =
isort --check --profile black -t py311 -l 79 src
flake8 src/kernel_install --count --max-complexity=5 --max-line-length=88 --statistics --show-source
pylint src/kernel_install/
[testenv:types]
deps = .
mypy
commands = mypy --install-types --non-interactive
"""

0 comments on commit 6ad463a

Please sign in to comment.