Skip to content

Commit 46a61aa

Browse files
Set up lerna (#119)
* Set up lerna * Automatic application of license header * Update node_modules location * Add version to private test package Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent fa602c9 commit 46a61aa

19 files changed

+6502
-2966
lines changed

docs/Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) Jupyter Development Team.
2+
# Distributed under the terms of the Modified BSD License.
3+
14
# Minimal makefile for Sphinx documentation
25
#
36

docs/make.bat

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
rem Copyright (c) Jupyter Development Team.
2+
rem Distributed under the terms of the Modified BSD License.
3+
14
@ECHO OFF
25

36
pushd %~dp0

docs/source/api/index.html

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
<!--
2+
~ Copyright (c) Jupyter Development Team.
3+
~ Distributed under the terms of the Modified BSD License.
4+
-->
5+
16
<!DOCTYPE html>
27
<html lang="en">
38
<head>

docs/source/conf.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) Jupyter Development Team.
2+
# Distributed under the terms of the Modified BSD License.
3+
14
# Configuration file for the Sphinx documentation builder.
25
#
36
# For the full list of built-in configuration values, see the documentation:

docs/source/javascript_api.rst

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
.. Copyright (c) Jupyter Development Team.
2+
.. Distributed under the terms of the Modified BSD License.
3+
14
JavaScript API
25
==============
36

docs/source/python_api.rst

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
.. Copyright (c) Jupyter Development Team.
2+
.. Distributed under the terms of the Modified BSD License.
3+
14
Python API
25
==========
36

javascript/yarn.lock

-2,960
This file was deleted.

jupyter_ydoc/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) Jupyter Development Team.
2+
# Distributed under the terms of the Modified BSD License.
3+
14
import sys
25

36
from ._version import __version__ # noqa

jupyter_ydoc/utils.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) Jupyter Development Team.
2+
# Distributed under the terms of the Modified BSD License.
3+
14
from typing import Dict, List, Type, Union
25

36
INT = Type[int]

jupyter_ydoc/ydoc.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) Jupyter Development Team.
2+
# Distributed under the terms of the Modified BSD License.
3+
14
import copy
25
from abc import ABC, abstractmethod
36
from typing import Any, Callable, Dict, Optional

lerna.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
3+
"useWorkspaces": true,
4+
"version": "independent"
5+
}

package.json

+10-5
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,15 @@
33
"version": "0.0.1",
44
"private": true,
55
"files": [],
6-
"workspaces": {
7-
"packages": [
8-
"javascript",
9-
"test"
10-
]
6+
"workspaces": [
7+
"javascript",
8+
"tests"
9+
],
10+
"scripts": {
11+
"build": "lerna run build",
12+
"test": "lerna run build:test && lerna run test"
13+
},
14+
"devDependencies": {
15+
"lerna": "^6.3.0"
1116
}
1217
}

pyproject.toml

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) Jupyter Development Team.
2+
# Distributed under the terms of the Modified BSD License.
3+
14
[build-system]
25
requires = ["hatchling>=1.10.0", "hatch-nodejs-version"]
36
build-backend = "hatchling.build"
@@ -76,6 +79,7 @@ before-bump-version = ["pip install -e .[dev]"]
7679

7780
[tool.jupyter-releaser.options]
7881
version_cmd = "hatch version"
82+
npm_cmd = "npm publish --tag next"
7983

8084
[tool.flake8]
8185
max-line-length = 100

pytest.ini

+3
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1+
; Copyright (c) Jupyter Development Team.
2+
; Distributed under the terms of the Modified BSD License.
3+
14
[pytest]
25
asyncio_mode = auto

tests/conftest.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) Jupyter Development Team.
2+
# Distributed under the terms of the Modified BSD License.
3+
14
import json
25
import subprocess
36
from pathlib import Path
@@ -20,7 +23,7 @@ def update_json_file(path: Path, d: dict):
2023

2124
here = Path(__file__).parent
2225
d = {"type": "module"}
23-
update_json_file(here / "node_modules/y-websocket/package.json", d)
26+
update_json_file(here.parent / "node_modules/y-websocket/package.json", d)
2427

2528

2629
@pytest.fixture

tests/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"name": "@jupyter/ydoc-test",
3+
"version": "0.0.1",
4+
"private": "true",
25
"type": "module",
36
"dependencies": {
47
"@jupyter/ydoc": "file:../javascript",

tests/test_ypy_yjs.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) Jupyter Development Team.
2+
# Distributed under the terms of the Modified BSD License.
3+
14
import asyncio
25
import json
36
from pathlib import Path

tests/yjs_client_0.js

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright (c) Jupyter Development Team.
3+
* Distributed under the terms of the Modified BSD License.
4+
*/
5+
16
import { YNotebook } from '@jupyter/ydoc'
27
import { WebsocketProvider } from 'y-websocket'
38

0 commit comments

Comments
 (0)