Skip to content

Commit f07f69c

Browse files
author
Xing Han Lu
committed
Files updated by dash-component-boilerplate refactoring
1 parent 1f1cae0 commit f07f69c

File tree

8 files changed

+378
-329
lines changed

8 files changed

+378
-329
lines changed

.gitignore

Lines changed: 262 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,301 @@
11
# See https://help.github.com/ignore-files/ for more about ignoring files.
2+
# Created by .ignore support plugin (hsz.mobi)
3+
### VisualStudioCode template
4+
.vscode/*
5+
!.vscode/settings.json
6+
!.vscode/tasks.json
7+
!.vscode/launch.json
8+
!.vscode/extensions.json
9+
### JetBrains template
10+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
11+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
212

313
# dependencies
414
/node_modules
15+
# User-specific stuff
16+
.idea/**/workspace.xml
17+
.idea/**/tasks.xml
18+
.idea/**/usage.statistics.xml
19+
.idea/**/dictionaries
20+
.idea/**/shelf
521

622
# production
723
/build
824
/demo
25+
# Sensitive or high-churn files
26+
.idea/**/dataSources/
27+
.idea/**/dataSources.ids
28+
.idea/**/dataSources.local.xml
29+
.idea/**/sqlDataSources.xml
30+
.idea/**/dynamic.xml
31+
.idea/**/uiDesigner.xml
32+
.idea/**/dbnavigator.xml
933

1034
# testing
1135
/coverage
36+
# Gradle
37+
.idea/**/gradle.xml
38+
.idea/**/libraries
1239

1340
# misc
1441
.DS_Store
1542
.env.local
1643
.env.development.local
1744
.env.test.local
1845
.env.production.local
46+
# Gradle and Maven with auto-import
47+
# When using Gradle or Maven with auto-import, you should exclude module files,
48+
# since they will be recreated, and may cause churn. Uncomment if using
49+
# auto-import.
50+
# .idea/modules.xml
51+
# .idea/*.iml
52+
# .idea/modules
1953

54+
# CMake
55+
cmake-build-*/
56+
57+
# Mongo Explorer plugin
58+
.idea/**/mongoSettings.xml
59+
60+
# File-based project format
61+
*.iws
62+
63+
# IntelliJ
64+
out/
65+
66+
# mpeltonen/sbt-idea plugin
67+
.idea_modules/
68+
69+
# JIRA plugin
70+
atlassian-ide-plugin.xml
71+
72+
# Cursive Clojure plugin
73+
.idea/replstate.xml
74+
75+
# Crashlytics plugin (for Android Studio and IntelliJ)
76+
com_crashlytics_export_strings.xml
77+
crashlytics.properties
78+
crashlytics-build.properties
79+
fabric.properties
80+
81+
# Editor-based Rest Client
82+
.idea/httpRequests
83+
### Node template
84+
# Logs
85+
logs
86+
*.log
2087
npm-debug.log*
2188
yarn-debug.log*
2289
yarn-error.log*
2390

2491
# virtualenv
2592
vv
2693
venv
94+
# Runtime data
95+
pids
96+
*.pid
97+
*.seed
98+
*.pid.lock
99+
100+
# Directory for instrumented libs generated by jscoverage/JSCover
101+
lib-cov
102+
103+
# Coverage directory used by tools like istanbul
104+
coverage
105+
106+
# nyc test coverage
107+
.nyc_output
108+
109+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
110+
.grunt
111+
112+
# Bower dependency directory (https://bower.io/)
113+
bower_components
114+
115+
# node-waf configuration
116+
.lock-wscript
117+
118+
# Compiled binary addons (https://nodejs.org/api/addons.html)
119+
build/Release
120+
121+
# Dependency directories
122+
node_modules/
123+
jspm_packages/
124+
125+
# TypeScript v1 declaration files
126+
typings/
127+
128+
# Optional npm cache directory
129+
.npm
130+
131+
# Optional eslint cache
132+
.eslintcache
133+
134+
# Optional REPL history
135+
.node_repl_history
136+
137+
# Output of 'npm pack'
138+
*.tgz
139+
140+
# Yarn Integrity file
141+
.yarn-integrity
142+
143+
# dotenv environment variables file
144+
.env
145+
146+
# parcel-bundler cache (https://parceljs.org/)
147+
.cache
148+
149+
# next.js build output
150+
.next
27151

