Skip to content

Commit

Permalink
Reinitializing
Browse files Browse the repository at this point in the history
  • Loading branch information
timkpaine committed Sep 15, 2024
1 parent eccbd33 commit 45f3702
Show file tree
Hide file tree
Showing 27 changed files with 7,607 additions and 223 deletions.
20 changes: 0 additions & 20 deletions .bumpversion.cfg

This file was deleted.

2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier
_commit: 657b010
_commit: b18a505
_src_path: .
add_extension: jupyter
email: 3105306+timkpaine@users.noreply.github.com
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
matrix:
os: [ubuntu-latest]
python-version: ["3.11"]
node-version: [20.x]

steps:
- uses: actions/checkout@v4
Expand All @@ -43,6 +44,16 @@ jobs:
cache: 'pip'
cache-dependency-path: 'pyproject.toml'

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
cache-dependency-path: js/yarn.lock

- name: Install yarn
run: npm install -g yarn

- name: Install dependencies
run: make develop

Expand All @@ -64,8 +75,9 @@ jobs:
- name: Upload test results (Python)
uses: actions/upload-artifact@v4
with:
name: pytest-results-${{ matrix.os }}-${{ matrix.python-version }}
path: junit.xml
name: test-results-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.node-version }}
path: |
**/junit.xml
if: ${{ always() }}

- name: Publish Unit Test Results
Expand Down
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,20 @@ docs/api
docs/index.md
_template/labextension

# JS
js/coverage
js/dist
js/node_modules
jupyter_template/extension

# Jupyter
.ipynb_checkpoints
.autoversion
jupyter_template/nbextension
jupyter_template/labextension

# Mac
.DS_Store

# Rust
target

3 changes: 0 additions & 3 deletions .vscode/settings.json

This file was deleted.

12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ develop-py:
python -m pip install -e .[develop]

develop-js:
cd js; pnpm install && npx playwright install
cd js; yarn

develop: develop-js develop-py ## setup project for development

Expand All @@ -15,7 +15,7 @@ build-py:
python setup.py build build_ext --inplace

build-js:
cd js; pnpm build
cd js; yarn build

build: build-js build-py ## build the project

Expand All @@ -32,7 +32,7 @@ lint-py: ## run python linter with ruff
python -m ruff format --check jupyter_template

lint-js: ## run js linter
cd js; pnpm lint
cd js; yarn lint

lint: lint-js lint-py ## run project linters

Expand All @@ -45,7 +45,7 @@ fix-py: ## fix python formatting with ruff
python -m ruff format jupyter_template

fix-js: ## fix js formatting
cd js; pnpm fix
cd js; yarn fix

fix: fix-js fix-py ## run project autoformatters

Expand Down Expand Up @@ -83,7 +83,7 @@ coverage-py: ## run python tests and collect test coverage

.PHONY: test-js tests-js coverage-js
test-js: ## run js tests
cd js; pnpm test
cd js; yarn test

# alias
tests-js: test-js
Expand Down Expand Up @@ -123,7 +123,7 @@ dist-build-py: # build python dists
python -m build -w -s

dist-build-js: # build js dists
cd js; pnpm pack
cd js; yarn pack

dist-check: ## run python dist checker with twine
python -m twine check dist/*
Expand Down
4 changes: 2 additions & 2 deletions js/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ module.exports = {
"no-const-assign": "error",
"no-nested-ternary": "warn",
"no-this-before-super": "error",
"no-plusplus": "off",
"no-undef": "error",
"no-underscore-dangle": "off",
"no-unreachable": "error",
Expand All @@ -52,8 +51,9 @@ module.exports = {
"spaced-comment": "off",
"valid-typeof": "error",

"import/extensions": "off",
"import/no-unresolved": "off",
"import/prefer-default-export": "off",
"import/no-extraneous-dependencies": "off",
},
};
};
12 changes: 12 additions & 0 deletions js/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
presets: [
[
"@babel/preset-env",
{
targets: {
node: "current",
},
},
],
],
};
87 changes: 0 additions & 87 deletions js/build.mjs

This file was deleted.

32 changes: 32 additions & 0 deletions js/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
const esModules = [
"@finos",
"@jupyter",
"@jupyterlab",
"@jupyter-widgets",
"@microsoft",
"@rjsf",
"delaunator",
"exenv-es6",
"internmap",
"lib0",
"lodash-es",
"nanoid",
"robust-predicates",
"y-protocols",
].join("|");

module.exports = {
moduleDirectories: ["node_modules", "src", "tests"],
moduleNameMapper: {
"\\.(css|less|sass|scss)$": "<rootDir>/tests/styleMock.js",
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/tests/fileMock.js",
},
reporters: [ "default", "jest-junit" ],
setupFiles: ["<rootDir>/tests/setup.js"],
testEnvironment: "jsdom",
transform: {
"^.+\\.jsx?$": "babel-jest",
".+\\.(css|styl|less|sass|scss)$": "jest-transform-css",
},
transformIgnorePatterns: [`/node_modules/(?!(${esModules}))`],
};
Loading

0 comments on commit 45f3702

Please sign in to comment.