Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maintenance updates #2

Merged
merged 5 commits into from
Nov 18, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Maintenance updates
  • Loading branch information
blink1073 committed Nov 18, 2022
commit 0186c0ca9d1a0adb2995031462414a05503df480
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
# Set update schedule for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every weekday
interval: "weekly"
35 changes: 35 additions & 0 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Comm Tests
on:
push:
branches: ["main"]
pull_request:
schedule:
- cron: "0 8 * * *"

jobs:
build:
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.7", "3.10"]
include:
- os: windows-latest
python-version: "3.9"
- os: ubuntu-latest
python-version: "pypy-3.8"
- os: ubuntu-latest
python-version: "3.11"
- os: macos-latest
python-version: "3.8"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Install and test
run:
pip install -e .[test]
pytest
43 changes: 41 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,42 @@
[build-system]
requires = ["setuptools>=40.8.0", "wheel"]
build-backend = "setuptools.build_meta"
requires = ["hatchling>1.10"]
build-backend = "hatchling.build"

[project]
name = "comm"
dynamic = ["version"]
description = "Jupyter Python Comm implementation, for usage in ipykernel, xeus-python etc."
readme = "README.md"
license = { file="LICENSE" }
requires-python = ">=3.6"
authors = [
{ name = "Jupyter contributors" },
]
keywords = [
"ipykernel",
"jupyter",
"xeus-python",
]
dependencies = [
martinRenou marked this conversation as resolved.
Show resolved Hide resolved
"traitlets>5.3",
]

[project.optional-dependencies]
test = [
"pytest",
]

[project.urls]
Homepage = "https://github.com/martinRenou/comm"
martinRenou marked this conversation as resolved.
Show resolved Hide resolved

[tool.hatch.version]
path = "comm/__init__.py"

[tool.hatch.build.targets.sdist]
include = [
"/comm",
]

[tool.pytest.ini_options]
addopts = "-raXs --durations 10 --color=yes"
filterwarnings = ["error"]
34 changes: 0 additions & 34 deletions setup.cfg

This file was deleted.

17 changes: 17 additions & 0 deletions tests/test_comm.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from comm.base_comm import CommManager, BaseComm


class MyComm(BaseComm):

def publish_msg(self, msg_type, data=None, metadata=None, buffers=None, **keys):
pass


def test_comm_manager():
test = CommManager()
assert test.targets == {}


def test_base_comm():
test = MyComm()
assert test.target_name == "comm"