Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/epam/ketcher into #1640-a…
Browse files Browse the repository at this point in the history
…dd-cdx-support
  • Loading branch information
Nitvex committed Dec 16, 2022
2 parents e529372 + c5d9ba0 commit 21a4e88
Show file tree
Hide file tree
Showing 238 changed files with 24,548 additions and 1,044 deletions.
11 changes: 5 additions & 6 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: Alena-Guznischeva
labels: bug, feature request
assignees: Nitvex

---

Expand All @@ -12,13 +12,12 @@ assignees: Alena-Guznischeva
2. Click on '....'
3. Scroll down to '....'

**Actual behavior**
A clear and concise description of what the bug is.

**Expected behavior**
A clear and concise description of what you expected to happen.

**Actual behavior**
A clear and concise description of what the bug is.

**Screenshots**
If applicable, add screenshots to help explain your problem.

Expand All @@ -33,7 +32,7 @@ If applicable, add screenshots to help explain your problem.
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Ketcher version** [e.g. v2.4.2-115-gcf0c1394].
**Ketcher version** [e.g. v2.4.2].
To determine it, hover over the header of the Ketcher tab in a browser.

**Additional context**
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Feature request
about: Suggest an idea for this project
title: ''
labels: feature request
assignees: AndreiMazol
assignees: Nitvex

---

