jupyter-ascend-theme 0.2.0__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.
Files changed (30) hide show
  1. jupyter_ascend_theme-0.2.0/.copier-answers.yml +14 -0
  2. jupyter_ascend_theme-0.2.0/.gitignore +121 -0
  3. jupyter_ascend_theme-0.2.0/.gitlab-ci.yml +112 -0
  4. jupyter_ascend_theme-0.2.0/.prettierignore +6 -0
  5. jupyter_ascend_theme-0.2.0/.yarnrc.yml +1 -0
  6. jupyter_ascend_theme-0.2.0/CHANGELOG.md +5 -0
  7. jupyter_ascend_theme-0.2.0/LICENSE +29 -0
  8. jupyter_ascend_theme-0.2.0/PKG-INFO +163 -0
  9. jupyter_ascend_theme-0.2.0/README.md +109 -0
  10. jupyter_ascend_theme-0.2.0/RELEASE.md +84 -0
  11. jupyter_ascend_theme-0.2.0/install.json +5 -0
  12. jupyter_ascend_theme-0.2.0/jupyter_ascend_theme/__init__.py +16 -0
  13. jupyter_ascend_theme-0.2.0/jupyter_ascend_theme/_version.py +4 -0
  14. jupyter_ascend_theme-0.2.0/jupyter_ascend_theme/labextension/build_log.json +764 -0
  15. jupyter_ascend_theme-0.2.0/jupyter_ascend_theme/labextension/package.json +190 -0
  16. jupyter_ascend_theme-0.2.0/jupyter_ascend_theme/labextension/static/lib_index_js.8db43f1c0883138ca003.js +42 -0
  17. jupyter_ascend_theme-0.2.0/jupyter_ascend_theme/labextension/static/lib_index_js.8db43f1c0883138ca003.js.map +1 -0
  18. jupyter_ascend_theme-0.2.0/jupyter_ascend_theme/labextension/static/remoteEntry.01a113c470303f448956.js +541 -0
  19. jupyter_ascend_theme-0.2.0/jupyter_ascend_theme/labextension/static/remoteEntry.01a113c470303f448956.js.map +1 -0
  20. jupyter_ascend_theme-0.2.0/jupyter_ascend_theme/labextension/static/style.js +4 -0
  21. jupyter_ascend_theme-0.2.0/jupyter_ascend_theme/labextension/themes/jupyter_ascend_theme/index.css +410 -0
  22. jupyter_ascend_theme-0.2.0/jupyter_ascend_theme/labextension/themes/jupyter_ascend_theme/index.js +0 -0
  23. jupyter_ascend_theme-0.2.0/package.json +186 -0
  24. jupyter_ascend_theme-0.2.0/pyproject.toml +77 -0
  25. jupyter_ascend_theme-0.2.0/setup.py +1 -0
  26. jupyter_ascend_theme-0.2.0/src/index.ts +29 -0
  27. jupyter_ascend_theme-0.2.0/style/index.css +12 -0
  28. jupyter_ascend_theme-0.2.0/style/variables.css +398 -0
  29. jupyter_ascend_theme-0.2.0/tsconfig.json +24 -0
  30. jupyter_ascend_theme-0.2.0/yarn.lock +4939 -0
