bigquery-jupyter-plugin 0.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,16 @@
1
+ dist/
2
+ sdist/
3
+ wheels/
4
+ *.egg-info/
5
+ __pycache__
6
+ bigquery_jupyter_plugin/labextension
7
+ .coverage
8
+
9
+ # Used on OSX to track metadata about folders
10
+ .DS_Store
11
+
12
+ # Used by some text editors for modified files
13
+ *~
14
+
15
+ # Version file is handled by hatchling
16
+ bigquery_jupyter_plugin/_version.py
@@ -0,0 +1,6 @@
1
+ node_modules
2
+ **/node_modules
3
+ **/lib
4
+ **/package.json
5
+ !/package.json
6
+ bigquery_jupyter_plugin
@@ -0,0 +1,93 @@
1
+ # Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of
9
+ experience, education, socio-economic status, nationality, personal appearance,
10
+ race, religion, or sexual identity and orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or reject
41
+ comments, commits, code, wiki edits, issues, and other contributions that are
42
+ not aligned to this Code of Conduct, or to ban temporarily or permanently any
43
+ contributor for other behaviors that they deem inappropriate, threatening,
44
+ offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ This Code of Conduct also applies outside the project spaces when the Project
56
+ Steward has a reasonable belief that an individual's behavior may have a
57
+ negative impact on the project or its community.
58
+
59
+ ## Conflict Resolution
60
+
61
+ We do not believe that all conflict is bad; healthy debate and disagreement
62
+ often yield positive results. However, it is never okay to be disrespectful or
63
+ to engage in behavior that violates the project’s code of conduct.
64
+
65
+ If you see someone violating the code of conduct, you are encouraged to address
66
+ the behavior directly with those involved. Many issues can be resolved quickly
67
+ and easily, and this gives people more control over the outcome of their
68
+ dispute. If you are unable to resolve the matter for any reason, or if the
69
+ behavior is threatening or harassing, report it. We are dedicated to providing
70
+ an environment where participants feel welcome and safe.
71
+
72
+ Reports should be directed to *[PROJECT STEWARD NAME(s) AND EMAIL(s)]*, the
73
+ Project Steward(s) for *[PROJECT NAME]*. It is the Project Steward’s duty to
74
+ receive and address reported violations of the code of conduct. They will then
75
+ work with a committee consisting of representatives from the Open Source
76
+ Programs Office and the Google Open Source Strategy team. If for any reason you
77
+ are uncomfortable reaching out to the Project Steward, please email
78
+ opensource@google.com.
79
+
80
+ We will investigate every complaint, but you may not receive a direct response.
81
+ We will use our discretion in determining when and how to follow up on reported
82
+ incidents, which may range from not taking action to permanent expulsion from
83
+ the project and project-sponsored spaces. We will notify the accused of the
84
+ report and provide them an opportunity to discuss it before any action is taken.
85
+ The identity of the reporter will be omitted from the details of the report
86
+ supplied to the accused. In potentially harmful situations, such as ongoing
87
+ harassment or threats to anyone's safety, we may take action without notice.
88
+
89
+ ## Attribution
90
+
91
+ This Code of Conduct is adapted from the Contributor Covenant, version 1.4,
92
+ available at
93
+ https://www.contributor-covenant.org/version/1/4/code-of-conduct/
@@ -0,0 +1,32 @@
1
+ # How to Contribute
2
+
3
+ We would love to accept your patches and contributions to this project.
4
+
5
+ ## Before you begin
6
+
7
+ ### Sign our Contributor License Agreement
8
+
9
+ Contributions to this project must be accompanied by a
10
+ [Contributor License Agreement](https://cla.developers.google.com/about) (CLA).
11
+ You (or your employer) retain the copyright to your contribution; this simply
12
+ gives us permission to use and redistribute your contributions as part of the
13
+ project.
14
+
15
+ If you or your current employer have already signed the Google CLA (even if it
16
+ was for a different project), you probably don't need to do it again.
17
+
18
+ Visit <https://cla.developers.google.com/> to see your current agreements or to
19
+ sign a new one.
20
+
21
+ ### Review our Community Guidelines
22
+
23
+ This project follows [Google's Open Source Community
24
+ Guidelines](https://opensource.google/conduct/).
25
+
26
+ ## Contribution process
27
+
28
+ ### Code Reviews
29
+
30
+ All submissions, including submissions by project members, require review. We
31
+ use [GitHub pull requests](https://docs.github.com/articles/about-pull-requests)
32
+ for this purpose.
@@ -0,0 +1,24 @@
1
+ Redistribution and use in source and binary forms, with or without modification,
2
+ are permitted provided that the following conditions are met:
3
+
4
+ 1. Redistributions of source code must retain the above copyright notice, this
5
+ list of conditions and the following disclaimer.
6
+
7
+ 2. Redistributions in binary form must reproduce the above copyright notice,
8
+ this list of conditions and the following disclaimer in the documentation
9
+ and/or other materials provided with the distribution.
10
+
11
+ 3. Neither the name of the copyright holder nor the names of its contributors
12
+ may be used to endorse or promote products derived from this software without
13
+ specific prior written permission.
14
+
15
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
19
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
22
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,121 @@
1
+ Metadata-Version: 2.3
2
+ Name: bigquery_jupyter_plugin
3
+ Version: 0.0.1
4
+ Dynamic: Keywords
5
+ Summary: BigQuery JupyterLab Plugin
6
+ Project-URL: Homepage, https://github.com/GoogleCloudPlatform/bigquery-jupyter-plugin
7
+ Project-URL: Bug Tracker, https://github.com/GoogleCloudPlatform/bigquery-jupyter-plugin/issues
8
+ Project-URL: Repository, https://github.com/GoogleCloudPlatform/bigquery-jupyter-plugin.git
9
+ Author-email: "Google Inc." <dataproc-plugins@google.com>
10
+ License: Redistribution and use in source and binary forms, with or without modification,
11
+ are permitted provided that the following conditions are met:
12
+
13
+ 1. Redistributions of source code must retain the above copyright notice, this
14
+ list of conditions and the following disclaimer.
15
+
16
+ 2. Redistributions in binary form must reproduce the above copyright notice,
17
+ this list of conditions and the following disclaimer in the documentation
18
+ and/or other materials provided with the distribution.
19
+
20
+ 3. Neither the name of the copyright holder nor the names of its contributors
21
+ may be used to endorse or promote products derived from this software without
22
+ specific prior written permission.
23
+
24
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
25
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
28
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
29
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
31
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
+ License-File: LICENSE
35
+ Classifier: Framework :: Jupyter
36
+ Classifier: Framework :: Jupyter :: JupyterLab
37
+ Classifier: Framework :: Jupyter :: JupyterLab :: 4
38
+ Classifier: Framework :: Jupyter :: JupyterLab :: Extensions
39
+ Classifier: Framework :: Jupyter :: JupyterLab :: Extensions :: Prebuilt
40
+ Classifier: License :: OSI Approved :: BSD License
41
+ Classifier: Programming Language :: Python
42
+ Classifier: Programming Language :: Python :: 3
43
+ Classifier: Programming Language :: Python :: 3.8
44
+ Classifier: Programming Language :: Python :: 3.9
45
+ Classifier: Programming Language :: Python :: 3.10
46
+ Classifier: Programming Language :: Python :: 3.11
47
+ Classifier: Programming Language :: Python :: 3.12
48
+ Requires-Python: >=3.8
49
+ Requires-Dist: dataproc-jupyter-plugin>=0.1.74
50
+ Requires-Dist: jupyter-server<3,>=2.0.1
51
+ Provides-Extra: test
52
+ Requires-Dist: coverage; extra == 'test'
53
+ Requires-Dist: pytest; extra == 'test'
54
+ Requires-Dist: pytest-asyncio; extra == 'test'
55
+ Requires-Dist: pytest-cov; extra == 'test'
56
+ Requires-Dist: pytest-jupyter[server]>=0.6.0; extra == 'test'
57
+ Description-Content-Type: text/markdown
58
+
59
+ # bigquery_jupyter_plugin
60
+
61
+ BigQuery JupyterLab Plugin
62
+
63
+ This extension provides extensions to JupyterLab for working with BigQuery.
64
+
65
+ ## Requirements
66
+
67
+ - JupyterLab >= 4.0.0
68
+
69
+ ## Install
70
+
71
+ To install the extension, execute:
72
+
73
+ ```bash
74
+ pip install bigquery_jupyter_plugin
75
+ ```
76
+
77
+ ## Uninstall
78
+
79
+ To remove the extension, execute:
80
+
81
+ ```bash
82
+ pip uninstall bigquery_jupyter_plugin
83
+ ```
84
+
85
+ ## Troubleshoot
86
+
87
+ To check if the server extension is enabled:
88
+
89
+ ```bash
90
+ jupyter server extension list
91
+ ```
92
+
93
+ ## Contributing
94
+
95
+ ### Installing from your local repo/branch
96
+
97
+ ```bash
98
+ pip install -e ".[test]"
99
+ ```
100
+
101
+ ### Testing the extension
102
+
103
+ #### Server tests
104
+
105
+ This extension is using [Pytest](https://docs.pytest.org/) for Python code testing.
106
+
107
+ Install test dependencies (needed only once):
108
+
109
+ ```sh
110
+ pip install -e ".[test]"
111
+ ```
112
+
113
+ To execute them, run:
114
+
115
+ ```sh
116
+ pytest -vv -r ap --cov bigquery_jupyter_plugin
117
+ ```
118
+
119
+ ### Packaging the extension
120
+
121
+ See [RELEASE](RELEASE.md)
@@ -0,0 +1,63 @@
1
+ # bigquery_jupyter_plugin
2
+
3
+ BigQuery JupyterLab Plugin
4
+
5
+ This extension provides extensions to JupyterLab for working with BigQuery.
6
+
7
+ ## Requirements
8
+
9
+ - JupyterLab >= 4.0.0
10
+
11
+ ## Install
12
+
13
+ To install the extension, execute:
14
+
15
+ ```bash
16
+ pip install bigquery_jupyter_plugin
17
+ ```
18
+
19
+ ## Uninstall
20
+
21
+ To remove the extension, execute:
22
+
23
+ ```bash
24
+ pip uninstall bigquery_jupyter_plugin
25
+ ```
26
+
27
+ ## Troubleshoot
28
+
29
+ To check if the server extension is enabled:
30
+
31
+ ```bash
32
+ jupyter server extension list
33
+ ```
34
+
35
+ ## Contributing
36
+
37
+ ### Installing from your local repo/branch
38
+
39
+ ```bash
40
+ pip install -e ".[test]"
41
+ ```
42
+
43
+ ### Testing the extension
44
+
45
+ #### Server tests
46
+
47
+ This extension is using [Pytest](https://docs.pytest.org/) for Python code testing.
48
+
49
+ Install test dependencies (needed only once):
50
+
51
+ ```sh
52
+ pip install -e ".[test]"
53
+ ```
54
+
55
+ To execute them, run:
56
+
57
+ ```sh
58
+ pytest -vv -r ap --cov bigquery_jupyter_plugin
59
+ ```
60
+
61
+ ### Packaging the extension
62
+
63
+ See [RELEASE](RELEASE.md)
@@ -0,0 +1,50 @@
1
+ # Making a new release of bigquery_jupyter_plugin
2
+
3
+ The extension can be published to `PyPI` manually.
4
+
5
+ ## Manual release
6
+
7
+ ### Python package
8
+
9
+ This extension is distributed as a Python package.
10
+
11
+ The packaging setup is defined in the `pyproject.toml` file.
12
+
13
+ ## Prerequisites
14
+
15
+ Install the `hatch` and `twine` tools for packaging and uploading (respectively):
16
+
17
+ ```bash
18
+ pip install build twine hatch
19
+ ```
20
+
21
+ Everytime you manually create a new release, you must bump the version number
22
+ using the `hatch` tool.
23
+
24
+ By default this will create a tag.
25
+
26
+ See the docs on [hatch-nodejs-version](https://github.com/agoose77/hatch-nodejs-version#semver) for details.
27
+
28
+ ```bash
29
+ hatch version <new-version>
30
+ ```
31
+
32
+ ## Packaging
33
+
34
+ Clean up all the development files from your local repo before building the package:
35
+
36
+ ```bash
37
+ git clean -dfX
38
+ ```
39
+
40
+ To create a Python source package (`.tar.gz`) in the `dist/` directory, do:
41
+
42
+ ```bash
43
+ python -m build --sdist
44
+ ```
45
+
46
+ Then to upload the package to PyPI, do:
47
+
48
+ ```bash
49
+ python -m twine upload dist/bigquery_jupyter_plugin-*.tar.gz
50
+ ```
@@ -0,0 +1,36 @@
1
+ # Copyright 2024 Google LLC
2
+ #
3
+ # Use of this source code is governed by a BSD-style
4
+ # license that can be found in the LICENSE file or at
5
+ # https://developers.google.com/open-source/licenses/bsd
6
+
7
+
8
+ from .handlers import setup_handlers
9
+
10
+
11
+ def _jupyter_labextension_paths():
12
+ return [{
13
+ "src": "labextension",
14
+ "dest": "bigquery-jupyter-plugin"
15
+ }]
16
+
17
+
18
+ def _jupyter_server_extension_points():
19
+ return [{
20
+ "module": "bigquery_jupyter_plugin"
21
+ }]
22
+
23
+
24
+ def _link_jupyter_server_extension(server_app):
25
+ c = server_app.config
26
+ c.DataprocPluginConfig.enable_bigquery_integration = True
27
+
28
+
29
+ def _load_jupyter_server_extension(server_app):
30
+ """Registers the API handler to receive HTTP requests from the frontend extension.
31
+
32
+ Args:
33
+ server_app: [jupyterlab.labapp.LabApp] The JupyterLab application
34
+ """
35
+ setup_handlers(server_app.web_app)
36
+ server_app.log.info(f"Registered the 'bigquery_jupyter_plugin' server extension")
@@ -0,0 +1,4 @@
1
+ # This file is auto-generated by Hatchling. As such, do not:
2
+ # - modify
3
+ # - track in version control e.g. be sure to add to .gitignore
4
+ __version__ = VERSION = '0.0.1'
@@ -0,0 +1,34 @@
1
+ # Copyright 2024 Google LLC
2
+ #
3
+ # Use of this source code is governed by a BSD-style
4
+ # license that can be found in the LICENSE file or at
5
+ # https://developers.google.com/open-source/licenses/bsd
6
+
7
+ import json
8
+
9
+ from jupyter_server.base.handlers import APIHandler
10
+ from jupyter_server.utils import url_path_join
11
+ import tornado
12
+
13
+
14
+ class HealthCheckHandler(APIHandler):
15
+ """APIHandler to report whether the BigQuery Jupyter Plugin is healthy."""
16
+ @tornado.web.authenticated
17
+ def get(self):
18
+ self.finish("ok")
19
+
20
+
21
+ def setup_handlers(web_app):
22
+ host_pattern = ".*$"
23
+
24
+ base_url = web_app.settings["base_url"]
25
+ application_url = "bigquery-jupyter-plugin"
26
+
27
+ def full_path(name):
28
+ return url_path_join(base_url, application_url, name)
29
+
30
+ handlers_map = {
31
+ "health": HealthCheckHandler,
32
+ }
33
+ handlers = [(full_path(name), handler) for name, handler in handlers_map.items()]
34
+ web_app.add_handlers(host_pattern, handlers)
@@ -0,0 +1,7 @@
1
+ # Copyright 2024 Google LLC
2
+ #
3
+ # Use of this source code is governed by a BSD-style
4
+ # license that can be found in the LICENSE file or at
5
+ # https://developers.google.com/open-source/licenses/bsd
6
+
7
+ """Python unit tests for bigquery_jupyter_plugin."""
@@ -0,0 +1,11 @@
1
+ # Copyright 2024 Google LLC
2
+ #
3
+ # Use of this source code is governed by a BSD-style
4
+ # license that can be found in the LICENSE file or at
5
+ # https://developers.google.com/open-source/licenses/bsd
6
+
7
+
8
+ async def test_get_example(jp_fetch):
9
+ response = await jp_fetch("bigquery-jupyter-plugin", "health")
10
+ assert response.code == 200
11
+ assert response.body.decode("utf-8") == "ok"
@@ -0,0 +1,19 @@
1
+ # Copyright 2024 Google LLC
2
+ #
3
+ # Use of this source code is governed by a BSD-style
4
+ # license that can be found in the LICENSE file or at
5
+ # https://developers.google.com/open-source/licenses/bsd
6
+
7
+ import pytest
8
+
9
+ pytest_plugins = ["pytest_jupyter.jupyter_server"]
10
+
11
+ @pytest.fixture
12
+ def jp_server_config(jp_server_config):
13
+ return {
14
+ "ServerApp": {
15
+ "jpserver_extensions": {
16
+ "bigquery_jupyter_plugin": True,
17
+ },
18
+ },
19
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "packageManager": "python",
3
+ "packageName": "bigquery_jupyter_plugin",
4
+ "uninstallInstructions": "Use your Python package manager (pip, conda, etc.) to uninstall the package bigquery_jupyter_plugin"
5
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "ServerApp": {
3
+ "jpserver_extensions": {
4
+ "bigquery_jupyter_plugin": true
5
+ }
6
+ }
7
+ }
@@ -0,0 +1,210 @@
1
+ {
2
+ "name": "bigquery-jupyter-plugin",
3
+ "version": "0.0.1",
4
+ "description": "BigQuery JupyterLab Plugin",
5
+ "keywords": [
6
+ "jupyter",
7
+ "jupyterlab",
8
+ "jupyterlab-extension"
9
+ ],
10
+ "homepage": "https://github.com/GoogleCloudPlatform/bigquery-jupyter-plugin",
11
+ "bugs": {
12
+ "url": "https://github.com/GoogleCloudPlatform/bigquery-jupyter-plugin/issues"
13
+ },
14
+ "license": "BSD-3-Clause",
15
+ "author": {
16
+ "name": "Google Inc.",
17
+ "email": "dataproc-plugins@google.com"
18
+ },
19
+ "files": [
20
+ "lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
21
+ "style/**/*.{css,js,eot,gif,html,jpg,json,png,svg,woff2,ttf}",
22
+ "src/**/*.{ts,tsx}",
23
+ "schema/*.json"
24
+ ],
25
+ "main": "lib/index.js",
26
+ "types": "lib/index.d.ts",
27
+ "style": "style/index.css",
28
+ "repository": {
29
+ "type": "git",
30
+ "url": "https://github.com/GoogleCloudPlatform/bigquery-jupyter-plugin.git"
31
+ },
32
+ "scripts": {
33
+ "build": "jlpm build:lib && jlpm build:labextension:dev",
34
+ "build:prod": "jlpm clean && jlpm build:lib:prod && jlpm build:labextension",
35
+ "build:labextension": "jupyter labextension build .",
36
+ "build:labextension:dev": "jupyter labextension build --development True .",
37
+ "build:lib": "tsc --sourceMap",
38
+ "build:lib:prod": "tsc",
39
+ "clean": "jlpm clean:lib",
40
+ "clean:lib": "rimraf lib tsconfig.tsbuildinfo",
41
+ "clean:lintcache": "rimraf .eslintcache .stylelintcache",
42
+ "clean:labextension": "rimraf bigquery_jupyter_plugin/labextension bigquery_jupyter_plugin/_version.py",
43
+ "clean:all": "jlpm clean:lib && jlpm clean:labextension && jlpm clean:lintcache",
44
+ "eslint": "jlpm eslint:check --fix",
45
+ "eslint:check": "eslint . --cache --ext .ts,.tsx",
46
+ "install:extension": "jlpm build",
47
+ "lint": "jlpm stylelint && jlpm prettier && jlpm eslint",
48
+ "lint:check": "jlpm stylelint:check && jlpm prettier:check && jlpm eslint:check",
49
+ "prettier": "jlpm prettier:base --write --list-different",
50
+ "prettier:base": "prettier \"**/*{.ts,.tsx,.js,.jsx,.css,.json,.md}\"",
51
+ "prettier:check": "jlpm prettier:base --check",
52
+ "stylelint": "jlpm stylelint:check --fix",
53
+ "stylelint:check": "stylelint --cache \"style/**/*.css\"",
54
+ "test": "jest --coverage",
55
+ "watch": "run-p watch:src watch:labextension",
56
+ "watch:src": "tsc -w --sourceMap",
57
+ "watch:labextension": "jupyter labextension watch ."
58
+ },
59
+ "dependencies": {
60
+ "@jupyterlab/application": "^4.0.0",
61
+ "@jupyterlab/coreutils": "^6.0.0",
62
+ "@jupyterlab/services": "^7.0.0",
63
+ "@jupyterlab/settingregistry": "^4.0.0"
64
+ },
65
+ "devDependencies": {
66
+ "@jupyterlab/builder": "^4.0.0",
67
+ "@jupyterlab/testutils": "^4.0.0",
68
+ "@types/jest": "^29.2.0",
69
+ "@types/json-schema": "^7.0.11",
70
+ "@types/react": "^18.0.26",
71
+ "@types/react-addons-linked-state-mixin": "^0.14.22",
72
+ "@typescript-eslint/eslint-plugin": "^6.1.0",
73
+ "@typescript-eslint/parser": "^6.1.0",
74
+ "css-loader": "^6.7.1",
75
+ "eslint": "^8.36.0",
76
+ "eslint-config-prettier": "^8.8.0",
77
+ "eslint-plugin-prettier": "^5.0.0",
78
+ "jest": "^29.2.0",
79
+ "mkdirp": "^1.0.3",
80
+ "npm-run-all": "^4.1.5",
81
+ "prettier": "^3.0.0",
82
+ "rimraf": "^5.0.1",
83
+ "source-map-loader": "^1.0.2",
84
+ "style-loader": "^3.3.1",
85
+ "stylelint": "^15.10.1",
86
+ "stylelint-config-recommended": "^13.0.0",
87
+ "stylelint-config-standard": "^34.0.0",
88
+ "stylelint-csstree-validator": "^3.0.0",
89
+ "stylelint-prettier": "^4.0.0",
90
+ "typescript": "~5.0.2",
91
+ "yjs": "^13.5.0"
92
+ },
93
+ "sideEffects": [
94
+ "style/*.css",
95
+ "style/index.js"
96
+ ],
97
+ "styleModule": "style/index.js",
98
+ "publishConfig": {
99
+ "access": "public"
100
+ },
101
+ "jupyterlab": {
102
+ "discovery": {
103
+ "server": {
104
+ "managers": [
105
+ "pip"
106
+ ],
107
+ "base": {
108
+ "name": "bigquery_jupyter_plugin"
109
+ }
110
+ }
111
+ },
112
+ "extension": true,
113
+ "outputDir": "bigquery_jupyter_plugin/labextension",
114
+ "schemaDir": "schema"
115
+ },
116
+ "eslintIgnore": [
117
+ "node_modules",
118
+ "dist",
119
+ "coverage",
120
+ "**/*.d.ts",
121
+ "tests",
122
+ "**/__tests__",
123
+ "ui-tests"
124
+ ],
125
+ "eslintConfig": {
126
+ "extends": [
127
+ "eslint:recommended",
128
+ "plugin:@typescript-eslint/eslint-recommended",
129
+ "plugin:@typescript-eslint/recommended",
130
+ "plugin:prettier/recommended"
131
+ ],
132
+ "parser": "@typescript-eslint/parser",
133
+ "parserOptions": {
134
+ "project": "tsconfig.json",
135
+ "sourceType": "module"
136
+ },
137
+ "plugins": [
138
+ "@typescript-eslint"
139
+ ],
140
+ "rules": {
141
+ "@typescript-eslint/naming-convention": [
142
+ "error",
143
+ {
144
+ "selector": "interface",
145
+ "format": [
146
+ "PascalCase"
147
+ ],
148
+ "custom": {
149
+ "regex": "^I[A-Z]",
150
+ "match": true
151
+ }
152
+ }
153
+ ],
154
+ "@typescript-eslint/no-unused-vars": [
155
+ "warn",
156
+ {
157
+ "args": "none"
158
+ }
159
+ ],
160
+ "@typescript-eslint/no-explicit-any": "off",
161
+ "@typescript-eslint/no-namespace": "off",
162
+ "@typescript-eslint/no-use-before-define": "off",
163
+ "@typescript-eslint/quotes": [
164
+ "error",
165
+ "single",
166
+ {
167
+ "avoidEscape": true,
168
+ "allowTemplateLiterals": false
169
+ }
170
+ ],
171
+ "curly": [
172
+ "error",
173
+ "all"
174
+ ],
175
+ "eqeqeq": "error",
176
+ "prefer-arrow-callback": "error"
177
+ }
178
+ },
179
+ "prettier": {
180
+ "singleQuote": true,
181
+ "trailingComma": "none",
182
+ "arrowParens": "avoid",
183
+ "endOfLine": "auto",
184
+ "overrides": [
185
+ {
186
+ "files": "package.json",
187
+ "options": {
188
+ "tabWidth": 4
189
+ }
190
+ }
191
+ ]
192
+ },
193
+ "stylelint": {
194
+ "extends": [
195
+ "stylelint-config-recommended",
196
+ "stylelint-config-standard",
197
+ "stylelint-prettier/recommended"
198
+ ],
199
+ "plugins": [
200
+ "stylelint-csstree-validator"
201
+ ],
202
+ "rules": {
203
+ "csstree/validator": true,
204
+ "property-no-vendor-prefix": null,
205
+ "selector-class-pattern": "^([a-z][A-z\\d]*)(-[A-z\\d]+)*$",
206
+ "selector-no-vendor-prefix": null,
207
+ "value-no-vendor-prefix": null
208
+ }
209
+ }
210
+ }
@@ -0,0 +1,57 @@
1
+ [build-system]
2
+ requires = ["hatchling>=1.5.0", "jupyterlab>=4.0.0,<5", "hatch-nodejs-version>=0.3.2"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "bigquery_jupyter_plugin"
7
+ readme = "README.md"
8
+ license = { file = "LICENSE" }
9
+ requires-python = ">=3.8"
10
+ classifiers = [
11
+ "Framework :: Jupyter",
12
+ "Framework :: Jupyter :: JupyterLab",
13
+ "Framework :: Jupyter :: JupyterLab :: 4",
14
+ "Framework :: Jupyter :: JupyterLab :: Extensions",
15
+ "Framework :: Jupyter :: JupyterLab :: Extensions :: Prebuilt",
16
+ "License :: OSI Approved :: BSD License",
17
+ "Programming Language :: Python",
18
+ "Programming Language :: Python :: 3",
19
+ "Programming Language :: Python :: 3.8",
20
+ "Programming Language :: Python :: 3.9",
21
+ "Programming Language :: Python :: 3.10",
22
+ "Programming Language :: Python :: 3.11",
23
+ "Programming Language :: Python :: 3.12",
24
+ ]
25
+ dependencies = [
26
+ "jupyter_server>=2.0.1,<3",
27
+ "dataproc-jupyter-plugin>=0.1.74",
28
+ ]
29
+ dynamic = ["version", "description", "authors", "urls", "keywords"]
30
+
31
+ [project.optional-dependencies]
32
+ test = [
33
+ "coverage",
34
+ "pytest",
35
+ "pytest-asyncio",
36
+ "pytest-cov",
37
+ "pytest-jupyter[server]>=0.6.0"
38
+ ]
39
+
40
+ [tool.hatch.version]
41
+ source = "nodejs"
42
+
43
+ [tool.hatch.metadata.hooks.nodejs]
44
+ fields = ["description", "authors", "urls"]
45
+
46
+ [tool.hatch.build.targets.wheel.shared-data]
47
+ "install.json" = "share/jupyter/labextensions/bigquery-jupyter-plugin/install.json"
48
+ "jupyter-config/server-config" = "etc/jupyter/jupyter_server_config.d"
49
+
50
+ [tool.hatch.build.hooks.version]
51
+ path = "bigquery_jupyter_plugin/_version.py"
52
+
53
+ [tool.jupyter-releaser.options]
54
+ version_cmd = "hatch version"
55
+
56
+ [tool.check-wheel-contents]
57
+ ignore = ["W002"]
@@ -0,0 +1,7 @@
1
+ # Copyright 2024 Google LLC
2
+ #
3
+ # Use of this source code is governed by a BSD-style
4
+ # license that can be found in the LICENSE file or at
5
+ # https://developers.google.com/open-source/licenses/bsd
6
+
7
+ __import__("setuptools").setup()