Skip to content

Commit 5ef1c66

Browse files
author
Xing
authored
Release v0.0.5 (#39)
* Move development section from README to CONTRIBUTING Also improve the test section in Contributing.md * Update dash version in readme and requirements.txt * Add an download_url and classifiers section to setup.py * Update Changelog * Increment Version * Remove download_url
1 parent 26df79a commit 5ef1c66

File tree

7 files changed

+138
-83
lines changed

7 files changed

+138
-83
lines changed

CHANGELOG.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,38 +6,38 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9-
## Added
9+
## [0.0.5] - 2019-03-08
10+
11+
### Added
12+
* Two new demos: `usage-grid-social-network.py` and `usage-concentric-social-network.py`
13+
* Add Issue and PR templates for Github (located in `.github`)
1014
* `tests.test_usage`: Tests for rendering usage files.
1115
* `tests.test_callbacks`: Tests for updating `Cytoscape` with callbacks.
1216
* `tests.test_interactions`: Tests for interacting with `Cytoscape`, and evaluating its event callbacks.
1317
* `tests.test_percy_snapshot`: Creates a Percy build using screenshots from other tests.
1418

15-
## Changed
16-
* `config.yml`: Added steps to run the new tests. Added coverage for Python 3.7. Included `demos` and all usage examples in `pylint` and `flake8`. Increased line limit to 100.
19+
### Changed
20+
* `usage-*.py`: Modified all the import statements from `import dash_cytoscape` to `import dash_cytoscape as cyto`. Optimized imports. They are now linted with pylint/flake8.
1721
* `demos/usage-*`: Formatted all demo apps in order to respect pylint and flake8.
18-
* `usage-*`: Formatted all demo apps in order to respect pylint and flake8.
22+
* `usage-phylogeny.py`: Clear callback conditional statement
23+
* `CONTRIBUTING.md`: changed `dash-cytoscape-0.0.1` to `dash-cytoscape-x.x.x`. Added a **Code quality & design** section. Changed the **Making a contribution** section and updated title to **Publishing**. Updated **Pre-Release checklist**. Added the **Development** section from `README.md` (renamed **Setting up the environment**). Added a **Tests** section.
24+
* `npmignore`: Added `venv` to avoid venvs to be included in the npm distribution package, which makes us a large amount of space and many unnecessary files being distributed.
25+
* `config.yml`: Added steps to run the new tests. Added coverage for Python 3.7. Included `demos` and all usage examples in `pylint` and `flake8`. Increased line limit to 100.
26+
* `README.md`: Moved the **Development** section to `CONTRIBUTING.md`. Modified the dash version in **Prerequisites**.
27+
* `requirements.txt`: Updated the dash version to latest.
28+
* `tests/requiremens.txt`: Updated the dash version to latest.
1929
* `package.json`: Removed `"prepublish": "npm run validate-init"` due to conflict with CircleCI build. This script will be deprecated in favor of the upcoming Dash Component CLI.
2030
* `tests/IntegrationTests.py`: Moved the `percy_snapshot` method to `test_percy_snapshot` in order to avoid duplicate (failing) builds on Percy. Decrease the number of processes to 1.
31+
* `setup.py`: Added classifiers and download_url.
2132

22-
## Removed
23-
* `tests.test_render`: Removed unused test
24-
25-
## Added
26-
* Two new demos: `usage-grid-social-network.py` and `usage-concentric-social-network.py`
27-
* Add Issue and PR templates for Github (located in `.github`)
28-
29-
## Changed
30-
* `usage-*.py` - Modified all the import statements from `import dash_cytoscape` to `import dash_cytoscape as cyto`. Also optimized imports.
31-
* `usage-phylogeny.py` - Clear callback conditional statement
32-
* `CONTRIBUTING.md` - changed `dash-cytoscape-0.0.1` to `dash-cytoscape-x.x.x`. Added a **Code quality & design** section. Changed the **Making a contribution** section and updated title to **Publishing**. Updated **Pre-Release checklist**.
33-
* `npmignore` - Added `venv` to avoid venvs to be included in the npm distribution package, which makes us a large amount of space and many unnecessary files being distributed.
34-
35-
## Removed
33+
### Removed
3634
* `extract-meta.js`, `extract-meta` - they were moved to the dash component CLI, thus are not needed anymore
3735
* `config.py`, `runtime.txt`, `Procfile`, `index.html` - only needed for hosting `usage-*.py` on DDS, they are now moved to `plotly/dash-cytoscape-demos`.
3836
* `review_checklist.md` - redundant since all the information is already contained in CONTRIBUTING.md
37+
* `tests.test_render`: Removed unused test
38+
3939

40-
## [0.0.4] - 2018-01-19
40+
## [0.0.4] - 2019-01-19
4141

4242
### Added
4343
* Homepage URL for PyPi

CONTRIBUTING.md

Lines changed: 86 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,45 @@
11
# Contributing to Dash Cytoscape
22

3-
## Getting Started
3+
Thank you for your interesting in contributing to this open-source project! Make sure that you have read and understood our [code of conduct](CODE_OF_CONDUCT.md).
44

5-
Refer to the [readme](README.md) for installation and development instructions.
5+
## Setting up the environment
6+
7+
Please follow the following steps for local testing:
8+
9+
1. Clone the repo
10+
```commandline
11+
git clone https://github.com/plotly/dash-cytoscape.git
12+
```
13+
2. In order to run the Python builds (`npm run build:py`) you need to create a
14+
venv for this project. Make sure you have `virtualenv` correctly installed and run this:
15+
```commandline
16+
mkdir dash_cytoscape_dev
17+
cd dash_cytoscape_dev
18+
virtualenv venv # Create a virtual env
19+
source venv/bin/activate # Activate the venv
20+
pip install -r requirements.txt # Install the requirements
21+
```
22+
23+
To activate in windows, replace the 4th line with this:
24+
```commandline
25+
venv\Scripts\activate
26+
```
27+
28+
3. Install the JavaScript dependencies and build the code:
29+
```commandline
30+
yarn
31+
yarn run build:all
32+
```
633

734
## Coding Style
835

9-
Please lint any additions to Python code with `pylint` and `flake8`.
36+
Please lint any additions to Python code with `pylint` and `flake8`:
37+
```commandline
38+
flake8 --max-line-length=100 usage.py usage-advanced.py usage-elements.py usage-events.py usage-stylesheet.py
39+
flake8 --max-line-length=100 demos tests
40+
pylint usage.py usage-advanced.py usage-elements.py usage-events.py usage-stylesheet.py
41+
pylint demos tests
42+
```
1043

1144
## Code quality & design
1245

@@ -27,10 +60,51 @@ Please lint any additions to Python code with `pylint` and `flake8`.
2760
* Can you think of cases where your current code will break? How are you handling errors? Should the user see them as notifications? Should your app try to auto-correct them for them?
2861

2962

30-
## Running the Tests
63+
## Tests
64+
65+
### Running the tests
3166

32-
_To be added_
67+
Activate your virtualenv:
68+
```commandline
69+
source venv/bin/activate
70+
```
3371

72+
If needed, install the requirements:
73+
```commandline
74+
pip install -r tests/requirements.txt
75+
```
76+
77+
Run the following tests:
78+
```commandline
79+
python -m unittest tests.test_callbacks
80+
python -m unittest tests.test_interactions
81+
python -m unittest tests.test_usage
82+
```
83+
84+
Look inside the `tests/screenshots` directory to find the images created by the tests. If you have
85+
Percy configured, run the following test:
86+
```commandline
87+
python -m unittest tests.test_percy_snapshot
88+
```
89+
90+
### Percy
91+
92+
Make sure to configure your Percy environment variables correctly:
93+
```commandline
94+
PERCY_BRANCH=local
95+
PERCY_ENABLED=1
96+
PERCY_TOKEN=***************
97+
```
98+
99+
You can find the token in the [project settings of the Percy project](https://percy.io/plotly/dash-cytoscape/settings). Only members of the Plotly organizations have access to this token.
100+
101+
### About the tests
102+
The tests are broken down in 3 categories:
103+
* Callbacks: Tests if the `elements`, `stylesheet` and `layout` properties can be updated correctly by other Dash components using callbacks.
104+
* Interactions: Tests user interactions such as dragging, clicking, and hovering over nodes, as well as the associated event callbacks.
105+
* Usage: Tests if all of the usage apps render correctly on start. This does not test callbacks.
106+
107+
Those tests are rendered into images located inside `tests/screenshots`, which are then sent to a Percy build using `tests.test_percy_snapshot`, which creates a Dash app that only serves the content of `tests/screenshots` at different routes, which are then captured by the Percy runner.
34108

35109
## Publishing
36110

@@ -41,7 +115,7 @@ After a review has been done and your changes have been approved, create a prere
41115
To publish or create a prerelease:
42116

43117
1. Check `MANIFEST.in` has all of the extra files (like CSS)
44-
2. Bump version numbers in `package.json`, update the `CHANGELOG.md`, and make a pull request
118+
2. Bump version numbers in `package.json`, update the [CHANGELOG](CHANGELOG.md), and make a pull request
45119
3. Once the pull request is merged into master:
46120
4. Build
47121
```
@@ -118,6 +192,12 @@ Complete the "Publishing" section.
118192
- [ ] If significant enough, you have created an issue about documenting the new feature or change and you have added it to the [Documentation] project.
119193
- [ ] You have created a pull request in [Dash Docs] with the new release of your feature by editing that project's [`requirements.txt` file](https://github.com/plotly/dash-docs/blob/master/requirements.txt) and you have assigned `@chriddyp` to review.
120194

195+
## Notes
196+
197+
#### Package manager
198+
Our preferred package manager for this project is Yarn. Therefore we use `yarn.lock` rather than `package-lock.json`. If you decide to start using npm for package management (which will create package-lock.json) and you commit this project to Dokku, make sure to delete `yarn.lock`.
199+
200+
121201
## Financial Contributions
122202

123203
Dash, and many of Plotly's open source products, have been funded through direct sponsorship by companies. [Get in touch](https://plot.ly/products/on-premise/) about funding feature additions, consulting, or custom app development.

README.md

Lines changed: 7 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,13 @@ Interacting with the elements:
1212

1313
### Prerequisites
1414

15-
Make sure that the following python packages are installed:
16-
17-
```
18-
dash==0.35.1
19-
dash-renderer==0.14.3
20-
dash-html-components==0.13.4
21-
dash-core-components==0.42.1
15+
Make sure that dash and its dependent libraries are correctly installed:
16+
```commandline
17+
pip install dash dash-html-components
2218
```
2319

24-
Older versions are not necessarily incompatible, but have not been extensively tested.
20+
If you want to install the latest versions, check out the [Dash docs on installation](https://dash.plot.ly/installation).
21+
2522

2623
### Usage
2724

@@ -64,47 +61,9 @@ To learn more about the core Dash components and how to use callbacks, view the
6461

6562
For supplementary information about the underlying Javascript API, view the [Cytoscape.js documentation](http://js.cytoscape.org/).
6663

67-
## Development
68-
69-
Please follow the following steps for local testing:
70-
71-
1. Clone the repo
72-
```commandline
73-
$ git clone https://github.com/plotly/dash-cytoscape.git
74-
```
75-
2. In order to run the Python builds (`npm run build:py`) you need to create a
76-
venv for this project. Make sure you have `virtualenv` correctly installed and run this:
77-
```commandline
78-
$ mkdir dash_cytoscape_dev
79-
$ cd dash_cytoscape_dev
80-
$ virtualenv venv # Create a virtual env
81-
$ source venv/bin/activate # Activate the venv
82-
```
83-
84-
To activate in windows:
85-
```commandline
86-
> venv\Scripts\activate
87-
```
88-
(and then repeat step 3).
89-
90-
3. Install the JavaScript dependencies and build the code:
91-
```commandline
92-
$ yarn
93-
$ yarn run build:all
94-
```
95-
96-
4. Install the library
97-
```commandline
98-
$ python setup.py install
99-
```
100-
101-
102-
103-
## Notes
104-
105-
#### Package manager
106-
Our preferred package manager for this project is Yarn. Therefore we use `yarn.lock` rather than `package-lock.json`. If you decide to start using npm for package management (which will create package-lock.json) and you commit this project to Dokku, make sure to delete `yarn.lock`.
64+
### Development and Contributions
10765

66+
Make sure that you have read and understood our [code of conduct](CODE_OF_CONDUCT.md), then head over to [CONTRIBUTING](CONTRIBUTING.md) to get started.
10867

10968
## License
11069

dash_cytoscape/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dash-cytoscape",
3-
"version": "0.0.4",
3+
"version": "0.0.5",
44
"description": "A Component Library for Dash aimed at facilitating network visualization in Python, wrapped around Cytoscape.js",
55
"main": "build/index.js",
66
"scripts": {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dash-cytoscape",
3-
"version": "0.0.4",
3+
"version": "0.0.5",
44
"description": "A Component Library for Dash aimed at facilitating network visualization in Python, wrapped around Cytoscape.js",
55
"main": "build/index.js",
66
"scripts": {

requirements.txt

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
# Core
2-
gunicorn>=19.8.1
3-
plotly==3.3.0
4-
dash==0.35.1
5-
dash-renderer==0.14.3
6-
dash-html-components==0.13.4
7-
dash-core-components==0.42.1
1+
biopython
2+
gunicorn
3+
plotly
4+
dash>=0.38.0
85

96
colour==0.1.5

setup.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,29 @@
2020
description=package['description'] if 'description' in package else package_name,
2121
long_description=io.open('README.md', encoding='utf-8').read(),
2222
long_description_content_type='text/markdown',
23+
url='https://dash.plot.ly/cytoscape',
2324
install_requires=[
2425
'dash',
2526
'dash-html-components',
2627
'dash_renderer',
2728
],
28-
url='https://dash.plot.ly/cytoscape'
29+
classifiers=[
30+
'Environment :: Web Environment',
31+
'Framework :: Flask',
32+
'Intended Audience :: Developers',
33+
'Intended Audience :: Education',
34+
'Intended Audience :: Financial and Insurance Industry',
35+
'Intended Audience :: Healthcare Industry',
36+
'Intended Audience :: Manufacturing',
37+
'Intended Audience :: Science/Research',
38+
'License :: OSI Approved :: MIT License',
39+
'Programming Language :: Python',
40+
'Programming Language :: Python :: 3',
41+
'Programming Language :: Python :: 3.5',
42+
'Programming Language :: Python :: 3.6',
43+
'Programming Language :: Python :: 3.7',
44+
'Topic :: Database :: Front-Ends',
45+
'Topic :: Scientific/Engineering :: Visualization',
46+
'Topic :: Software Development :: Libraries :: Application Frameworks',
47+
]
2948
)

0 commit comments

Comments
 (0)