Expand Down
6 changes: 3 additions & 3 deletions .husky/pre-commit
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn precommit
yarn run precommit
6 changes: 3 additions & 3 deletions .husky/pre-push
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn prepush
yarn run prepush
1 change: 1 addition & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
build
dist
docs
style
17 changes: 10 additions & 7 deletions DEVNOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,26 +49,29 @@ The latest version of Ketcher is based on yarn workspaces. So before starting de
yarn install
```

After that component library and application should be started separately.
After that component library and application should be started separately. First should be started ketcher-core package.

#### Build kecther-react package
#### Build ketcher-core package

```sh
cd packages/ketcher-react
cd packages/ketcher-core
yarn install
yarn start
```

#### Build ketcher-standalone package
#### Build ketcher-react package

```sh
cd packages/ketcher-standalone
cd packages/ketcher-react
yarn install
yarn start
```

#### Build ketcher-core package
#### Build ketcher-standalone package

```sh
cd packages/ketcher-core
cd packages/ketcher-standalone
yarn install
yarn start
```

Expand Down
Binary file added documentation/wiki/line form.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added documentation/wiki/miltibar snake.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
63 changes: 63 additions & 0 deletions documentation/wiki/pages/long polymer chains.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# [Display long chain polymers] As Ketcher User I want to see the long polymer chains on the canvas

| As | I want | so that |
| :-------------------------- | :----------------------------- | :----------------------------------------------------------- |
| Ketcher peptide editor user | to see the long polymer chains | I can see as much individual monomers with letter level detailisation as possible in readable format |

#### 1. Context

Glossary: [Peptide Glossary](https://github.com/epam/ketcher/wiki/Polymer-Glossary)

Users might want to work with relatively large >1k sequences on the canvas. This an be RNA, Peptide type polymers or combination of both. The polymers can have complex structures. Cycles Loops, Branches are suitable. We are discussing here only linear cases.

​ This might be needed due to:

- Formal requirement to present a detailed polymer structure by a regulatory authorities, scientific journals
- Need to mark and display differences between similar sequences
- Using in educational purposes

In order to do so our approach is to:

- fit a rectangle each individual polymer
- Present individual monomers in 'snake' form
- Aspect ratio of individual rectangles should be adjustable by the user
- individual monomers in snake from will be depicted in group of 10 monomers in a row
- Individual monomers would be numbered at the beginning of each ten and row

**If user is drawing on canvas we do not apply a snake fit, so that a rectangle**

#### 3. Assumptions

| **ID** | **Assumption** |
| ------ | ------------------------------------------------------------ |
| 1 | Ketcher Polymer Editor users are interested in display as much individual monomers with letter level details as possible |
| 2 | We are focusing on display only in linear cases, representation of Cycles Loops, Branches will be defined later |
| 3 | Ketcher visualizations will be used for later annotation and editing by end-users in third-party software |

#### 4. Additional information (optional)

Zoom ratio is 100%

Manual placing of individual monomer feature might be implemented.

Decision on whether the polymer will be visible or not is made by the system based on canvas size.

line form: ![Line form](https://github.com/epam/ketcher/blob/master/documentation/wiki/line%20form.png)

single bar snake form: ![multibar snake](https://github.com/epam/ketcher/blob/master/documentation/wiki/single%20bar%20snake.png)

Multiple bar snake form: ![single bar snake](https://github.com/epam/ketcher/blob/master/documentation/wiki/miltibar%20snake.png)



#### 8. Acceptance Criteria



| **#** | **User Group** | **GIVEN** | **WHEN** | **THEN** |
| ----- | --------------------------- | ------------------------------------------------------------ | ----------------------------------------- | ------------------------------------------------- |
| All | Ketcher polymer editor User | Polymer editor mode of the Ketcher enabled<br />A compatible file with linear polymer is available<br />Canvas is empty | opening the file or <br />adding sequence | Polymer is visible in monomer level detail |
| 1 | | The polymer size allow it to fit into the canvas into a single line with detailed visibility<br /> | | Polymer is shown in line form |
| 2 | | The polymer size doesn't allow it to fit into the canvas into a single line <br /> | | Polymer is shown in snake form |
| 3 | | The polymer size allows it to be visible in single bar snake form <br /> | | The polymer is shown in a single bar snake form |
| 4 | | The polymer size doesn't allow it to be visible in single bar snake form <br /> | | The polymer is shown in a multiple bar snake form |
Binary file added documentation/wiki/single bar snake.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ This example was bootstrapped with [Create React App](https://github.com/faceboo

It is linked to the @ketcher/react package in the parent directory for development purposes.

You can run `yarn install` and then `yarn start` to test your package.
To run application for development purposes, please check instructions:
[DEVNOTES.md](https://github.com/epam/ketcher/blob/master/DEVNOTES.md)
8 changes: 5 additions & 3 deletions example/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ const webpack = require('webpack')
const HtmlReplaceWebpackPlugin = require('html-replace-webpack-plugin')
const GitRevisionPlugin = require('git-revision-webpack-plugin')

const gitRevisionPlugin = new GitRevisionPlugin({ lightweightTags: true })
const gitRevisionPlugin = new GitRevisionPlugin()
const applicationVersion = gitRevisionPlugin.version().split('-')[0]

module.exports = override(
addBundleVisualizer({}, true),
Expand All @@ -22,14 +23,15 @@ module.exports = override(
new webpack.EnvironmentPlugin({
MODE: process.env.MODE,
API_PATH: process.env.REACT_APP_API_PATH,
ENABLE_POLYMER_EDITOR: !!process.env.ENABLE_POLYMER_EDITOR
ENABLE_POLYMER_EDITOR: !!process.env.ENABLE_POLYMER_EDITOR,
KETCHER_ENABLE_REDUX_LOGGER: JSON.stringify(false)
})
),
addWebpackPlugin(
new HtmlReplaceWebpackPlugin([
{
pattern: '@@version',
replacement: gitRevisionPlugin.version()
replacement: applicationVersion
}
])
)
Expand Down
12 changes: 6 additions & 6 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
"version": "1.0.0",
"private": true,
"scripts": {
"start:standalone": "cross-env MODE=standalone ENABLE_POLYMER_EDITOR=true react-app-rewired start",
"start:remote": "cross-env MODE=remote ENABLE_POLYMER_EDITOR=true react-app-rewired start",
"start:standalone": "cross-env MODE=standalone ENABLE_POLYMER_EDITOR=false react-app-rewired start",
"start:remote": "cross-env MODE=remote ENABLE_POLYMER_EDITOR=false react-app-rewired start",
"clean:build": "shx rm -rf build",
"delete:dist": "shx rm -rf dist/$MODE",
"init:dist": "shx mkdir -p dist/$MODE",
"copy:build": "shx cp -r build/. dist/$MODE",
"prebuild": "run-s delete:dist init:dist",
"postbuild": "run-s copy:build clean:build",
"build:remote": "cross-env MODE=remote ENABLE_POLYMER_EDITOR=true run-s prebuild build:react postbuild",
"build:standalone": "cross-env MODE=standalone ENABLE_POLYMER_EDITOR=true run-s prebuild build:react postbuild",
"build:remote": "cross-env MODE=remote ENABLE_POLYMER_EDITOR=false run-s prebuild build:react postbuild",
"build:standalone": "cross-env MODE=standalone ENABLE_POLYMER_EDITOR=false run-s prebuild build:react postbuild",
"build:react": "react-app-rewired build",
"build:react:analyze": "react-app-rewired build --analyze",
"build": "run-s build:standalone build:remote",
"build:standalone:analyze": "cross-env MODE=standalone ENABLE_POLYMER_EDITOR=true run-s prebuild build:react:analyze postbuild",
"build:remote:analyze": "cross-env MODE=remote ENABLE_POLYMER_EDITOR=true run-s prebuild build:react:analyze postbuild",
"build:standalone:analyze": "cross-env MODE=standalone ENABLE_POLYMER_EDITOR=false run-s prebuild build:react:analyze postbuild",
"build:remote:analyze": "cross-env MODE=remote ENABLE_POLYMER_EDITOR=false run-s prebuild build:react:analyze postbuild",
"test": "run-s test:prettier test:stylelint test:eslint test:unit",
"test:eslint": "eslint . --ext .ts,.js,.jsx,.tsx",
"test:unit": "react-app-rewired test --passWithNoTests",
Expand Down
Loading

0 comments on commit 21a4e88

Please sign in to comment.