28152
# python
29153
*.pyc
154+
# nuxt.js build output
155+
.nuxt
30156

31157
# builds
32158
dash_cytoscape.egg-info
33159
dist
34160
*__pycache__*
161+
# vuepress build output
162+
.vuepress/dist
163+
164+
# Serverless directories
165+
.serverless
166+
### Python template
167+
# Byte-compiled / optimized / DLL files
35168
__pycache__/
169+
*.py[cod]
170+
*$py.class
171+
172+
# C extensions
173+
*.so
174+
175+
# Distribution / packaging
176+
.Python
177+
build/
178+
develop-eggs/
179+
dist/
180+
downloads/
181+
eggs/
182+
.eggs/
183+
lib64/
184+
parts/
185+
sdist/
186+
var/
187+
wheels/
188+
*.egg-info/
189+
.installed.cfg
190+
*.egg
191+
MANIFEST
192+
193+
# PyInstaller
194+
# Usually these files are written by a python script from a template
195+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
196+
*.manifest
197+
*.spec
198+
199+
# Installer logs
200+
pip-log.txt
201+
pip-delete-this-directory.txt
202+
203+
# Unit test / coverage reports
204+
htmlcov/
205+
.tox/
206+
.coverage
207+
.coverage.*
208+
nosetests.xml
209+
coverage.xml
210+
*.cover
211+
.hypothesis/
212+
.pytest_cache/
213+
214+
# Translations
215+
*.mo
216+
*.pot
217+
218+
# Django stuff:
219+
local_settings.py
220+
db.sqlite3
221+
222+
# Flask stuff:
223+
instance/
224+
.webassets-cache
225+
226+
# Scrapy stuff:
227+
.scrapy
228+
229+
# Sphinx documentation
230+
docs/_build/
231+
232+
# PyBuilder
233+
target/
234+
235+
# Jupyter Notebook
236+
.ipynb_checkpoints
237+
238+
# pyenv
239+
.python-version
240+
241+
# celery beat schedule file
242+
celerybeat-schedule
243+
244+
# SageMath parsed files
245+
*.sage.py
246+
247+
# Environments
248+
.venv
249+
env/
250+
venv/
251+
ENV/
252+
env.bak/
253+
venv.bak/
254+
255+
# Spyder project settings
256+
.spyderproject
257+
.spyproject
258+
259+
# Rope project settings
260+
.ropeproject
261+
262+
# mkdocs documentation
263+
/site
264+
265+
# mypy
266+
.mypy_cache/
267+
### SublimeText template
268+
# Cache files for Sublime Text
269+
*.tmlanguage.cache
270+
*.tmPreferences.cache
271+
*.stTheme.cache
272+
273+
# Workspace files are user-specific
274+
*.sublime-workspace
275+
276+
# Project files should be checked into the repository, unless a significant
277+
# proportion of contributors will probably not be using Sublime Text
278+
# *.sublime-project
279+
280+
# SFTP configuration file
281+
sftp-config.json
282+
283+
# Package control specific files
284+
Package Control.last-run
285+
Package Control.ca-list
286+
Package Control.ca-bundle
287+
Package Control.system-ca-bundle
288+
Package Control.cache/
289+
Package Control.ca-certs/
290+
Package Control.merged-ca-bundle
291+
Package Control.user-ca-bundle
292+
oscrypto-ca-bundle.crt
293+
bh_unicode_properties.cache
36294

