You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* 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
Copy file name to clipboardExpand all lines: CHANGELOG.md
+19-19Lines changed: 19 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,38 +6,38 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
7
7
## [Unreleased]
8
8
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`)
10
14
*`tests.test_usage`: Tests for rendering usage files.
11
15
*`tests.test_callbacks`: Tests for updating `Cytoscape` with callbacks.
12
16
*`tests.test_interactions`: Tests for interacting with `Cytoscape`, and evaluating its event callbacks.
13
17
*`tests.test_percy_snapshot`: Creates a Percy build using screenshots from other tests.
14
18
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.
17
21
*`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.
*`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.
19
29
*`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.
20
30
*`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.
21
32
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.
*`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
36
34
*`extract-meta.js`, `extract-meta` - they were moved to the dash component CLI, thus are not needed anymore
37
35
*`config.py`, `runtime.txt`, `Procfile`, `index.html` - only needed for hosting `usage-*.py` on DDS, they are now moved to `plotly/dash-cytoscape-demos`.
38
36
*`review_checklist.md` - redundant since all the information is already contained in CONTRIBUTING.md
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+86-6Lines changed: 86 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,45 @@
1
1
# Contributing to Dash Cytoscape
2
2
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).
4
4
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:
@@ -27,10 +60,51 @@ Please lint any additions to Python code with `pylint` and `flake8`.
27
60
* 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?
28
61
29
62
30
-
## Running the Tests
63
+
## Tests
64
+
65
+
### Running the tests
31
66
32
-
_To be added_
67
+
Activate your virtualenv:
68
+
```commandline
69
+
source venv/bin/activate
70
+
```
33
71
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.
34
108
35
109
## Publishing
36
110
@@ -41,7 +115,7 @@ After a review has been done and your changes have been approved, create a prere
41
115
To publish or create a prerelease:
42
116
43
117
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
45
119
3. Once the pull request is merged into master:
46
120
4. Build
47
121
```
@@ -118,6 +192,12 @@ Complete the "Publishing" section.
118
192
-[ ] If significant enough, you have created an issue about documenting the new feature or change and you have added it to the [Documentation] project.
119
193
-[ ] 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.
120
194
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
+
121
201
## Financial Contributions
122
202
123
203
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.
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
107
65
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.
0 commit comments