Spaces:
Runtime error
Runtime error
Upload 2 files
Browse files- Makefile +27 -0
- pyproject.toml +71 -0
Makefile
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Note: This is meant for codeql_kernel developer use only
|
| 2 |
+
.PHONY: data-files build install clean test
|
| 3 |
+
|
| 4 |
+
data-files: clean
|
| 5 |
+
mkdir -p jupyter-data/share/jupyter/kernels/codeql
|
| 6 |
+
cp codeql_kernel/kernel.json jupyter-data/share/jupyter/kernels/codeql
|
| 7 |
+
cp codeql_kernel/images/* jupyter-data/share/jupyter/kernels/codeql/
|
| 8 |
+
|
| 9 |
+
install: data-files
|
| 10 |
+
pip3 install tree_sitter
|
| 11 |
+
python3 build_treesitter.py
|
| 12 |
+
pip3 install -e ".[test]"
|
| 13 |
+
|
| 14 |
+
clean:
|
| 15 |
+
rm -rf jupyter-data
|
| 16 |
+
rm -rf build
|
| 17 |
+
rm -rf dist
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
build: data-files
|
| 21 |
+
pip3 install build twine
|
| 22 |
+
python3 -m build .
|
| 23 |
+
twine check --strict dist/*
|
| 24 |
+
|
| 25 |
+
test: clean
|
| 26 |
+
pytest
|
| 27 |
+
make clean
|
pyproject.toml
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[build-system]
|
| 2 |
+
requires = ["hatchling >=1.5"]
|
| 3 |
+
build-backend = "hatchling.build"
|
| 4 |
+
|
| 5 |
+
[project]
|
| 6 |
+
name = "codeql_kernel"
|
| 7 |
+
description = "A Jupyter kernel for CodeQL"
|
| 8 |
+
license = {file = "LICENSE.txt"}
|
| 9 |
+
authors = [{name = "'Alvaro Munoz'", email = "[email protected]"}]
|
| 10 |
+
classifiers = [
|
| 11 |
+
"Intended Audience :: Science/Research",
|
| 12 |
+
"License :: OSI Approved :: BSD License",
|
| 13 |
+
"Operating System :: OS Independent",
|
| 14 |
+
"Programming Language :: Python",
|
| 15 |
+
"Programming Language :: Python :: 3",
|
| 16 |
+
"Topic :: Scientific/Engineering",
|
| 17 |
+
"Topic :: Software Development",
|
| 18 |
+
"Topic :: System :: Shells",
|
| 19 |
+
]
|
| 20 |
+
urls = {Homepage = "http://github.com/GitHubSecurityLab/codeql_kernel"}
|
| 21 |
+
requires-python = ">=3.7"
|
| 22 |
+
dependencies = [
|
| 23 |
+
"metakernel >=0.24.0",
|
| 24 |
+
"jupyter_client >=4.3.0",
|
| 25 |
+
"pandas",
|
| 26 |
+
"tree_sitter",
|
| 27 |
+
"ipykernel",
|
| 28 |
+
]
|
| 29 |
+
dynamic = ["version"]
|
| 30 |
+
|
| 31 |
+
[project.readme]
|
| 32 |
+
file = "README.md"
|
| 33 |
+
content-type = "text/markdown"
|
| 34 |
+
|
| 35 |
+
[project.optional-dependencies]
|
| 36 |
+
test = ["pytest", "nbconvert", "jupyter_kernel_test", "nbconvert"]
|
| 37 |
+
|
| 38 |
+
[tool.hatch.build.targets.wheel.shared-data]
|
| 39 |
+
"jupyter-data/share" = "share"
|
| 40 |
+
|
| 41 |
+
[tool.hatch.build.targets.sdist]
|
| 42 |
+
artifacts = ["jupyter-data"]
|
| 43 |
+
include = [
|
| 44 |
+
"/jupyter-data",
|
| 45 |
+
"/codeql_kernel",
|
| 46 |
+
"/*.md"
|
| 47 |
+
]
|
| 48 |
+
|
| 49 |
+
[tool.hatch.version]
|
| 50 |
+
path = "codeql_kernel/_version.py"
|
| 51 |
+
source = "code"
|
| 52 |
+
|
| 53 |
+
[tool.jupyter-releaser]
|
| 54 |
+
skip = ["check-links"]
|
| 55 |
+
|
| 56 |
+
[tool.jupyter-releaser.hooks]
|
| 57 |
+
after-prep-git = ["make data-files"]
|
| 58 |
+
|
| 59 |
+
[tool.tbump.version]
|
| 60 |
+
current = "0.0.1"
|
| 61 |
+
regex = '''
|
| 62 |
+
(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)
|
| 63 |
+
((?P<channel>a|b|rc|.dev)(?P<release>\d+))?
|
| 64 |
+
'''
|
| 65 |
+
|
| 66 |
+
[tool.tbump.git]
|
| 67 |
+
message_template = "Bump to {new_version}"
|
| 68 |
+
tag_template = "v{new_version}"
|
| 69 |
+
|
| 70 |
+
[[tool.tbump.file]]
|
| 71 |
+
src = "codeql_kernel/_version.py"
|