37295
*.pyc
38296
.idea
39297
*.iml
40-
temp.py
298+
temp.py# Sublime-github package stores a github token in this file
299+
# https://packagecontrol.io/packages/sublime-github
300+
GitHub.sublime-settings
301+
temp.py

dash_cytoscape/Cytoscape.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class attribute).
4242
as `cy.elements(...)` and `cy.filter(...)` are not available, the selector
4343
string syntax stays the same.
4444
- layout (dict; optional): A dictionary specifying how to set the position of the elements in your
45-
graph. * The `'name'` key is required, and indicates which layout (algorithm) to
45+
graph. The `'name'` key is required, and indicates which layout (algorithm) to
4646
use.
4747
1. The layouts available by default are:
4848
- `random`: Randomly assigns positions
@@ -112,16 +112,16 @@ class attribute).
112112
- `style` (dictionary)
113113
114114
3. Items for compound nodes:
115-
- `ancestorsData` (dictionary)
116-
- `childrenData` (dictionary)
117-
- `descendantsData` (dictionary)
118-
- `parentData` (dictionary)
119-
- `siblingsData` (dictionary)
120-
- `isParent` (boolean)
121-
- `isChildless` (boolean)
122-
- `isChild` (boolean)
123-
- `isOrphan` (boolean)
124-
- `relativePosition` (dictionary)
115+
- `ancestorsData` (dictionary)
116+
- `childrenData` (dictionary)
117+
- `descendantsData` (dictionary)
118+
- `parentData` (dictionary)
119+
- `siblingsData` (dictionary)
120+
- `isParent` (boolean)
121+
- `isChildless` (boolean)
122+
- `isChild` (boolean)
123+
- `isOrphan` (boolean)
124+
- `relativePosition` (dictionary)
125125
- tapNodeData (dict; optional): The data dictionary of a node returned when you tap or click it.
126126
- tapEdge (dict; optional): The complete edge dictionary returned when you tap or click it.
127127

dash_cytoscape/__init__.py

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66

77
import dash as _dash
88

9+
# noinspection PyUnresolvedReferences
10+
from ._imports_ import *
11+
from ._imports_ import __all__
12+
913
if not hasattr(_dash, 'development'):
1014
print('Dash was not successfully imported. '
1115
'Make sure you don\'t have a file '
@@ -21,29 +25,23 @@
2125
__version__ = package['version']
2226

2327
_current_path = _os.path.dirname(_os.path.abspath(__file__))
24-
_components = _dash.development.component_loader.load_components(
25-
_os.path.join(_current_path, 'metadata.json'),
26-
package_name
27-
)
2828

2929
_this_module = _sys.modules[__name__]
3030

3131

3232
_js_dist = [
3333
{
34-
'relative_package_path': 'bundle.js',
35-
'external_url': (
36-
'https://unpkg.com/dash-cytoscape@{}'
37-
'/' + package_name + '/bundle.js'
38-
).format(__version__),
34+
'relative_package_path': 'dash_cytoscape.min.js',
35+
'dev_package_path': 'dash_cytoscape.dev.js',
36+
'external_url': 'https://unpkg.com/dash-cytoscape@{2}/{1}/{1}.min.js'.format(
37+
package_name, __name__, __version__),
3938
'namespace': package_name
4039
}
4140
]
4241

4342
_css_dist = []
4443

4544

46-
for _component in _components:
47-
setattr(_this_module, _component.__name__, _component)
48-
setattr(_component, '_js_dist', _js_dist)
49-
setattr(_component, '_css_dist', _css_dist)
45+
for _component in __all__:
46+
setattr(locals()[_component], '_js_dist', _js_dist)
47+
setattr(locals()[_component], '_css_dist', _css_dist)

dash_cytoscape/_imports_.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from .Cytoscape import Cytoscape
22

3-
43
__all__ = [
5-
"Cytoscape",
6-
]
4+
"Cytoscape"
5+
]

0 commit comments

Comments
 (0)