Skip to content

Commit f6c672d

Browse files
committed
add prettier and format code
1 parent 5ab9677 commit f6c672d

File tree

14 files changed

+123
-116
lines changed

14 files changed

+123
-116
lines changed

CODE_OF_CONDUCT.md

+19-23
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,28 @@ If you see someone who is making an extra effort to ensure our community is welc
2020

2121
The following behaviors are expected and requested of all community members:
2222

23-
* Participate in an authentic and active way. In doing so, you contribute to the health and longevity of this community.
24-
* Exercise consideration and respect in your speech and actions.
25-
* Attempt collaboration before conflict.
26-
* Refrain from demeaning, discriminatory, or harassing behavior and speech.
27-
* Be mindful of your surroundings and of your fellow participants. Alert community leaders if you notice a dangerous situation, someone in distress, or violations of this Code of Conduct, even if they seem inconsequential.
28-
* Remember that community event venues may be shared with members of the public; please be respectful to all patrons of these locations.
23+
- Participate in an authentic and active way. In doing so, you contribute to the health and longevity of this community.
24+
- Exercise consideration and respect in your speech and actions.
25+
- Attempt collaboration before conflict.
26+
- Refrain from demeaning, discriminatory, or harassing behavior and speech.
27+
- Be mindful of your surroundings and of your fellow participants. Alert community leaders if you notice a dangerous situation, someone in distress, or violations of this Code of Conduct, even if they seem inconsequential.
28+
- Remember that community event venues may be shared with members of the public; please be respectful to all patrons of these locations.
2929

3030
## 4. Unacceptable Behavior
3131

3232
The following behaviors are considered harassment and are unacceptable within our community:
3333

34-
* Violence, threats of violence or violent language directed against another person.
35-
* Sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory jokes and language.
36-
* Posting or displaying sexually explicit or violent material.
37-
* Posting or threatening to post other people's personally identifying information ("doxing").
38-
* Personal insults, particularly those related to gender, sexual orientation, race, religion, or disability.
39-
* Inappropriate photography or recording.
40-
* Inappropriate physical contact. You should have someone's consent before touching them.
41-
* Unwelcome sexual attention. This includes, sexualized comments or jokes; inappropriate touching, groping, and unwelcomed sexual advances.
42-
* Deliberate intimidation, stalking or following (online or in person).
43-
* Advocating for, or encouraging, any of the above behavior.
44-
* Sustained disruption of community events, including talks and presentations.
34+
- Violence, threats of violence or violent language directed against another person.
35+
- Sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory jokes and language.
36+
- Posting or displaying sexually explicit or violent material.
37+
- Posting or threatening to post other people's personally identifying information ("doxing").
38+
- Personal insults, particularly those related to gender, sexual orientation, race, religion, or disability.
39+
- Inappropriate photography or recording.
40+
- Inappropriate physical contact. You should have someone's consent before touching them.
41+
- Unwelcome sexual attention. This includes, sexualized comments or jokes; inappropriate touching, groping, and unwelcomed sexual advances.
42+
- Deliberate intimidation, stalking or following (online or in person).
43+
- Advocating for, or encouraging, any of the above behavior.
44+
- Sustained disruption of community events, including talks and presentations.
4545

4646
## 5. Weapons Policy
4747

@@ -59,15 +59,11 @@ If a community member engages in unacceptable behavior, the community organizers
5959

6060
If you are subject to or witness unacceptable behavior, or have any other concerns, please notify a community organizer as soon as possible. michmoreau.l@gmail.com.
6161

62-
63-
6462
Additionally, community organizers are available to help community members engage with local law enforcement or to otherwise help those experiencing unacceptable behavior feel safe. In the context of in-person events, organizers will also provide escorts as desired by the person experiencing distress.
6563

6664
## 8. Addressing Grievances
6765

68-
If you feel you have been falsely or unfairly accused of violating this Code of Conduct, you should notify with a concise description of your grievance. Your grievance will be handled in accordance with our existing governing policies.
69-
70-
66+
If you feel you have been falsely or unfairly accused of violating this Code of Conduct, you should notify with a concise description of your grievance. Your grievance will be handled in accordance with our existing governing policies.
7167

