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

rename project #12

Merged
merged 1 commit into from
Oct 15, 2024
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: 65b6f3e
_src_path: https://github.com/python-project-templates/base.git
add_extension: jupyter
email: 3105306+timkpaine@users.noreply.github.com
github: python-project-templates
project_description: A Jupyter-Python project template
project_name: jupyter template
project_name: python template jupyter
python_version_primary: '3.11'
team: Python Project Template Authors
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,13 @@ _template/labextension
js/coverage
js/dist
js/node_modules
jupyter_template/extension
python_template_jupyter/extension

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

# Mac
.DS_Store
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 jupyter_template
python -m ruff format --check jupyter_template
python -m ruff check python_template_jupyter
python -m ruff format --check python_template_jupyter

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 jupyter_template
python -m ruff format jupyter_template
python -m ruff check --fix python_template_jupyter
python -m ruff format python_template_jupyter

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 ./jupyter_template
python -m mypy ./python_template_jupyter

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

# alias
tests-py: test-py

coverage-py: ## run python tests and collect test coverage
python -m pytest -v jupyter_template/tests --cov=jupyter_template --cov-report term-missing --cov-report xml
python -m pytest -v python_template_jupyter/tests --cov=python_template_jupyter --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 @@
# jupyter template
# python template jupyter

A Jupyter-Python project template

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

## Overview

Expand Down
12 changes: 6 additions & 6 deletions js/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "jupyter-template",
"name": "python-template-jupyter",
"version": "0.1.0",
"description": "A Jupyter-Python project template",
"repository": "git@github.com:python-project-templates/jupyter-template.git",
"repository": "git@github.com:python-project-templates/python-template-jupyter.git",
"author": "Python Project Template Authors <3105306+timkpaine@users.noreply.github.com>",
"license": "Apache-2.0",
"keywords": [
Expand All @@ -17,11 +17,11 @@
],
"jupyterlab": {
"extension": "lib/index.js",
"outputDir": "../jupyter_template/labextension",
"outputDir": "../python_template_jupyter/labextension",
"discovery": {
"server": {
"base": {
"name": "jupyter_template"
"name": "python_template_jupyter"
},
"managers": [
"pip"
Expand All @@ -31,8 +31,8 @@
},
"scripts": {
"build:babel": "babel src/ --source-maps --out-dir lib/",
"build:nbextension": "mkdirp ../jupyter_template/nbextension/static/ && cpy --flat 'src/notebook.js' '../jupyter_template/nbextension/static/'",
"build:labextension": "rimraf ../jupyter_template/labextension && jupyter labextension build .",
"build:nbextension": "mkdirp ../python_template_jupyter/nbextension/static/ && cpy --flat 'src/notebook.js' '../python_template_jupyter/nbextension/static/'",
"build:labextension": "rimraf ../python_template_jupyter/labextension && jupyter labextension build .",
"build": "pnpm clean && pnpm build:babel && pnpm build:labextension && pnpm build:nbextension",
"clean": "rimraf lib",
"fix": "pnpm lint --fix",
Expand Down
4 changes: 2 additions & 2 deletions js/src/index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import "../style/index.css";

async function activate(app) {

Check warning on line 3 in js/src/index.js

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 3.11, 20.x)

'app' is defined but never used
// eslint-disable-next-line no-console
console.log("JupyterLab extension jupyter-template is activated!");
console.log("JupyterLab extension python-template-jupyter is activated!");
}

const extension = {
activate,
autoStart: true,
id: "jupyter-template",
id: "python-template-jupyter",
optional: [],
requires: [],
};
Expand Down
5 changes: 0 additions & 5 deletions jupyter_template/tests/test_all.py

This file was deleted.

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

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

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

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

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

Expand All @@ -77,14 +77,14 @@ ignore = [
"js/pnpm-lock.yaml",
"Makefile",
"setup.py",
"jupyter_template/labextension/**",
"jupyter_template/nbextension/**",
"python_template_jupyter/labextension/**",
"python_template_jupyter/nbextension/**",
]

[tool.coverage.run]
branch = true
omit = [
"jupyter_template/tests/integration/",
"python_template_jupyter/tests/integration/",
]
[tool.coverage.report]
exclude_also = [
Expand All @@ -97,16 +97,16 @@ fail_under = 50

[tool.hatch.build]
artifacts = [
"jupyter_template/nbextension",
"jupyter_template/labextension",
"python_template_jupyter/nbextension",
"python_template_jupyter/labextension",
]

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

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

[tool.hatch.build.targets.wheel]
include = [
"/jupyter_template",
"/python_template_jupyter",
]
exclude = [
".copier-answers.yml",
Expand All @@ -133,15 +133,15 @@ exclude = [
]

[tool.hatch.build.targets.wheel.shared-data]
"jupyter_template/labextension" = "share/jupyter/labextensions/jupyter_template"
"python_template_jupyter/labextension" = "share/jupyter/labextensions/python_template_jupyter"

[tool.hatch.build.hooks.jupyter-builder]
build-function = "hatch_jupyter_builder.npm_builder"
ensured-targets = [
"jupyter_template/labextension/package.json",
"python_template_jupyter/labextension/package.json",
]
skip-if-exists = [
"jupyter_template/labextension/package.json",
"python_template_jupyter/labextension/package.json",
]
dependencies = [
"hatch-jupyter-builder",
Expand All @@ -155,7 +155,7 @@ npm = "pnpm"
[tool.pytest.ini_options]
addopts = ["-vvv", "--junitxml=junit.xml"]
asyncio_mode = "strict"
testpaths = "jupyter_template/tests"
testpaths = "python_template_jupyter/tests"

[tool.ruff]
line-length = 150
Expand All @@ -166,7 +166,7 @@ extend-select = ["I"]
[tool.ruff.lint.isort]
combine-as-imports = true
default-section = "third-party"
known-first-party = ["jupyter_template"]
known-first-party = ["python_template_jupyter"]
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_jupyter/tests/test_all.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from python_template_jupyter import * # noqa


def test_all():
assert True