@@ -0,0 +1,14 @@
1
+ # Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2
+ _commit: v4.4.0
3
+ _src_path: https://github.com/jupyterlab/extension-template
4
+ author_email: davide.giorgiutti@cgi.com
5
+ author_name: Davide Giorgiutti
6
+ has_binder: false
7
+ has_settings: false
8
+ kind: theme
9
+ labextension_name: jupyter_ascend_theme
10
+ project_short_description: The JupyterLab ASCEND theme
11
+ python_name: jupyter_ascend_theme
12
+ repository: ''
13
+ test: false
14
+
@@ -0,0 +1,121 @@
1
+ *.bundle.*
2
+ lib/
3
+ node_modules/
4
+ *.log
5
+ .eslintcache
6
+ .stylelintcache
7
+ *.egg-info/
8
+ .ipynb_checkpoints
9
+ *.tsbuildinfo
10
+ jupyter_ascend_theme/labextension
11
+ # Version file is handled by hatchling
12
+ jupyter_ascend_theme/_version.py
13
+
14
+ # Created by https://www.gitignore.io/api/python
15
+ # Edit at https://www.gitignore.io/?templates=python
16
+
17
+ ### Python ###
18
+ # Byte-compiled / optimized / DLL files
19
+ __pycache__/
20
+ *.py[cod]
21
+ *$py.class
22
+
23
+ # C extensions
24
+ *.so
25
+
26
+ # Distribution / packaging
27
+ .Python
28
+ build/
29
+ develop-eggs/
30
+ dist/
31
+ downloads/
32
+ eggs/
33
+ .eggs/
34
+ lib/
35
+ lib64/
36
+ parts/
37
+ sdist/
38
+ var/
39
+ wheels/
40
+ pip-wheel-metadata/
41
+ share/python-wheels/
42
+ .installed.cfg
43
+ *.egg
44
+ MANIFEST
45
+
46
+ # PyInstaller
47
+ # Usually these files are written by a python script from a template
48
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
49
+ *.manifest
50
+ *.spec
51
+
52
+ # Installer logs
53
+ pip-log.txt
54
+ pip-delete-this-directory.txt
55
+
56
+ # Unit test / coverage reports
57
+ htmlcov/
58
+ .tox/
59
+ .nox/
60
+ .coverage
61
+ .coverage.*
62
+ .cache
63
+ nosetests.xml
64
+ coverage/
65
+ coverage.xml
66
+ *.cover
67
+ .hypothesis/
68
+ .pytest_cache/
69
+
70
+ # Translations
71
+ *.mo
72
+ *.pot
73
+
74
+ # Scrapy stuff:
75
+ .scrapy
76
+
77
+ # Sphinx documentation
78
+ docs/_build/
79
+
80
+ # PyBuilder
81
+ target/
82
+
83
+ # pyenv
84
+ .python-version
85
+
86
+ # celery beat schedule file
87
+ celerybeat-schedule
88
+
89
+ # SageMath parsed files
90
+ *.sage.py
91
+
92
+ # Spyder project settings
93
+ .spyderproject
94
+ .spyproject
95
+
96
+ # Rope project settings
97
+ .ropeproject
98
+
99
+ # Mr Developer
100
+ .mr.developer.cfg
101
+ .project
102
+ .pydevproject
103
+
104
+ # mkdocs documentation
105
+ /site
106
+
107
+ # mypy
108
+ .mypy_cache/
109
+ .dmypy.json
110
+ dmypy.json
111
+
112
+ # Pyre type checker
113
+ .pyre/
114
+
115
+ # End of https://www.gitignore.io/api/python
116
+
117
+ # OSX files
118
+ .DS_Store
119
+
120
+ # Yarn cache
121
+ .yarn/
@@ -0,0 +1,112 @@
1
+ # The development and release of this extension rely on a specific development and build environment.
2
+ # Furthermore, the extension is linked to (and tested) with a specific version of JupyterLab (or a range of versions).
3
+ # While the extension can be built and published from the local machine, this project pipeline ensures that the build environment
4
+ # remains consistent and targets the correct JupyterLab version.
5
+ image: node:20.12.2
6
+
7
+ cache:
8
+ untracked: true
9
+ key:
10
+ files:
11
+ - yarn.lock
12
+ - package.json
13
+ paths:
14
+ - node_modules/
15
+ policy: pull-push
16
+
17
+ stages:
18
+ - setup
19
+ - build
20
+ - test
21
+ - release
22
+
23
+ install_dependencies:
24
+ stage: setup
25
+ script:
26
+ - echo "🔄 Updating system packages..."
27
+ - apt-get update && apt-get install -y python3 python3-pip python3-venv
28
+ - echo "🐍 Setting up Python virtual environment..."
29
+ - python3 -m venv .venv
30
+ - . .venv/bin/activate
31
+ - echo "⬆️ Upgrading pip..."
32
+ - python -m pip install --upgrade pip
33
+ - echo "📦 Installing JupyterLab dependencies..."
34
+ - python -m pip install -U "jupyterlab>=4.0.0,<5"
35
+ - echo "📦 Installing JavaScript dependencies..."
36
+ - jlpm install
37
+ - echo "⬆️ Installing additional Python dependencies..."
38
+ - python -m pip install --upgrade hatchling hatch_jupyter_builder
39
+ - python -m pip install .[test]
40
+
41
+ build:
42
+ stage: build
43
+ needs: [install_dependencies]
44
+ artifacts:
45
+ paths:
46
+ - 'dist'
47
+ expire_in: 1 hr
48
+ script:
49
+ - echo "⚙️ Activating Python virtual environment..."
50
+ - . .venv/bin/activate
51
+ - echo "🛠️ Building the extension..."
52
+ - jlpm build
53
+
54
+ eslint:
55
+ stage: test
56
+ needs: [install_dependencies]
57
+ script:
58
+ - echo "🔍 Running ESLint checks..."
59
+ - . .venv/bin/activate
60
+ - jlpm run eslint:check
61
+
62
+ prettier:
63
+ stage: test
64
+ needs: [install_dependencies]
65
+ script:
66
+ - echo "✨ Checking code formatting with Prettier..."
67
+ - . .venv/bin/activate
68
+ - jlpm run prettier:check
69
+
70
+ stylelint:
71
+ stage: test
72
+ needs: [install_dependencies]
73
+ script:
74
+ - echo "🎨 Running Stylelint checks..."
75
+ - . .venv/bin/activate
76
+ - jlpm run stylelint:check
77
+
78
+ bump_version_and_release:
79
+ stage: release
80
+ needs: [install_dependencies, build]
81
+ script:
82
+ - echo "🔄 Updating system packages..."
83
+ - apt-get update && apt-get install -y python3 python3-pip python3-venv
84
+ - echo "🐍 Setting up Python virtual environment..."
85
+ - python3 -m venv .venv
86
+ - . .venv/bin/activate
87
+ - echo "⬆️ Upgrading pip..."
88
+ - python -m pip install --upgrade pip
89
+ - echo "📦 Installing necessary dependencies for release..."
90
+ - pip install twine hatch build
91
+ - echo "🔧 Configuring Git for release..."
92
+ - git config user.email "davide.giorgiutti@cgi.com@$CI_SERVER_HOST"
93
+ - git config user.name "cgi-bot"
94
+ - echo "⬇️ Pulling latest changes and rebasing..."
95
+ - git pull "https://project_access_token_name:$PROJECT_VARIABLE_WITH_ACCESS_TOKEN_VALUE@$CI_SERVER_HOST/$CI_PROJECT_PATH.git" $CI_COMMIT_BRANCH --rebase --autostash
96
+ - echo "🔢 Bumping extension version..."
97
+ - hatch version minor
98
+ - CURRENT_VERSION=$(hatch version)
99
+ - python -c "import json; data = json.load(open('package.json')); data['version'] = '$CURRENT_VERSION'; json.dump(data, open('package.json', 'w'), indent=4)"
100
+ - git status
101
+ - git add package.json
102
+ - git commit -m "cgi-bot:release extension version to $(hatch version) [ci skip]"
103
+ - echo "⬆️ Pushing version bump to repository..."
104
+ - git push "https://project_access_token_name:$PROJECT_VARIABLE_WITH_ACCESS_TOKEN_VALUE@$CI_SERVER_HOST/$CI_PROJECT_PATH.git" HEAD:$CI_COMMIT_BRANCH -o ci.skip
105
+ - echo "📦 Building package for release..."
106
+ - python -m build
107
+ - echo "🚀 Uploading package to PyPI..."
108
+ - twine upload dist/*
109
+ - jlpm clean:all
110
+ - git clean -dfX
111
+ # only:
112
+ # - master
@@ -0,0 +1,6 @@
1
+ node_modules
2
+ **/node_modules
3
+ **/lib
4
+ **/package.json
5
+ !/package.json
6
+ jupyter_ascend_theme
@@ -0,0 +1 @@
1
+ nodeLinker: node-modules
@@ -0,0 +1,5 @@
1
+ # Changelog
2
+
3
+ <!-- <START NEW CHANGELOG ENTRY> -->
4
+
5
+ <!-- <END NEW CHANGELOG ENTRY> -->
@@ -0,0 +1,29 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2025, Davide Giorgiutti
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ 1. Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ 2. Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ 3. Neither the name of the copyright holder nor the names of its
17
+ contributors may be used to endorse or promote products derived from
18
+ this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,163 @@
1
+ Metadata-Version: 2.4
2
+ Name: jupyter_ascend_theme
3
+ Version: 0.2.0
4
+ Dynamic: Project-URL
5
+ Summary: The JupyterLab ASCEND theme
6
+ Author-email: Davide Giorgiutti <davide.giorgiutti@cgi.com>
7
+ License: BSD 3-Clause License
8
+
9
+ Copyright (c) 2025, Davide Giorgiutti
10
+ All rights reserved.
11
+
12
+ Redistribution and use in source and binary forms, with or without
13
+ modification, are permitted provided that the following conditions are met:
14
+
15
+ 1. Redistributions of source code must retain the above copyright notice, this
16
+ list of conditions and the following disclaimer.
17
+
18
+ 2. Redistributions in binary form must reproduce the above copyright notice,
19
+ this list of conditions and the following disclaimer in the documentation
20
+ and/or other materials provided with the distribution.
21
+
22
+ 3. Neither the name of the copyright holder nor the names of its
23
+ contributors may be used to endorse or promote products derived from
24
+ this software without specific prior written permission.
25
+
26
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
27
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
29
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
30
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
32
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
33
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
34
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36
+ License-File: LICENSE
37
+ Keywords: CGI,jupyter,jupyterlab,jupyterlab-extension
38
+ Classifier: Framework :: Jupyter
39
+ Classifier: Framework :: Jupyter :: JupyterLab
40
+ Classifier: Framework :: Jupyter :: JupyterLab :: 4
41
+ Classifier: Framework :: Jupyter :: JupyterLab :: Extensions
42
+ Classifier: Framework :: Jupyter :: JupyterLab :: Extensions :: Prebuilt
43
+ Classifier: Framework :: Jupyter :: JupyterLab :: Extensions :: Themes
44
+ Classifier: License :: OSI Approved :: BSD License
45
+ Classifier: Programming Language :: Python
46
+ Classifier: Programming Language :: Python :: 3
47
+ Classifier: Programming Language :: Python :: 3.9
48
+ Classifier: Programming Language :: Python :: 3.10
49
+ Classifier: Programming Language :: Python :: 3.11
50
+ Classifier: Programming Language :: Python :: 3.12
51
+ Classifier: Programming Language :: Python :: 3.13
52
+ Requires-Python: >=3.9
53
+ Description-Content-Type: text/markdown
54
+
55
+ # jupyter_ascend_theme <https://pypi.org/project/jupyter-ascend-theme/>
56
+
57
+ The JupyterLab ASCEND theme.
58
+ An extension for JupyterLab, published as a PIP package, adds two ASCEND-branded themes (light and dark) and some UI elements.
59
+
60
+ This project was initialized using a copier template for Jupyterlab extensions: <https://github.com/jupyterlab/extension-template>.
61
+
62
+ ## Development Requirements
63
+
64
+ To initialize a working development environment, ensure you have the following installed on your machine:
65
+
66
+ - Node
67
+ - npm
68
+ - Yarn
69
+ - pip
70
+ - Python
71
+ - JupyterLab
72
+
73
+ The tested development environment uses the following versions:
74
+
75
+ - Node: 20.12.2
76
+ - npm: 10.5.0
77
+ - pip: 24.2
78
+ - Python: 3.11.3
79
+ - JupyterLab: 4.2.4
80
+
81
+ The template used to create this extension suggests using:
82
+
83
+ - JupyterLab >= 4.0.0
84
+
85
+ ## Install the published package (production use)
86
+
87
+ ⚠️ **Note:** Your extensions may break with new releases of JupyterLab. As noted in Backwards Compatibility, Versions and Breaking Changes, JupyterLab development and release cycles follow semantic versioning, so we recommend planning your development process to account for possible future breaking changes that may disrupt users of your extensions. Consider documenting your maintenance plans to users in your project, or setting an upper bound on the version of JupyterLab your extension is compatible with in your project’s package metadata.
88
+
89
+ <https://jupyterlab.readthedocs.io/en/stable/extension/extension_dev.html>
90
+
91
+ To install the extension, execute:
92
+
93
+ ```bash
94
+ pip install jupyter_ascend_theme
95
+ ```
96
+
97
+ ## Uninstall
98
+
99
+ To remove the extension, execute:
100
+
101
+ ```bash
102
+ pip uninstall jupyter_ascend_theme
103
+ ```
104
+
105
+ ## Development
106
+
107
+ ### Development install
108
+
109
+ Note: You will need NodeJS to build the extension package.
110
+
111
+ The `jlpm` command is JupyterLab's pinned version of [yarn](https://yarnpkg.com/) that is installed with JupyterLab.
112
+
113
+ You may use `yarn` or `npm` instead of `jlpm` below.
114
+
115
+ ```bash
116
+ # Clone the repository to your local environment
117
+ git clone https://gitlab.dev.eoss-cloud.it/cgi-italy/poieo/uis/jupyter-ascend-theme.git
118
+
119
+ # Change directory to the repository directory
120
+ cd jupyter-ascend-theme
121
+
122
+ # Install python packages in development mode
123
+ pip install -e "."
124
+
125
+ # Install js packages
126
+ jlpm install
127
+
128
+ # Link your development version of the extension with JupyterLab
129
+ jupyter labextension develop . --overwrite
130
+
131
+ # Rebuild extension Typescript source after making changes
132
+ jlpm build
133
+ ```
134
+
135
+ You can watch the source directory and run JupyterLab simultaneously in different terminals to watch for changes in the extension's source and automatically rebuild the extension.
136
+
137
+ ```bash
138
+ # Watch the source directory in one terminal, automatically rebuilding when needed
139
+ jlpm watch
140
+
141
+ # Run JupyterLab in another terminal
142
+ jupyter lab
143
+ ```
144
+
145
+ With the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).
146
+
147
+ By default, the `jlpm build` command generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:
148
+
149
+ ```bash
150
+ jupyter lab build --minimize=False
151
+ ```
152
+
153
+ ### Development uninstall
154
+
155
+ ```bash
156
+ pip uninstall jupyter_ascend_theme
157
+ ```
158
+
159
+ In development mode, you will also need to remove the symlink created by the `jupyter labextension develop` command. To find its location, you can run `jupyter labextension list` to figure out where the `labextensions` folder is located. Then you can remove the symlink named `jupyter-ascend-theme` within that folder.
160
+
161
+ ## Packaging and releasing the extension
162
+
163
+ See [RELEASE](RELEASE.md)
@@ -0,0 +1,109 @@
1
+ # jupyter_ascend_theme <https://pypi.org/project/jupyter-ascend-theme/>
2
+
3
+ The JupyterLab ASCEND theme.
4
+ An extension for JupyterLab, published as a PIP package, adds two ASCEND-branded themes (light and dark) and some UI elements.
5
+
6
+ This project was initialized using a copier template for Jupyterlab extensions: <https://github.com/jupyterlab/extension-template>.
7
+
8
+ ## Development Requirements
9
+
10
+ To initialize a working development environment, ensure you have the following installed on your machine:
11
+
12
+ - Node
13
+ - npm
14
+ - Yarn
15
+ - pip
16
+ - Python
17
+ - JupyterLab
18
+
19
+ The tested development environment uses the following versions:
20
+
21
+ - Node: 20.12.2
22
+ - npm: 10.5.0
23
+ - pip: 24.2
24
+ - Python: 3.11.3
25
+ - JupyterLab: 4.2.4
26
+
27
+ The template used to create this extension suggests using:
28
+
29
+ - JupyterLab >= 4.0.0
30
+
31
+ ## Install the published package (production use)
32
+
33
+ ⚠️ **Note:** Your extensions may break with new releases of JupyterLab. As noted in Backwards Compatibility, Versions and Breaking Changes, JupyterLab development and release cycles follow semantic versioning, so we recommend planning your development process to account for possible future breaking changes that may disrupt users of your extensions. Consider documenting your maintenance plans to users in your project, or setting an upper bound on the version of JupyterLab your extension is compatible with in your project’s package metadata.
34
+
35
+ <https://jupyterlab.readthedocs.io/en/stable/extension/extension_dev.html>
36
+
37
+ To install the extension, execute:
38
+
39
+ ```bash
40
+ pip install jupyter_ascend_theme
41
+ ```
42
+
43
+ ## Uninstall
44
+
45
+ To remove the extension, execute:
46
+
47
+ ```bash
48
+ pip uninstall jupyter_ascend_theme
49
+ ```
50
+
51
+ ## Development
52
+
53
+ ### Development install
54
+
55
+ Note: You will need NodeJS to build the extension package.
56
+
57
+ The `jlpm` command is JupyterLab's pinned version of [yarn](https://yarnpkg.com/) that is installed with JupyterLab.
58
+
59
+ You may use `yarn` or `npm` instead of `jlpm` below.
60
+
61
+ ```bash
62
+ # Clone the repository to your local environment
63
+ git clone https://gitlab.dev.eoss-cloud.it/cgi-italy/poieo/uis/jupyter-ascend-theme.git
64
+
65
+ # Change directory to the repository directory
66
+ cd jupyter-ascend-theme
67
+
68
+ # Install python packages in development mode
69
+ pip install -e "."
70
+
71
+ # Install js packages
72
+ jlpm install
73
+
74
+ # Link your development version of the extension with JupyterLab
75
+ jupyter labextension develop . --overwrite
76
+
77
+ # Rebuild extension Typescript source after making changes
78
+ jlpm build
79
+ ```
80
+
81
+ You can watch the source directory and run JupyterLab simultaneously in different terminals to watch for changes in the extension's source and automatically rebuild the extension.
82
+
83
+ ```bash
84
+ # Watch the source directory in one terminal, automatically rebuilding when needed
85
+ jlpm watch
86
+
87
+ # Run JupyterLab in another terminal
88
+ jupyter lab
89
+ ```
90
+
91
+ With the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).
92
+
93
+ By default, the `jlpm build` command generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:
94
+
95
+ ```bash
96
+ jupyter lab build --minimize=False
97
+ ```
98
+
99
+ ### Development uninstall
100
+
101
+ ```bash
102
+ pip uninstall jupyter_ascend_theme
103
+ ```
104
+
105
+ In development mode, you will also need to remove the symlink created by the `jupyter labextension develop` command. To find its location, you can run `jupyter labextension list` to figure out where the `labextensions` folder is located. Then you can remove the symlink named `jupyter-ascend-theme` within that folder.
106
+
107
+ ## Packaging and releasing the extension
108
+
109
+ See [RELEASE](RELEASE.md)
@@ -0,0 +1,84 @@
1
+ # Making a new release of jupyter_ascend_theme
2
+
3
+ The extension can be published to `PyPI` and `npm` manually or using the [Jupyter Releaser](https://github.com/jupyter-server/jupyter_releaser).
4
+
5
+ ⚠️ **Note:** The development and release of this extension rely on a specific development and build environment.
6
+ Furthermore, the extension is linked to (and tested) with a specific version of JupyterLab (or a range of versions).
7
+ While the extension can be built and published from the local machine, this project pipeline ('.gitlab-ci.yaml') ensures that the build environment remains consistent and targets the correct JupyterLab version.
8
+
9
+ ## Manual release
10
+
11
+ ### Python package
12
+
13
+ This extension can be distributed as Python packages. All of the Python
14
+ packaging instructions are in the `pyproject.toml` file to wrap your extension in a
15
+ Python package. Before generating a package, you first need to install some tools:
16
+
17
+ ```bash
18
+ pip install build twine hatch
19
+ ```
20
+
21
+ Bump the version using `hatch`. By default this will create a tag.
22
+ See the docs on [hatch-nodejs-version](https://github.com/agoose77/hatch-nodejs-version#semver) for details.
23
+
24
+ ```bash
25
+ hatch version <new-version>
26
+ ```
27
+
28
+ Make sure to clean up all the development files before building the package:
29
+
30
+ ```bash
31
+ jlpm clean:all
32
+ ```
33
+
34
+ You could also clean up the local git repository:
35
+
36
+ ```bash
37
+ git clean -dfX
38
+ ```
39
+
40
+ To create a Python source package (`.tar.gz`) and the binary package (`.whl`) in the `dist/` directory, do:
41
+
42
+ ```bash
43
+ python -m build
44
+ ```
45
+
46
+ > `python setup.py sdist bdist_wheel` is deprecated and will not work for this package.
47
+
48
+ Then to upload the package to PyPI, do:
49
+
50
+ ```bash
51
+ twine upload dist/*
52
+ ```
53
+
54
+ ### NPM package
55
+
56
+ To publish the frontend part of the extension as a NPM package, do:
57
+
58
+ ```bash
59
+ npm login
60
+ npm publish --access public
61
+ ```
62
+
63
+ ## Automated releases with the Jupyter Releaser
64
+
65
+ The extension repository should already be compatible with the Jupyter Releaser. But
66
+ the GitHub repository and the package managers need to be properly set up. Please
67
+ follow the instructions of the Jupyter Releaser [checklist](https://jupyter-releaser.readthedocs.io/en/latest/how_to_guides/convert_repo_from_repo.html).
68
+
69
+ Here is a summary of the steps to cut a new release:
70
+
71
+ - Go to the Actions panel
72
+ - Run the "Step 1: Prep Release" workflow
73
+ - Check the draft changelog
74
+ - Run the "Step 2: Publish Release" workflow
75
+
76
+ > [!NOTE]
77
+ > Check out the [workflow documentation](https://jupyter-releaser.readthedocs.io/en/latest/get_started/making_release_from_repo.html)
78
+ > for more information.
79
+
80
+ ## Publishing to `conda-forge`
81
+
82
+ If the package is not on conda forge yet, check the documentation to learn how to add it: <https://conda-forge.org/docs/maintainer/adding_pkgs.html>
83
+
84
+ Otherwise a bot should pick up the new version publish to PyPI, and open a new PR on the feedstock repository automatically.
@@ -0,0 +1,5 @@
1
+ {
2
+ "packageManager": "python",
3
+ "packageName": "jupyter_ascend_theme",
4
+ "uninstallInstructions": "Use your Python package manager (pip, conda, etc.) to uninstall the package jupyter_ascend_theme"
5
+ }
@@ -0,0 +1,16 @@
1
+ try:
2
+ from ._version import __version__
3
+ except ImportError:
4
+ # Fallback when using the package in dev mode without installing
5
+ # in editable mode with pip. It is highly recommended to install
6
+ # the package from a stable release or in editable mode: https://pip.pypa.io/en/stable/topics/local-project-installs/#editable-installs
7
+ import warnings
8
+ warnings.warn("Importing 'jupyter_ascend_theme' outside a proper installation.")
9
+ __version__ = "dev"
10
+
11
+
12
+ def _jupyter_labextension_paths():
13
+ return [{
14
+ "src": "labextension",
15
+ "dest": "jupyter_ascend_theme"
16
+ }]
@@ -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.2.0'