fileglancer 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 (128) hide show
  1. fileglancer-0.2.0/.copier-answers.yml +13 -0
  2. fileglancer-0.2.0/.gitattributes +2 -0
  3. fileglancer-0.2.0/.gitignore +141 -0
  4. fileglancer-0.2.0/.prettierignore +8 -0
  5. fileglancer-0.2.0/CHANGELOG.md +5 -0
  6. fileglancer-0.2.0/LICENSE +29 -0
  7. fileglancer-0.2.0/PKG-INFO +177 -0
  8. fileglancer-0.2.0/README.md +114 -0
  9. fileglancer-0.2.0/RELEASE.md +82 -0
  10. fileglancer-0.2.0/assets/img/JupyterLab-launcher.png +0 -0
  11. fileglancer-0.2.0/clean.sh +24 -0
  12. fileglancer-0.2.0/conftest.py +8 -0
  13. fileglancer-0.2.0/eslint.config.mjs +98 -0
  14. fileglancer-0.2.0/fileglancer/__init__.py +32 -0
  15. fileglancer-0.2.0/fileglancer/_version.py +4 -0
  16. fileglancer-0.2.0/fileglancer/app.py +93 -0
  17. fileglancer-0.2.0/fileglancer/filestore.py +278 -0
  18. fileglancer-0.2.0/fileglancer/handlers.py +490 -0
  19. fileglancer-0.2.0/fileglancer/labextension/build_log.json +732 -0
  20. fileglancer-0.2.0/fileglancer/labextension/package.json +118 -0
  21. fileglancer-0.2.0/fileglancer/labextension/static/lib_src_index_js.a6a778b640dccfd3c15f.js +70 -0
  22. fileglancer-0.2.0/fileglancer/labextension/static/lib_src_index_js.a6a778b640dccfd3c15f.js.map +1 -0
  23. fileglancer-0.2.0/fileglancer/labextension/static/remoteEntry.98df9ae205e55c14abe8.js +551 -0
  24. fileglancer-0.2.0/fileglancer/labextension/static/remoteEntry.98df9ae205e55c14abe8.js.map +1 -0
  25. fileglancer-0.2.0/fileglancer/labextension/static/style.js +4 -0
  26. fileglancer-0.2.0/fileglancer/labextension/static/style_index_css.46b2a49d8245bc7a4b7c.js +471 -0
  27. fileglancer-0.2.0/fileglancer/labextension/static/style_index_css.46b2a49d8245bc7a4b7c.js.map +1 -0
  28. fileglancer-0.2.0/fileglancer/paths.py +152 -0
  29. fileglancer-0.2.0/fileglancer/preferences.py +251 -0
  30. fileglancer-0.2.0/fileglancer/tests/__init__.py +1 -0
  31. fileglancer-0.2.0/fileglancer/tests/test_filestore.py +171 -0
  32. fileglancer-0.2.0/fileglancer/tests/test_handlers.py +49 -0
  33. fileglancer-0.2.0/fileglancer/tests/test_mock_server.py +63 -0
  34. fileglancer-0.2.0/fileglancer/ui/assets/blosc-E49GQuAK.js +18 -0
  35. fileglancer-0.2.0/fileglancer/ui/assets/blosc-E49GQuAK.js.map +1 -0
  36. fileglancer-0.2.0/fileglancer/ui/assets/chunk-INHXZS53-D3tQiqtZ.js +2 -0
  37. fileglancer-0.2.0/fileglancer/ui/assets/chunk-INHXZS53-D3tQiqtZ.js.map +1 -0
  38. fileglancer-0.2.0/fileglancer/ui/assets/index-CpLWWuWv.css +1 -0
  39. fileglancer-0.2.0/fileglancer/ui/assets/index-DvuWJ9tx.js +96 -0
  40. fileglancer-0.2.0/fileglancer/ui/assets/index-DvuWJ9tx.js.map +1 -0
  41. fileglancer-0.2.0/fileglancer/ui/assets/lz4-BIGKWw27.js +16 -0
  42. fileglancer-0.2.0/fileglancer/ui/assets/lz4-BIGKWw27.js.map +1 -0
  43. fileglancer-0.2.0/fileglancer/ui/assets/zstd-IvP746pw.js +16 -0
  44. fileglancer-0.2.0/fileglancer/ui/assets/zstd-IvP746pw.js.map +1 -0
  45. fileglancer-0.2.0/fileglancer/ui/index.html +14 -0
  46. fileglancer-0.2.0/fileglancer/ui/logo.svg +101 -0
  47. fileglancer-0.2.0/index.html +13 -0
  48. fileglancer-0.2.0/install.json +5 -0
  49. fileglancer-0.2.0/jest.config.js +39 -0
  50. fileglancer-0.2.0/jupyter-config/server-config/fileglancer.json +7 -0
  51. fileglancer-0.2.0/package.json +113 -0
  52. fileglancer-0.2.0/postcss.config.js +6 -0
  53. fileglancer-0.2.0/prettier.config.mjs +21 -0
  54. fileglancer-0.2.0/public/logo.svg +101 -0
  55. fileglancer-0.2.0/pyproject.toml +134 -0
  56. fileglancer-0.2.0/setup.py +1 -0
  57. fileglancer-0.2.0/src/App.tsx +82 -0
  58. fileglancer-0.2.0/src/__tests__/fileglancer.spec.ts +6 -0
  59. fileglancer-0.2.0/src/assets/react.svg +1 -0
  60. fileglancer-0.2.0/src/components/Browse.tsx +107 -0
  61. fileglancer-0.2.0/src/components/Help.tsx +9 -0
  62. fileglancer-0.2.0/src/components/Home.tsx +9 -0
  63. fileglancer-0.2.0/src/components/Jobs.tsx +9 -0
  64. fileglancer-0.2.0/src/components/Preferences.tsx +119 -0
  65. fileglancer-0.2.0/src/components/ui/FileBrowser/ContextMenu.tsx +134 -0
  66. fileglancer-0.2.0/src/components/ui/FileBrowser/Crumbs.tsx +81 -0
  67. fileglancer-0.2.0/src/components/ui/FileBrowser/Dialogs/ChangePermissions.tsx +195 -0
  68. fileglancer-0.2.0/src/components/ui/FileBrowser/Dialogs/Delete.tsx +78 -0
  69. fileglancer-0.2.0/src/components/ui/FileBrowser/Dialogs/NewFolderDialog.tsx +96 -0
  70. fileglancer-0.2.0/src/components/ui/FileBrowser/Dialogs/RenameDialog.tsx +96 -0
  71. fileglancer-0.2.0/src/components/ui/FileBrowser/FileList.tsx +151 -0
  72. fileglancer-0.2.0/src/components/ui/FileBrowser/FileRow.tsx +145 -0
  73. fileglancer-0.2.0/src/components/ui/FileBrowser/Toolbar.tsx +90 -0
  74. fileglancer-0.2.0/src/components/ui/Navbar.tsx +214 -0
  75. fileglancer-0.2.0/src/components/ui/PropertiesDrawer/OverviewTable.tsx +36 -0
  76. fileglancer-0.2.0/src/components/ui/PropertiesDrawer/PermissionsTable.tsx +76 -0
  77. fileglancer-0.2.0/src/components/ui/PropertiesDrawer/PropertiesDrawer.tsx +167 -0
  78. fileglancer-0.2.0/src/components/ui/Sidebar/FavoritesBrowser.tsx +190 -0
  79. fileglancer-0.2.0/src/components/ui/Sidebar/FileSharePath.tsx +94 -0
  80. fileglancer-0.2.0/src/components/ui/Sidebar/Sidebar.tsx +60 -0
  81. fileglancer-0.2.0/src/components/ui/Sidebar/Zone.tsx +83 -0
  82. fileglancer-0.2.0/src/components/ui/Sidebar/ZonesBrowser.tsx +67 -0
  83. fileglancer-0.2.0/src/contexts/CookiesContext.tsx +33 -0
  84. fileglancer-0.2.0/src/contexts/FileBrowserContext.tsx +119 -0
  85. fileglancer-0.2.0/src/contexts/PreferencesContext.tsx +272 -0
  86. fileglancer-0.2.0/src/contexts/ZoneBrowserContext.tsx +113 -0
  87. fileglancer-0.2.0/src/hooks/useContextMenu.ts +75 -0
  88. fileglancer-0.2.0/src/hooks/useCopyPath.ts +40 -0
  89. fileglancer-0.2.0/src/hooks/useDeleteDialog.ts +42 -0
  90. fileglancer-0.2.0/src/hooks/useDisplayOptions.ts +43 -0
  91. fileglancer-0.2.0/src/hooks/useFileBrowser.ts +187 -0
  92. fileglancer-0.2.0/src/hooks/useHandleLeftClick.ts +67 -0
  93. fileglancer-0.2.0/src/hooks/useHideDotFiles.ts +19 -0
  94. fileglancer-0.2.0/src/hooks/useLocalPathPreference.ts +25 -0
  95. fileglancer-0.2.0/src/hooks/useNewFolderDialog.ts +55 -0
  96. fileglancer-0.2.0/src/hooks/useOpenZones.ts +20 -0
  97. fileglancer-0.2.0/src/hooks/usePermissionsDialog.ts +48 -0
  98. fileglancer-0.2.0/src/hooks/usePropertiesTarget.ts +37 -0
  99. fileglancer-0.2.0/src/hooks/useRenameDialog.ts +65 -0
  100. fileglancer-0.2.0/src/hooks/useSearchFilter.ts +107 -0
  101. fileglancer-0.2.0/src/hooks/useSelectedFiles.ts +11 -0
  102. fileglancer-0.2.0/src/hooks/useShowPropertiesDrawer.ts +12 -0
  103. fileglancer-0.2.0/src/hooks/useTheme.ts +18 -0
  104. fileglancer-0.2.0/src/hooks/useToggleOpenFavorites.ts +20 -0
  105. fileglancer-0.2.0/src/hooks/useZoneFilter.ts +41 -0
  106. fileglancer-0.2.0/src/index.css +29 -0
  107. fileglancer-0.2.0/src/index.ts +61 -0
  108. fileglancer-0.2.0/src/layouts/BrowseLayout.tsx +14 -0
  109. fileglancer-0.2.0/src/layouts/MainLayout.tsx +21 -0
  110. fileglancer-0.2.0/src/main.tsx +10 -0
  111. fileglancer-0.2.0/src/omezarr-helper.ts +424 -0
  112. fileglancer-0.2.0/src/react-dom.d.ts +1 -0
  113. fileglancer-0.2.0/src/shared.types.ts +25 -0
  114. fileglancer-0.2.0/src/utils.ts +201 -0
  115. fileglancer-0.2.0/src/vite-env.d.ts +1 -0
  116. fileglancer-0.2.0/style/index.css +0 -0
  117. fileglancer-0.2.0/tailwind.config.js +120 -0
  118. fileglancer-0.2.0/tsconfig.app.json +24 -0
  119. fileglancer-0.2.0/tsconfig.extension.json +26 -0
  120. fileglancer-0.2.0/tsconfig.json +7 -0
  121. fileglancer-0.2.0/tsconfig.node.json +23 -0
  122. fileglancer-0.2.0/ui-tests/README.md +167 -0
  123. fileglancer-0.2.0/ui-tests/jupyter_server_test_config.py +12 -0
  124. fileglancer-0.2.0/ui-tests/package.json +15 -0
  125. fileglancer-0.2.0/ui-tests/playwright.config.js +14 -0
  126. fileglancer-0.2.0/ui-tests/tests/fileglancer.spec.ts +21 -0
  127. fileglancer-0.2.0/ui-tests/yarn.lock +0 -0
  128. fileglancer-0.2.0/vite.config.ts +38 -0
