Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Changes here will be overwritten by Copier
_commit: 33cc159
_commit: 70d506b
_src_path: https://github.com/python-project-templates/base.git
add_extension: js
email: 3105306+timkpaine@users.noreply.github.com
github: python-project-templates
project_description: A JavaScript-Python project template
project_name: js template
project_name: python template js
python_version_primary: '3.11'
team: Python Project Template Authors
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ _template/labextension
# JS
js/node_modules
js/dist
js_template/extension
python_template_js/extension

# Jupyter
.ipynb_checkpoints
Expand Down
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ install: ## install python library
#########
.PHONY: lint-py lint-js lint lints
lint-py: ## run python linter with ruff
python -m ruff check js_template
python -m ruff format --check js_template
python -m ruff check python_template_js
python -m ruff format --check python_template_js

lint-js: ## run js linter
cd js; pnpm lint
Expand All @@ -41,8 +41,8 @@ lints: lint

.PHONY: fix-py fix-js fix format
fix-py: ## fix python formatting with ruff
python -m ruff check --fix js_template
python -m ruff format js_template
python -m ruff check --fix python_template_js
python -m ruff format python_template_js

fix-js: ## fix js formatting
cd js; pnpm fix
Expand All @@ -66,20 +66,20 @@ checks: check-manifest
check: checks

annotate: ## run python type annotation checks with mypy
python -m mypy ./js_template
python -m mypy ./python_template_js

#########
# TESTS #
#########
.PHONY: test-py tests-py coverage-py
test-py: ## run python tests
python -m pytest -v js_template/tests
python -m pytest -v python_template_js/tests

# alias
tests-py: test-py

coverage-py: ## run python tests and collect test coverage
python -m pytest -v js_template/tests --cov=js_template --cov-report term-missing --cov-report xml
python -m pytest -v python_template_js/tests --cov=python_template_js --cov-report term-missing --cov-report xml

.PHONY: test-js tests-js coverage-js
test-js: ## run js tests
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# js template
# python template js

A JavaScript-Python project template

