solvebio-dash-components
This package provides the React component suite for SolveBio-specific Dash components
Development
Setup
# Install JavaScript dependencies
$ npm install
# Create Python 2 virtual environment and install Python dependencies
$ pipenv --two install --dev
# Enter virtual environment
$ pipenv shell
Add the following line to your Dash app
app.scripts.config.serve_locally = True
Components
To install the SolveBio Dash components locally, simply clone the repo to the root folder of your Dash app
$ git clone https://github.com/solvebio/solvebio-dash-components.git
Then cd into the directory and follow the above setup process.
In addition, add the following lines to your Dash app
sys.path.insert(0, 'solvebio-dash-components')
import solvebio_dash_components as sdc
DashS3Uploader
A working example of the DashS3Uploader component can be launched with the following:
$ python usage.py
$ open http://local.solvebio.com:8050
One thing to note about the DashS3Uploader is that when run locally, it must be run on local.solvebio.com
for proper function. This is because the CORS configurations have been set on the server side
so as to only allow S3 uploading specifically from the above address.
Code quality and tests
To run lint and unit tests:
$ npm test
To run unit tests and watch for changes:
$ npm run test-watch
To run a specific test
In your test, append .only to a describe or it statement:
describe.only('Foo component', () => {
// ...
});
Testing your components in Dash
-
Build development bundle to
lib/and watch for changes# Once this is started, you can just leave it running. $ npm start -
Install module locally (after every change)
# Generate metadata, and build the JavaScript bundle $ npm run install-local # Now you're done. For subsequent changes, if you've got `npm start` # running in a separate process, it's enough to just do: $ python setup.py install -
Run Dash file containing your component
$ python usage.py
Installing Python package locally
Before publishing to PyPi, you can test installing the module locally:
# Install in `site-packages` on your machine
$ npm run install-local
Uninstalling Python package locally
$ npm run uninstall-local
Publishing
Currently, separate steps must be taken to publish to NPM and PyPi as this project is based on the dash-components-archetype. There is ongoing work to simplify the publishing steps into one workflow here.
-
Publish to NPM
# Prepublish $ npm run prepublish # Bump the package version $ vim package.json # Create new tag $ git tag -a vx.x.x -m "tag message" # Push branch and tags to repo $ git push origin --tags # Publish to NPM $ npm publish -
Publish to PyPi
# Bump the PyPi package to the same version $ vim solvebio_dash_components/version.py # Commit to github $ git add solvebio_dash_components/version.py $ git commit -m "Bump pypi package version to vx.x.x" # Create new dist $ python setup.py sdist # Publish to PyPi using $ twine upload dist/solvebio_dash_components-<new_version>.tar.gz
Builder / Archetype
We use Builder to centrally manage build configuration, dependencies, and scripts.
To see all builder scripts available:
$ builder help
See the dash-components-archetype repo for more information.
Metadata
Release files for solvebio-dash-components 0.6.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| solvebio_dash_components-0.6.7.tar.gz | 4.0 MB | Without provenance | Details for solvebio_dash_components-0.6.7.tar.gz |
Release files / solvebio_dash_components-0.6.7.tar.gz
| Download URL | solvebio_dash_components-0.6.7.tar.gz |
|---|---|
| Size | 4.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
784957adcb521d356382084d45c490d504fe43c759bcc8a896569a5538a8101c
|
|
BLAKE2b-256 checksum How to use checksums |
ca3573047da1ce76b8ea0b81fb401dcacb492339f6271c7b3a747abe5cfcd898
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/2.7.10
|
Security for solvebio-dash-components 0.6.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.