@@ -0,0 +1,13 @@
1
+ # Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2
+ _commit: v4.3.7
3
+ _src_path: https://github.com/jupyterlab/extension-template
4
+ author_email: ''
5
+ author_name: allison-truhlar
6
+ has_binder: true
7
+ has_settings: false
8
+ kind: server
9
+ labextension_name: fileglancer
10
+ project_short_description: Browse, share, and publish files on the Janelia file system
11
+ python_name: fileglancer
12
+ repository: https://github.com/JaneliaSciComp/fileglancer
13
+ test: true
@@ -0,0 +1,2 @@
1
+ # GitHub syntax highlighting
2
+ pixi.lock linguist-language=YAML linguist-generated=true
@@ -0,0 +1,141 @@
1
+ *.bundle.*
2
+ lib/
3
+ node_modules/
4
+ *.log
5
+ .eslintcache
6
+ .stylelintcache
7
+ *.egg-info/
8
+ .ipynb_checkpoints
9
+ *.tsbuildinfo
10
+ fileglancer/labextension
11
+ fileglancer/ui
12
+ # Version file is handled by hatchling
13
+ fileglancer/_version.py
14
+
15
+ # Integration tests
16
+ ui-tests/test-results/
17
+ ui-tests/playwright-report/
18
+ junit.xml
19
+
20
+ # Created by https://www.gitignore.io/api/python
21
+ # Edit at https://www.gitignore.io/?templates=python
22
+
23
+ ### Python ###
24
+ # Byte-compiled / optimized / DLL files
25
+ __pycache__/
26
+ *.py[cod]
27
+ *$py.class
28
+
29
+ # C extensions
30
+ *.so
31
+
32
+ # Distribution / packaging
33
+ .Python
34
+ build/
35
+ develop-eggs/
36
+ dist/
37
+ downloads/
38
+ eggs/
39
+ .eggs/
40
+ lib/
41
+ lib64/
42
+ parts/
43
+ sdist/
44
+ var/
45
+ wheels/
46
+ pip-wheel-metadata/
47
+ share/python-wheels/
48
+ .installed.cfg
49
+ *.egg
50
+ MANIFEST
51
+
52
+ # PyInstaller
53
+ # Usually these files are written by a python script from a template
54
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
55
+ *.manifest
56
+ *.spec
57
+
58
+ # Installer logs
59
+ pip-log.txt
60
+ pip-delete-this-directory.txt
61
+
62
+ # Unit test / coverage reports
63
+ htmlcov/
64
+ .tox/
65
+ .nox/
66
+ .coverage
67
+ .coverage.*
68
+ .cache
69
+ nosetests.xml
70
+ coverage/
71
+ coverage.xml
72
+ *.cover
73
+ .hypothesis/
74
+ .pytest_cache/
75
+
76
+ # Translations
77
+ *.mo
78
+ *.pot
79
+
80
+ # Scrapy stuff:
81
+ .scrapy
82
+
83
+ # Sphinx documentation
84
+ docs/_build/
85
+
86
+ # PyBuilder
87
+ target/
88
+
89
+ # pyenv
90
+ .python-version
91
+
92
+ # celery beat schedule file
93
+ celerybeat-schedule
94
+
95
+ # SageMath parsed files
96
+ *.sage.py
97
+
98
+ # Spyder project settings
99
+ .spyderproject
100
+ .spyproject
101
+
102
+ # Rope project settings
103
+ .ropeproject
104
+
105
+ # Mr Developer
106
+ .mr.developer.cfg
107
+ .project
108
+ .pydevproject
109
+
110
+ # mkdocs documentation
111
+ /site
112
+
113
+ # mypy
114
+ .mypy_cache/
115
+ .dmypy.json
116
+ dmypy.json
117
+
118
+ # Pyre type checker
119
+ .pyre/
120
+
121
+ # End of https://www.gitignore.io/api/python
122
+
123
+ # OSX files
124
+ .DS_Store
125
+
126
+ # Yarn cache
127
+ .yarn/
128
+
129
+ # pixi environments
130
+ .pixi
131
+ *.egg-info
132
+
133
+ # lock files
134
+ pixi.lock
135
+ package-lock.json
136
+
137
+ # Zarr files
138
+ *.zarr
139
+
140
+ # Converted Tailwind CSS
141
+ style/tailwind_converted.css
@@ -0,0 +1,8 @@
1
+ node_modules
2
+ **/node_modules
3
+ **/lib
4
+ **/package.json
5
+ !/package.json
6
+ fileglancer
7
+ .github
8
+ /style/tailwind_converted.css
@@ -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, allison-truhlar
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,177 @@
1
+ Metadata-Version: 2.4
2
+ Name: fileglancer
3
+ Version: 0.2.0
4
+ Summary: Browse, share, and publish files on the Janelia file system
5
+ Project-URL: Homepage, https://github.com/JaneliaSciComp/fileglancer
6
+ Project-URL: Bug Tracker, https://github.com/JaneliaSciComp/fileglancer/issues
7
+ Project-URL: Repository, https://github.com/JaneliaSciComp/fileglancer.git
8
+ Author: allison-truhlar
9
+ License: BSD 3-Clause License
10
+
11
+ Copyright (c) 2025, allison-truhlar
12
+ All rights reserved.
13
+
14
+ Redistribution and use in source and binary forms, with or without
15
+ modification, are permitted provided that the following conditions are met:
16
+
17
+ 1. Redistributions of source code must retain the above copyright notice, this
18
+ list of conditions and the following disclaimer.
19
+
20
+ 2. Redistributions in binary form must reproduce the above copyright notice,
21
+ this list of conditions and the following disclaimer in the documentation
22
+ and/or other materials provided with the distribution.
23
+
24
+ 3. Neither the name of the copyright holder nor the names of its
25
+ contributors may be used to endorse or promote products derived from
26
+ this software without specific prior written permission.
27
+
28
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
29
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
31
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
32
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
34
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
35
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
36
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38
+ License-File: LICENSE
39
+ Keywords: jupyter,jupyterlab,jupyterlab-extension
40
+ Classifier: Framework :: Jupyter
41
+ Classifier: Framework :: Jupyter :: JupyterLab
42
+ Classifier: Framework :: Jupyter :: JupyterLab :: 4
43
+ Classifier: Framework :: Jupyter :: JupyterLab :: Extensions
44
+ Classifier: Framework :: Jupyter :: JupyterLab :: Extensions :: Prebuilt
45
+ Classifier: License :: OSI Approved :: BSD License
46
+ Classifier: Programming Language :: Python
47
+ Classifier: Programming Language :: Python :: 3
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.10
53
+ Requires-Dist: jupyter-server<3,>=2.4.0
54
+ Requires-Dist: jupyterlab>=4.3.0
55
+ Requires-Dist: pydantic<3,>=2.10.6
56
+ Provides-Extra: test
57
+ Requires-Dist: coverage; extra == 'test'
58
+ Requires-Dist: pytest; extra == 'test'
59
+ Requires-Dist: pytest-asyncio; extra == 'test'
60
+ Requires-Dist: pytest-cov; extra == 'test'
61
+ Requires-Dist: pytest-jupyter[server]>=0.6.0; extra == 'test'
62
+ Description-Content-Type: text/markdown
63
+
64
+ # Fileglancer frontend extension
65
+
66
+ [![Github Actions Status](https://github.com/JaneliaSciComp/fileglancer/workflows/Build/badge.svg)](https://github.com/JaneliaSciComp/fileglancer/actions/workflows/build.yml)
67
+ [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/JaneliaSciComp/fileglancer/main?urlpath=lab)
68
+
69
+ React-based frontend extension for the Fileglancer app.
70
+
71
+ ## Development install
72
+
73
+ Clone the repo to your local environment and change directory to the new repo folder.
74
+
75
+ ```bash
76
+ git clone git@github.com:JaneliaSciComp/fileglancer.git
77
+ cd fileglancer
78
+ ```
79
+
80
+ If this is your first time installing the extension in dev mode, install package in development mode.
81
+
82
+ ```bash
83
+ pixi run dev-install
84
+ ```
85
+
86
+ You can build the frontend extension in watch mode - it will automatically rebuild when there are file changes to the frontend:
87
+
88
+ ```bash
89
+ pixi run dev-watch
90
+ ```
91
+
92
+ In new terminal, run Jupyter Lab in autoreload mode - it will automatically rebuild when there are file changes to the backend:
93
+
94
+ ```bash
95
+ pixi run dev-launch
96
+ ```
97
+
98
+ Saved changes in your directory should now be automatically 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).
99
+
100
+ If everything has worked so far, you should see the React Widget on the Launcher pane:
101
+
102
+ ![Screenshot of the JupyterLab Launcher panel. In the bottom section, titled "Other", the square tile with the title "React Widget" is circled](./assets/img/JupyterLab-launcher.png)
103
+
104
+ ### Troubleshooting the extension
105
+
106
+ If you run into any build issues, the first thing to try is to clear the build directories and start from scratch:
107
+
108
+ ```bash
109
+ ./clean.sh
110
+ ```
111
+
112
+ If you're still having issues, try manually deleting the symlink at `.pixi/envs/share/jupyter/labextensions/fileglancer` inside the fileglancer repo directory. Then, reinstall the extension using `pixi run dev-install`, and follow the steps above from there.
113
+
114
+ ## Configuration
115
+
116
+ By default, no [Fileglancer Central](https://github.com/JaneliaSciComp/fileglancer-central) server will be used.
117
+ You can configure the URL of a Fileglancer Central server with traitlets, in several ways:
118
+
119
+ ### Command line
120
+
121
+ ```bash
122
+ pixi run dev-launch --Fileglancer.central_url=http://0.0.0.0:7878
123
+ ```
124
+
125
+ ### Config file
126
+
127
+ You can create a file at `~/.jupyter/jupyter_server_config.py` (or in any of the paths reported by `pixi run jupyter --paths`) and add your configuration there, e.g.:
128
+
129
+ ```python
130
+ c.Fileglancer.central_url='http://0.0.0.0:7878'
131
+ ```
132
+
133
+ To configure "Dev Mode" which simulates many zones and file share paths, add this to your config:
134
+
135
+ ```python
136
+ c.Fileglancer.dev_mode=True
137
+ ```
138
+
139
+ ## Development Uninstall
140
+
141
+ ```bash
142
+ pixi run pip-uninstall
143
+ ```
144
+
145
+ In development mode, you will also need to remove the symlink created by `jupyter labextension develop`
146
+ command. To find its location, you can run `jupyter labextension list` to figure out where the `labextensions`
147
+ folder is located. Then you can remove the symlink named `fileglancer` within that folder.
148
+
149
+ ## Testing
150
+
151
+ ### Backend tests
152
+
153
+ To run backend tests using pytest:
154
+
155
+ ```bash
156
+ pixi run test-backend
157
+ ```
158
+
159
+ ### Frontend tests
160
+
161
+ This extension is using [Jest](https://jestjs.io/) for JavaScript code testing.
162
+
163
+ To execute them, execute:
164
+
165
+ ```bash
166
+ pixi run test-frontend
167
+ ```
168
+
169
+ ### Integration tests
170
+
171
+ This extension uses [Playwright](https://playwright.dev/docs/intro) for the integration tests (aka user level tests).
172
+ More precisely, the JupyterLab helper [Galata](https://github.com/jupyterlab/jupyterlab/tree/master/galata) is used to handle testing the extension in JupyterLab.
173
+ More information are provided within the [ui-tests](./ui-tests/README.md) README.
174
+
175
+ ## Packaging and Releases
176
+
177
+ See [RELEASE](RELEASE.md)
@@ -0,0 +1,114 @@
1
+ # Fileglancer frontend extension
2
+
3
+ [![Github Actions Status](https://github.com/JaneliaSciComp/fileglancer/workflows/Build/badge.svg)](https://github.com/JaneliaSciComp/fileglancer/actions/workflows/build.yml)
4
+ [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/JaneliaSciComp/fileglancer/main?urlpath=lab)
5
+
6
+ React-based frontend extension for the Fileglancer app.
7
+
8
+ ## Development install
9
+
10
+ Clone the repo to your local environment and change directory to the new repo folder.
11
+
12
+ ```bash
13
+ git clone git@github.com:JaneliaSciComp/fileglancer.git
14
+ cd fileglancer
15
+ ```
16
+
17
+ If this is your first time installing the extension in dev mode, install package in development mode.
18
+
19
+ ```bash
20
+ pixi run dev-install
21
+ ```
22
+
23
+ You can build the frontend extension in watch mode - it will automatically rebuild when there are file changes to the frontend:
24
+
25
+ ```bash
26
+ pixi run dev-watch
27
+ ```
28
+
29
+ In new terminal, run Jupyter Lab in autoreload mode - it will automatically rebuild when there are file changes to the backend:
30
+
31
+ ```bash
32
+ pixi run dev-launch
33
+ ```
34
+
35
+ Saved changes in your directory should now be automatically 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).
36
+
37
+ If everything has worked so far, you should see the React Widget on the Launcher pane:
38
+
39
+ ![Screenshot of the JupyterLab Launcher panel. In the bottom section, titled "Other", the square tile with the title "React Widget" is circled](./assets/img/JupyterLab-launcher.png)
40
+
41
+ ### Troubleshooting the extension
42
+
43
+ If you run into any build issues, the first thing to try is to clear the build directories and start from scratch:
44
+
45
+ ```bash
46
+ ./clean.sh
47
+ ```
48
+
49
+ If you're still having issues, try manually deleting the symlink at `.pixi/envs/share/jupyter/labextensions/fileglancer` inside the fileglancer repo directory. Then, reinstall the extension using `pixi run dev-install`, and follow the steps above from there.
50
+
51
+ ## Configuration
52
+
53
+ By default, no [Fileglancer Central](https://github.com/JaneliaSciComp/fileglancer-central) server will be used.
54
+ You can configure the URL of a Fileglancer Central server with traitlets, in several ways:
55
+
56
+ ### Command line
57
+
58
+ ```bash
59
+ pixi run dev-launch --Fileglancer.central_url=http://0.0.0.0:7878
60
+ ```
61
+
62
+ ### Config file
63
+
64
+ You can create a file at `~/.jupyter/jupyter_server_config.py` (or in any of the paths reported by `pixi run jupyter --paths`) and add your configuration there, e.g.:
65
+
66
+ ```python
67
+ c.Fileglancer.central_url='http://0.0.0.0:7878'
68
+ ```
69
+
70
+ To configure "Dev Mode" which simulates many zones and file share paths, add this to your config:
71
+
72
+ ```python
73
+ c.Fileglancer.dev_mode=True
74
+ ```
75
+
76
+ ## Development Uninstall
77
+
78
+ ```bash
79
+ pixi run pip-uninstall
80
+ ```
81
+
82
+ In development mode, you will also need to remove the symlink created by `jupyter labextension develop`
83
+ command. To find its location, you can run `jupyter labextension list` to figure out where the `labextensions`
84
+ folder is located. Then you can remove the symlink named `fileglancer` within that folder.
85
+
86
+ ## Testing
87
+
88
+ ### Backend tests
89
+
90
+ To run backend tests using pytest:
91
+
92
+ ```bash
93
+ pixi run test-backend
94
+ ```
95
+
96
+ ### Frontend tests
97
+
98
+ This extension is using [Jest](https://jestjs.io/) for JavaScript code testing.
99
+
100
+ To execute them, execute:
101
+
102
+ ```bash
103
+ pixi run test-frontend
104
+ ```
105
+
106
+ ### Integration tests
107
+
108
+ This extension uses [Playwright](https://playwright.dev/docs/intro) for the integration tests (aka user level tests).
109
+ More precisely, the JupyterLab helper [Galata](https://github.com/jupyterlab/jupyterlab/tree/master/galata) is used to handle testing the extension in JupyterLab.
110
+ More information are provided within the [ui-tests](./ui-tests/README.md) README.
111
+
112
+ ## Packaging and Releases
113
+
114
+ See [RELEASE](RELEASE.md)
@@ -0,0 +1,82 @@
1
+ # Making a new release of fileglancer_server
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
+ ## Manual release
6
+
7
+ ### Python package
8
+
9
+ This extension can be distributed as Python packages. All of the Python
10
+ packaging instructions are in the `pyproject.toml` file to wrap your extension in a
11
+ Python package.
12
+
13
+ Make sure to clean up all the development files before building the package:
14
+
15
+ ```bash
16
+ pixi run npm run clean:all
17
+ ```
18
+
19
+ You could also clean up the local git repository:
20
+
21
+ ```bash
22
+ git clean -dfX
23
+ ```
24
+
25
+ Before generating a package, you first need to install some tools:
26
+
27
+ ```bash
28
+ pixi run pip install build twine hatch
29
+ ```
30
+
31
+ Bump the version using `hatch`. By default this will create a tag.
32
+ See the docs on [hatch-nodejs-version](https://github.com/agoose77/hatch-nodejs-version#semver) for details.
33
+
34
+ ```bash
35
+ pixi run hatch version <new-version>
36
+ ```
37
+
38
+ To create a Python source package (`.tar.gz`) and the binary package (`.whl`) in the `dist/` directory, do:
39
+
40
+ ```bash
41
+ pixi run pypi-build
42
+ ```
43
+
44
+ > `python setup.py sdist bdist_wheel` is deprecated and will not work for this package.
45
+
46
+ Then to upload the package to PyPI, do:
47
+
48
+ ```bash
49
+ twine upload dist/*
50
+ ```
51
+
52
+ ### NPM package
53
+
54
+ To publish the frontend part of the extension as a NPM package, do:
55
+
56
+ ```bash
57
+ npm login
58
+ npm publish --access public
59
+ ```
60
+
61
+ ## Automated releases with the Jupyter Releaser
62
+
63
+ The extension repository should already be compatible with the Jupyter Releaser. But
64
+ the GitHub repository and the package managers need to be properly set up. Please
65
+ follow the instructions of the Jupyter Releaser [checklist](https://jupyter-releaser.readthedocs.io/en/latest/how_to_guides/convert_repo_from_repo.html).
66
+
67
+ Here is a summary of the steps to cut a new release:
68
+
69
+ - Go to the Actions panel
70
+ - Run the "Step 1: Prep Release" workflow
71
+ - Check the draft changelog
72
+ - Run the "Step 2: Publish Release" workflow
73
+
74
+ > [!NOTE]
75
+ > Check out the [workflow documentation](https://jupyter-releaser.readthedocs.io/en/latest/get_started/making_release_from_repo.html)
76
+ > for more information.
77
+
78
+ ## Publishing to `conda-forge`
79
+
80
+ 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
81
+
82
+ 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,24 @@
1
+ #!/usr/bin/env bash
2
+
3
+ clean_dir() {
4
+ local dir=$1
5
+ local random_num=$RANDOM
6
+ local temp_dir="${dir}_${random_num}_deleting"
7
+
8
+ # Rename directory if it exists
9
+ if [ -d "$dir" ]; then
10
+ mv "$dir" "$temp_dir"
11
+ if [ $? -ne 0 ]; then
12
+ echo "Failed to rename $dir to $temp_dir"
13
+ return 1
14
+ fi
15
+ rm -rf "$temp_dir" &
16
+ fi
17
+ }
18
+
19
+ rm -f fileglancer/_version.py || true
20
+ clean_dir ".pixi/envs" || true
21
+ clean_dir ".pixi/solve-group-envs" || true
22
+ clean_dir "fileglancer/labextension" || true
23
+ clean_dir "node_modules" || true
24
+ echo "Cleaned up dev environment."
@@ -0,0 +1,8 @@
1
+ import pytest
2
+
3
+ pytest_plugins = ("pytest_jupyter.jupyter_server", )
4
+
5
+
6
+ @pytest.fixture
7
+ def jp_server_config(jp_server_config):
8
+ return {"ServerApp": {"jpserver_extensions": {"fileglancer": True}}}