[![Build Status](https://github.com/python-project-templates/js-template/actions/workflows/build.yml/badge.svg?branch=main&event=push)](https://github.com/python-project-templates/js-template/actions/workflows/build.yml)
[![codecov](https://codecov.io/gh/python-project-templates/js-template/branch/main/graph/badge.svg)](https://codecov.io/gh/python-project-templates/js-template)
[![License](https://img.shields.io/github/license/python-project-templates/js-template)](https://github.com/python-project-templates/js-template)
[![PyPI](https://img.shields.io/pypi/v/js-template.svg)](https://pypi.python.org/pypi/js-template)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/python-project-templates/js-template/main?urlpath=lab)
[![Build Status](https://github.com/python-project-templates/python-template-js/actions/workflows/build.yml/badge.svg?branch=main&event=push)](https://github.com/python-project-templates/python-template-js/actions/workflows/build.yml)
[![codecov](https://codecov.io/gh/python-project-templates/python-template-js/branch/main/graph/badge.svg)](https://codecov.io/gh/python-project-templates/python-template-js)
[![License](https://img.shields.io/github/license/python-project-templates/python-template-js)](https://github.com/python-project-templates/python-template-js)
[![PyPI](https://img.shields.io/pypi/v/python-template-js.svg)](https://pypi.python.org/pypi/python-template-js)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/python-project-templates/python-template-js/main?urlpath=lab)

## Overview

Expand Down
4 changes: 2 additions & 2 deletions js/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ async function copy_img() {
}

async function copy_to_python() {
fs.mkdirSync("../js_template/extension", { recursive: true });
cpy("dist/**/*", "../js_template/extension");
fs.mkdirSync("../python_template_js/extension", { recursive: true });
cpy("dist/**/*", "../python_template_js/extension");
}

async function build_all() {
Expand Down
10 changes: 5 additions & 5 deletions js/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "js-template",
"name": "python-template-js",
"version": "0.1.10",
"description": "A JavaScript-Python project template",
"repository": "git@github.com:python-project-templates/js-template.git",
"repository": "git@github.com:python-project-templates/python-template-js.git",
"author": "Python Project Template Authors <3105306+timkpaine@users.noreply.github.com>",
"license": "Apache-2.0",
"private": true,
Expand All @@ -28,7 +28,7 @@
"scripts": {
"build:debug": "node build.mjs --debug",
"build": "node build.mjs",
"clean": "rm -rf dist playwright-report ../js_template/extension",
"clean": "rm -rf dist playwright-report ../python_template_js/extension",
"dev": "npm-run-all -p start watch",
"lint": "prettier --check \"src/**/*\" \"tests/**/*\" \"*.mjs\" \"*.json\"",
"fix": "prettier --write \"src/**/*\" \"tests/**/*\" \"*.mjs\" \"*.json\"",
Expand All @@ -41,11 +41,11 @@
},
"dependencies": {},
"devDependencies": {
"@finos/perspective-esbuild-plugin": "^3.1.0",
"@finos/perspective-esbuild-plugin": "^2.10.1",
"@playwright/test": "^1.47.0",
"@prospective.co/procss": "^0.1.16",
"cpy": "^11.1.0",
"esbuild": "^0.24.0",
"esbuild": "^0.23.1",
"esbuild-plugin-less": "^1.3.9",
"http-server": "^14.1.1",
"nodemon": "^3.1.4",
Expand Down
5 changes: 0 additions & 5 deletions js_template/tests/test_all.py

This file was deleted.

26 changes: 13 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ requires = [
build-backend="hatchling.build"

[project]
name = "js-template"
name = "python-template-js"
authors = [{name = "Python Project Template Authors", email = "3105306+timkpaine@users.noreply.github.com"}]
description="A JavaScript-Python project template"
readme = "README.md"
Expand All @@ -30,8 +30,8 @@ classifiers = [
dependencies = []

[project.urls]
Repository = "https://github.com/python-project-templates/js-template"
Homepage = "https://github.com/python-project-templates/js-template"
Repository = "https://github.com/python-project-templates/python-template-js"
Homepage = "https://github.com/python-project-templates/python-template-js"

[project.optional-dependencies]
develop = [
Expand All @@ -55,7 +55,7 @@ commit = true
tag = true

[[tool.bumpversion.files]]
filename = "js_template/__init__.py"
filename = "python_template_js/__init__.py"
search = '__version__ = "{current_version}"'
replace = '__version__ = "{new_version}"'

Expand All @@ -75,13 +75,13 @@ ignore = [
"js/pnpm-lock.yaml",
"Makefile",
"setup.py",
"js_template/**/*",
"python_template_js/**/*",
]

[tool.coverage.run]
branch = true
omit = [
"js_template/tests/integration/",
"python_template_js/tests/integration/",
]
[tool.coverage.report]
exclude_also = [
Expand All @@ -94,15 +94,15 @@ fail_under = 50

[tool.hatch.build]
artifacts = [
"js_template/extension",
"python_template_js/extension",
]

[tool.hatch.build.sources]
src = "/"

[tool.hatch.build.targets.sdist]
include = [
"/js_template",
"/python_template_js",
"/js",
"LICENSE",
"README.md",
Expand All @@ -117,7 +117,7 @@ exclude = [

[tool.hatch.build.targets.wheel]
include = [
"/js_template",
"/python_template_js",
]
exclude = [
".copier-answers.yml",
Expand All @@ -131,10 +131,10 @@ exclude = [
[tool.hatch.build.hooks.jupyter-builder]
build-function = "hatch_jupyter_builder.npm_builder"
ensured-targets = [
"js_template/extension/cdn/index.js",
"python_template_js/extension/cdn/index.js",
]
skip-if-exists = [
"js_template/extension/cdn/index.js",
"python_template_js/extension/cdn/index.js",
]
dependencies = [
"hatch-jupyter-builder",
Expand All @@ -148,7 +148,7 @@ npm = "pnpm"
[tool.pytest.ini_options]
addopts = ["-vvv", "--junitxml=junit.xml"]
asyncio_mode = "strict"
testpaths = "js_template/tests"
testpaths = "python_template_js/tests"

[tool.ruff]
line-length = 150
Expand All @@ -159,7 +159,7 @@ extend-select = ["I"]
[tool.ruff.lint.isort]
combine-as-imports = true
default-section = "third-party"
known-first-party = ["js_template"]
known-first-party = ["python_template_js"]
section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"]

[tool.ruff.lint.per-file-ignores]
Expand Down
File renamed without changes.
5 changes: 5 additions & 0 deletions python_template_js/tests/test_all.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from python_template_js import * # noqa


def test_all():
assert True