7268
## 9. Scope
7369

@@ -81,7 +77,7 @@ michmoreau.l@gmail.com
8177

8278
## 11. License and attribution
8379

84-
The Citizen Code of Conduct is distributed by [Stumptown Syndicate](http://stumptownsyndicate.org) under a [Creative Commons Attribution-ShareAlike license](http://creativecommons.org/licenses/by-sa/3.0/).
80+
The Citizen Code of Conduct is distributed by [Stumptown Syndicate](http://stumptownsyndicate.org) under a [Creative Commons Attribution-ShareAlike license](http://creativecommons.org/licenses/by-sa/3.0/).
8581

8682
Portions of text derived from the [Django Code of Conduct](https://www.djangoproject.com/conduct/) and the [Geek Feminism Anti-Harassment Policy](http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy).
8783

README.md

+36-35
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
New demos in progress at:
2+
23
- Vanilla JavaScript Example: https://michelml.github.io/rdkit-js/examples/vanilla-javascript/
34
- React Example: https://michelml.github.io/rdkit-js/examples/react-example/build/
45
- React Redux Example: https://michelml.github.io/rdkit-js/examples/react-redux-example/build/
@@ -27,23 +28,23 @@ New demos in progress at:
2728

2829
## Table of contents
2930

30-
- [Introduction](#introduction)
31-
- [Install](#install)
32-
- [Using the RDKit package assets](#using-the-rdkit-package-assets)
33-
- [Option 1: Use the npm package distribution files](#option-1-use-the-npm-package-distribution-files)
34-
- [Option 2: Use the remote distribution files from unpkg.com](#option-2-use-the-remote-distribution-files-from-unpkgcom)
35-
- [Running RDKit in your JavaScript code](#running-rdkit-in-your-javascript-code)
36-
- [Usage](#usage)
37-
- [Live demos](#live-demos)
38-
- [Contributing](#contributing)
39-
- [Preparing a new release of the package](#preparing-a-new-release-of-the-package)
40-
- [Releasing a new beta version of the package](#releasing-a-new-beta-version-of-the-package)
31+
- [Introduction](#introduction)
32+
- [Install](#install)
33+
- [Using the RDKit package assets](#using-the-rdkit-package-assets)
34+
- [Option 1: Use the npm package distribution files](#option-1-use-the-npm-package-distribution-files)
35+
- [Option 2: Use the remote distribution files from unpkg.com](#option-2-use-the-remote-distribution-files-from-unpkgcom)
36+
- [Running RDKit in your JavaScript code](#running-rdkit-in-your-javascript-code)
37+
- [Usage](#usage)
38+
- [Live demos](#live-demos)
39+
- [Contributing](#contributing)
40+
- [Preparing a new release of the package](#preparing-a-new-release-of-the-package)
41+
- [Releasing a new beta version of the package](#releasing-a-new-beta-version-of-the-package)
4142

4243
## Introduction
4344

4445
**Note: This package should be considered experimental. The API is not yet stable and may change from release to release.**
4546

46-
The idea of this package is to allow the [RDKit](https://github.com/rdkit/rdkit) to be used from JavaScript so that we can add chemical capabilities to web applications.
47+
The idea of this package is to allow the [RDKit](https://github.com/rdkit/rdkit) to be used from JavaScript so that we can add chemical capabilities to web applications.
4748

4849
Rather than attempting a comprehensive wrapper (like the old [RDKitJS](https://github.com/rdkit/RDKitjs)), this exposes a small set of key functionality. I think the general approach, including this actual library, can be useful for other wrapper projects in the future.
4950

@@ -53,7 +54,7 @@ This initial set of functionality is not complete, but it is intended to already
5354

5455
```bash
5556
npm i @rdkit/rdkit
56-
```
57+
```
5758

5859
## Using the RDKit package assets
5960

@@ -77,28 +78,28 @@ To use RDKit, load the javascript file and instantiate the wasm module inside th
7778

7879
```html
7980
<head>
80-
<!-- ...other files and HTML tags... -->
81-
<!-- Load the RDKit JS file -->
82-
<script src="https://unpkg.com/@rdkit/rdkit/Code/MinimalLib/dist/RDKit_minimal.js"></script>
83-
84-
<!-- Instantiate the WASM module. The inline script below could live elsewhere inside your application code. -->
85-
<script>
86-
window.initRDKitModule()
87-
.then(function(RDKit) {
88-
console.log("RDKit version: " + RDKit.version());
89-
window.RDKit = RDKit;
90-
/**
91-
* The RDKit module is now loaded.
92-
* You can use it anywhere.
93-
*/
94-
})
95-
.catch(() => {
96-
// handle loading errors here...
97-
});
98-
</script>
99-
<!-- ...your application code goes here... -->
81+
<!-- ...other files and HTML tags... -->
82+
<!-- Load the RDKit JS file -->
83+
<script src="https://unpkg.com/@rdkit/rdkit/Code/MinimalLib/dist/RDKit_minimal.js"></script>
84+
85+
<!-- Instantiate the WASM module. The inline script below could live elsewhere inside your application code. -->
86+
<script>
87+
window
88+
.initRDKitModule()
89+
.then(function (RDKit) {
90+
console.log("RDKit version: " + RDKit.version());
91+
window.RDKit = RDKit;
92+
/**
93+
* The RDKit module is now loaded.
94+
* You can use it anywhere.
95+
*/
96+
})
97+
.catch(() => {
98+
// handle loading errors here...
99+
});
100+
</script>
101+
<!-- ...your application code goes here... -->
100102
</head>
101-
102103
```
103104

104105
## Usage
@@ -140,7 +141,7 @@ Once you have verified that the distribution files have been properly added in `
140141

141142
```bash
142143
npm publish --access public
143-
```
144+
```
144145

145146
#### Step 4: Set back the placeholder version in package.json
146147

examples/react-example/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# WORK IN PROGRESS
1+
# WORK IN PROGRESS

examples/react-example/public/index.html

+2-8
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
border-radius: 2px;
5252
display: block;
5353
}
54-
54+
5555
.back_to_top:hover {
5656
background: #e9ebec;
5757
}
@@ -73,13 +73,7 @@
7373
top: 0;
7474
box-shadow: 3px 0px 0 0 #f5f5f5;
7575
"
76-
class="
77-
menu
78-
has-background-white-bis
79-
is-narrow-mobile is-fullheight
80-
section
81-
is-hidden-mobile
82-
"
76+
class="menu has-background-white-bis is-narrow-mobile is-fullheight section is-hidden-mobile"
8377
id="side-navigation"
8478
></aside>
8579
<div class="container column is-10">

examples/react-example/src/components/MoleculeStructure/MoleculeStructure.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class MoleculeStructure extends Component {
2020
structure: PropTypes.string.isRequired,
2121
subStructure: PropTypes.string,
2222
extraDetails: PropTypes.object,
23-
drawingDelay: PropTypes.number,
23+
drawingDelay: PropTypes.number
2424
};
2525

2626
static defaultProps = {
@@ -30,7 +30,7 @@ class MoleculeStructure extends Component {
3030
height: 200,
3131
svgMode: false,
3232
extraDetails: {},
33-
drawingDelay: undefined,
33+
drawingDelay: undefined
3434
};
3535

3636
constructor(props) {
@@ -41,13 +41,13 @@ class MoleculeStructure extends Component {
4141
height: this.props.height,
4242
bondLineWidth: 1,
4343
addStereoAnnotation: true,
44-
...this.props.extraDetails,
44+
...this.props.extraDetails
4545
};
4646

4747
this.state = {
4848
svg: undefined,
4949
rdKitLoaded: false,
50-
rdKitError: false,
50+
rdKitError: false
5151
};
5252
}
5353

@@ -96,20 +96,20 @@ class MoleculeStructure extends Component {
9696
? subStructHighlightDetails.reduce(
9797
(acc, { atoms, bonds }) => ({
9898
atoms: [...acc.atoms, ...atoms],
99-
bonds: [...acc.bonds, ...bonds],
99+
bonds: [...acc.bonds, ...bonds]
100100
}),
101101
{ bonds: [], atoms: [] }
102102
)
103103
: subStructHighlightDetails;
104104
return JSON.stringify({
105105
...this.MOL_DETAILS,
106106
...(this.props.extraDetails || {}),
107-
...subStructHighlightDetailsMerged,
107+
...subStructHighlightDetailsMerged
108108
});
109109
} else {
110110
return JSON.stringify({
111111
...this.MOL_DETAILS,
112-
...(this.props.extraDetails || {}),
112+
...(this.props.extraDetails || {})
113113
});
114114
}
115115
}

examples/react-example/src/components/NavBar/NavBar.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { Component } from "react";
22

33
export default class NavBar extends Component {
44
state = {
5-
burgerActive: false,
5+
burgerActive: false
66
};
77
render() {
88
const brugerActiveClass = this.state.burgerActive ? " is-active" : "";

examples/react-example/src/components/SideNav/SideNav.js

+17-17
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { Component } from "react";
22

33
export default class SideNav extends Component {
44
state = {
5-
activeLink: "#component-introduction",
5+
activeLink: "#component-introduction"
66
};
77

88
componentDidMount() {
@@ -18,52 +18,52 @@ export default class SideNav extends Component {
1818
children: [
1919
{
2020
id: "#component-introduction",
21-
name: "Introduction",
21+
name: "Introduction"
2222
},
2323
{
2424
id: "#component-example-list",
25-
name: "Overview",
26-
},
27-
],
25+
name: "Overview"
26+
}
27+
]
2828
},
2929
{
3030
name: "Components",
3131
children: [
3232
{
3333
id: "#component-example-moleculestructure",
34-
name: "MoleculeStructure",
35-
},
36-
],
34+
name: "MoleculeStructure"
35+
}
36+
]
3737
},
3838
{
3939
name: "Examples",
4040
children: [
4141
{
4242
id: "#component-example-svg",
43-
name: "SVG Rendering",
43+
name: "SVG Rendering"
4444
},
4545
{
4646
id: "#component-example-canvas",
47-
name: "Canvas Rendering",
47+
name: "Canvas Rendering"
4848
},
4949
{
5050
id: "#component-example-substruct",
51-
name: "Substructure Highlighting",
51+
name: "Substructure Highlighting"
5252
},
5353
{
5454
id: "#component-example-multi-substruct",
55-
name: "Multi-Substructure Highlighting",
55+
name: "Multi-Substructure Highlighting"
5656
},
5757
{
5858
id: "#component-example-substruct-search",
59-
name: "Substructure Search",
59+
name: "Substructure Search"
6060
},
6161
{
6262
id: "#component-example-drawing-options",
63-
name: "Additional Options",
64-
},
65-
],
66-
},
63+
name: "Additional Options"
64+
}
65+
]
66+
}
6767
];
6868

6969
const renderedSections = sections.map((section) => (

examples/react-example/src/examples/ExampleDrawingOptions.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class ExampleDrawingOptions extends React.Component {
1818
highlightColour: "#fd5c63",
1919
legendColour: "#000000",
2020
symbolColour: "#000000",
21-
backgroundColour: "#ffffff",
21+
backgroundColour: "#ffffff"
2222
};
2323

2424
state = { ...ExampleDrawingOptions.initialState };
@@ -280,7 +280,7 @@ class ExampleDrawingOptions extends React.Component {
280280
width: width + 12,
281281
height: height + 12,
282282
border: "1px solid rgba(0,0,0,.1)",
283-
borderRadius: "2px",
283+
borderRadius: "2px"
284284
}}
285285
>
286286
<MoleculeStructure
@@ -298,7 +298,7 @@ class ExampleDrawingOptions extends React.Component {
298298
highlightColour,
299299
legendColour,
300300
backgroundColour,
301-
symbolColour,
301+
symbolColour
302302
}}
303303
/>
304304
</div>

examples/react-example/src/examples/ExampleSubstructureSearch.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class ExampleList extends React.Component {
77
state = {
88
matches: SMILES_LIST,
99
searchValue: "",
10-
searching: false,
10+
searching: false
1111
};
1212

1313
render() {

0 commit comments

Comments
 (0)