Skip to content

Commit

Permalink
Merge pull request #534 from ncats/editStructureSR2
Browse files Browse the repository at this point in the history
turning off experimental feature
  • Loading branch information
NikoAnderson authored Aug 13, 2024
2 parents 015dc17 + b63964e commit e74c059
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 10 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ dist: trusty

language: node_js
node_js:
- 14.17.0
- 17.9.1


install:
Expand All @@ -21,6 +21,9 @@ install:
- npm install webpack
- npm i --save webpack-sources --legacy-peer-deps
- npm install -f @types/[email protected]
- npm install -g yarn
- npm uninstall undici
- npm install [email protected]
- export NODE_OPTIONS="--max-old-space-size=8192"
script:
- npm run build:fda:prod
Expand Down
4 changes: 2 additions & 2 deletions package.dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"zone.js": "0.11.4",
"z-schema": "5.0.4",
"jexl": "2.3.0",
"xlsx": "^0.18.5"
"xlsx": "0.18.5"
},
"devDependencies": {
"@angular-devkit/build-angular": "13.2.1",
Expand All @@ -89,7 +89,7 @@
"@types/node": "17.0.16",
"@typescript-eslint/eslint-plugin": "5.11.0",
"@typescript-eslint/parser": "5.11.0",
"cheerio": "^1.0.0-rc.2",
"cheerio": "1.0.0-rc.2",
"codelyzer": "6.0.2",
"cpx-fixed": "1.6.0",
"eslint": "8.8.0",
Expand Down
4 changes: 2 additions & 2 deletions package.real.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"z-schema": "4.2.2",
"jexl": "2.3.0",
"ngx-schema-form": "2.7.0",
"xlsx": "^0.18.5"
"xlsx": "0.18.5"
},
"devDependencies": {
"@angular-devkit/build-angular": "13.2.1",
Expand All @@ -97,7 +97,7 @@
"@types/node": "17.0.16",
"@typescript-eslint/eslint-plugin": "5.11.0",
"@typescript-eslint/parser": "5.11.0",
"cheerio": "^1.0.0-rc.2",
"cheerio": "1.0.0-rc.2",
"codelyzer": "6.0.2",
"cpx-fixed": "1.6.0",
"eslint": "8.8.0",
Expand Down
4 changes: 4 additions & 0 deletions src/app/core/substance-form/links/link-form.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export class LinkFormComponent implements OnInit, OnDestroy {
}

getStructure() {
if (this.privateLink && this.privateLink.linkage){
this.smiles = this.vocabulary[this.privateLink.linkage];
if (this.smiles && this.smiles.fragmentStructure) {
this.structure = this.cvService.getStructureUrlFragment(this.smiles.fragmentStructure);
Expand All @@ -66,7 +67,10 @@ export class LinkFormComponent implements OnInit, OnDestroy {
}
// this.structure = this.cvService.getStructureUrlFragment(term.fragmentStructure);

} else {
this.structure = null;
}
}

ngOnDestroy() {
this.subscriptions.forEach(subscription => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
.feature-table {
display:block;
margin: auto;
width: 85%;
width: 95%;
}

.feature-expansion {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class SubstanceFormStructureCardComponent extends SubstanceFormBase imple
structureErrorsArray: Array<StructureDuplicationMessage>;
subscriptions: Array<Subscription> = [];
privateFeatures: any;
enableStructureFeatures = true;
enableStructureFeatures = false;
sortedFeatures = new MatTableDataSource();
displayedColumns = ['key', 'value'];
featuresOnly = false;
Expand All @@ -66,6 +66,9 @@ export class SubstanceFormStructureCardComponent extends SubstanceFormBase imple
}

ngOnInit() {
if (this.configService.configData && this.configService.configData.enableStructureFeatures) {
this.enableStructureFeatures = this.configService.configData.enableStructureFeatures;
}
if(this.activatedRoute.snapshot.routeConfig.path === 'structure-features') {
this.featuresOnly = true;
}
Expand Down
6 changes: 3 additions & 3 deletions src/app/core/substance-form/substance-form.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1423,7 +1423,7 @@ export class SubstanceFormService implements OnDestroy {
&& this.privateSubstance.protein.disulfideLinks.length > 0) {
for (let i = this.privateSubstance.protein.disulfideLinks.length; i >= 0; i--) {
if (this.privateSubstance.protein.disulfideLinks[i].sitesShorthand) {
delete this.privateSubstance.protein.disulfideLinks[i].sitesShorthand;
// delete this.privateSubstance.protein.disulfideLinks[i].sitesShorthand;
}
if (this.privateSubstance.protein.disulfideLinks[i] && this.privateSubstance.protein.disulfideLinks[i].sites &&
this.privateSubstance.protein.disulfideLinks[i].sites[0] && this.privateSubstance.protein.disulfideLinks[i].sites[1] &&
Expand All @@ -1437,14 +1437,14 @@ export class SubstanceFormService implements OnDestroy {
if (this.privateSubstance.nucleicAcid.linkages && this.privateSubstance.nucleicAcid.linkages.length > 0) {
for (let i = this.privateSubstance.nucleicAcid.linkages.length; i >= 0; i--) {
if (this.privateSubstance.nucleicAcid.linkages[i].sitesShorthand) {
delete this.privateSubstance.nucleicAcid.linkages[i].sitesShorthand;
// delete this.privateSubstance.nucleicAcid.linkages[i].sitesShorthand;
}
}
}
if (this.privateSubstance.nucleicAcid.sugars && this.privateSubstance.nucleicAcid.sugars.length > 0) {
for (let i = this.privateSubstance.nucleicAcid.sugars.length; i >= 0; i--) {
if (this.privateSubstance.nucleicAcid.sugars[i].sitesShorthand) {
delete this.privateSubstance.nucleicAcid.sugars[i].sitesShorthand;
// delete this.privateSubstance.nucleicAcid.sugars[i].sitesShorthand;
}
}
}
Expand Down

0 comments on commit e74c059

Please sign in to comment.