-
Notifications
You must be signed in to change notification settings - Fork 225
Update build chain for dash 0.32.1 #94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
d02dd2a
Update build step to use dash-generate-components
pbugnion 5e0bbed
Build components into dbc.components
pbugnion 80deb35
Make _components package private
pbugnion bebe576
Restore METADATA_PATH variable for docs
pbugnion 43ad698
Correct bundling of components
pbugnion ba3fc94
MOve build artefacts to _components/
pbugnion f211c72
Consistent indentation of loaders
pbugnion 2b6b1c7
Bundle demo code into demo-lib
pbugnion 4e753a5
Migrate content-base to configuration
pbugnion 75120cb
Lower bound on Dash version
pbugnion a266f5f
Update manifest with new path to components
pbugnion d7c76d7
Avoid long lines
pbugnion 5ac9cfa
Add dash to JS build chain
pbugnion 11a318a
Correct path in manifest
pbugnion File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
include dash_bootstrap_components/bundle.js | ||
include dash_bootstrap_components/metadata.json | ||
include dash_bootstrap_components/_components/dash_bootstrap_components.min.js | ||
include dash_bootstrap_components/_components/metadata.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,29 @@ | ||
import os | ||
import sys | ||
|
||
import dash | ||
|
||
from . import themes # noqa | ||
from ._version import __version__ # noqa | ||
from . import _components | ||
|
||
_current_path = os.path.dirname(os.path.abspath(__file__)) | ||
|
||
METADATA_PATH = os.path.join(_current_path, "metadata.json") | ||
|
||
# Dash automatic class creation from `metadata.json` file. | ||
METADATA_PATH = os.path.join(_current_path, "_components", "metadata.json") | ||
|
||
_js_dist = [ | ||
{ | ||
"relative_package_path": "bundle.js", | ||
"relative_package_path": ( | ||
"_components/dash_bootstrap_components.min.js" | ||
), | ||
"namespace": "dash_bootstrap_components", | ||
} | ||
] | ||
|
||
_css_dist = [] | ||
|
||
|
||
def _setup_js_components(module, path_to_metadata): | ||
components = dash.development.component_loader.load_components( | ||
path_to_metadata, "dash_bootstrap_components" | ||
) | ||
for component in components: | ||
setattr(module, component.__name__, component) | ||
component._js_dist = _js_dist | ||
component._css_dist = _css_dist | ||
for _component_name in _components.__all__: | ||
_component = getattr(_components, _component_name) | ||
_component._js_dist = _js_dist | ||
_component._css_dist = _css_dist | ||
|
||
|
||
_setup_js_components(sys.modules[__name__], METADATA_PATH) | ||
from ._components import * # noqa |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,6 @@ def _get_long_description(): | |
author_email="[email protected]", | ||
url="https://github.com/ASIDataScience/dash-bootstrap-components", | ||
packages=find_packages(), | ||
install_requires=["dash"], | ||
install_requires=["dash>=0.32.1"], | ||
include_package_data=True, | ||
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we add something like
black dash_bootstrap_components/_components
to this?Otherwise the generated Python files are going to fail the build once they get added to version control.Actually ignore this, I think we're not keeping these under version control right? We're just generating them for inclusion in the distribution?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we don't keep the generated sources under version control (unlike, for instance, dash-core-components).
While we could still reformat them with black, I'd vote against because: