Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partial implementation: replace MultiMap in MoleculeRGroupsComposition class - Part 2, remove MultiMap completely #921

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
1dea10a
Issue #521: core: replace MultiMap with standard library container
Dec 5, 2022
7fc95c0
Issue #521: core: replace MultiMap with standard library container
Dec 5, 2022
14bebea
#934: ci: update IronPython to 3.4.0 and .NET to 6.0
mkviatkovskii Dec 15, 2022
3a39fe8
#929: fix .NET tests, add more diagnostics to Bingo tests failures
mkviatkovskii Dec 16, 2022
65d7654
#929: fix .NET tests, fix Bingo tests that require importing targets …
mkviatkovskii Dec 16, 2022
ae09603
#929: fix Bingo tests import quoting
mkviatkovskii Dec 16, 2022
6a60e19
#929: ci: fix IronPython version on Win64
mkviatkovskii Dec 16, 2022
e6aae9b
#929: fix auto-saving to CTAB v3000 (#931)
mkviatkovskii Dec 16, 2022
6b647e4
Feature/885 cdx support (#936)
even1024 Dec 16, 2022
acbf8c2
#929: ci: fix Bingo build
mkviatkovskii Dec 16, 2022
e301024
Structures with the arrow lose their integrity when pressing 'Layout'…
even1024 Dec 19, 2022
d5f5584
#934: api: tests: IronPython update to 3.4.0, fix API and Bingo tests…
mkviatkovskii Dec 21, 2022
b241f7e
Backmerge: Add support of R-groups to the CDX loader #36 (#951)
even1024 Dec 23, 2022
cc1d6c3
Backmerge: CDX import: Reaction arrows disappear when opening a file …
even1024 Dec 23, 2022
a15417c
Backmerge: Bugfix/950 cdx aromatized structures (#954)
even1024 Dec 26, 2022
5b9c8ea
mem leak (#967) (#976)
even1024 Jan 10, 2023
d46c595
Incorrect display of utf8 text in standalone #889 (#947)
IvanMinin Jan 11, 2023
9621c5d
Back merge: Error opening MOL and RXN files with RBC/SUB/UNC queries …
even1024 Jan 13, 2023
eb85410
docker-indigo-tester image build failed #987
IvanMinin Jan 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .ci/docker/indigo-tester/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ FROM debian:stable-slim

ARG JDK_VERSION_MAJOR=8u342
ARG JDK_VERSION_MINOR=b07
ARG MAVEN_VERSION=3.8.6
ARG MAVEN_VERSION=3.8.7
ARG JYTHON_VERSION=2.7.2
ARG DOTNET_VERSION=6.0
ARG IRONPYTHON_VERSION=3.4.0-beta1
ARG IRONPYTHON_VERSION=3.4.0

RUN set -eux && \
apt update && \
Expand Down
6 changes: 3 additions & 3 deletions .ci/version.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
1.9.0
dev
0
rc
1

61934d47141baa775cf6b3f9e02f8ad132b3c364ad613e4c4df45497e2278cbd
db544139e56560177275ed6d7e8525f955e4949d53bbae0a47d13c807e1374f5
26 changes: 9 additions & 17 deletions .github/workflows/indigo-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -515,28 +515,20 @@ jobs:
mkdir IronPython
mkdir tmp
cd IronPython
curl -OL https://github.com/IronLanguages/ironpython2/releases/download/ipy-2.7.12/IronPython.2.7.12.zip
curl -OL https://github.com/IronLanguages/ironpython3/releases/download/v3.4.0/IronPython.3.4.0.zip
- name: Prepare UNIX
if: ${{ matrix.os != 'windows' }}
run: |
cd IronPython
unzip IronPython.2.7.12.zip
unzip IronPython.3.4.0.zip
cd ../tmp
unzip ../dist/Indigo.Net.*.nupkg
chmod -R a+rw .
- name: Prepare macOS
if: ${{ matrix.os == 'macos' }}
run: |
brew install mono-libgdiplus
- name: Prepare Linux
if: ${{ matrix.os == 'ubuntu' }}
run: |
sudo apt install -y libgdiplus
- name: Prepare Windows
if: ${{ matrix.os == 'windows' }}
run: |
cd IronPython
Expand-Archive IronPython.2.7.12.zip .
Expand-Archive IronPython.3.4.0.zip .
cd ../tmp
Expand-Archive ../dist/Indigo.Net.*.nupkg .
- name: Test Linux
Expand All @@ -545,20 +537,20 @@ jobs:
INDIGO_PATH: ${{ github.workspace }}/tmp/lib/netstandard2.0/Indigo.Net.dll
LD_LIBRARY_PATH: ${{ github.workspace }}/tmp/runtimes/linux-x64/native
run: |
dotnet IronPython/netcoreapp3.1/ipy.dll -X:ExceptionDetail api/tests/integration/test.py -t 1 -j junit_report.xml
dotnet IronPython/net6.0/ipy.dll api/tests/integration/test.py -t 1 -j junit_report.xml
- name: Test macOS
if: ${{ matrix.os == 'macos' }}
env:
INDIGO_PATH: ${{ github.workspace }}/tmp/lib/netstandard2.0/Indigo.Net.dll
run: |
export DYLD_LIBRARY_PATH=${PWD}/tmp/runtimes/osx-x64/native
dotnet IronPython/netcoreapp3.1/ipy.dll -X:ExceptionDetail api/tests/integration/test.py -t 1 -j junit_report.xml -platform mac
dotnet IronPython/net6.0/ipy.dll api/tests/integration/test.py -t 1 -j junit_report.xml
- name: Test Windows
if: ${{ matrix.os == 'windows' }}
env:
INDIGO_PATH: ${{ github.workspace }}/tmp/lib/netstandard2.0/Indigo.Net.dll
PATH: ${{ env.PATH }};${{ github.workspace }}/tmp/runtimes/win-x64/native
run: ./IronPython/net45/ipy.exe -X:ExceptionDetail api/tests/integration/test.py -t 1 -j junit_report.xml -platform ironwin
run: ./IronPython/net462/ipy.exe api/tests/integration/test.py -t 1 -j junit_report.xml
- name: Publish Test Report
if: always()
uses: mikepenz/action-junit-report@v1
Expand Down Expand Up @@ -595,20 +587,20 @@ jobs:
mkdir IronPython
mkdir tmp
cd IronPython
curl -OL https://github.com/IronLanguages/ironpython2/releases/download/ipy-2.7.12/IronPython.2.7.12.zip
curl -OL https://github.com/IronLanguages/ironpython3/releases/download/v3.4.0/IronPython.3.4.0.zip
- name: Prepare Windows
if: ${{ matrix.os == 'windows' }}
run: |
cd IronPython
Expand-Archive IronPython.2.7.12.zip .
Expand-Archive IronPython.3.4.0.zip .
cd ../tmp
Expand-Archive ../dist/Indigo.Net.*.nupkg .
- name: Test Windows
if: ${{ matrix.os == 'windows' }}
env:
INDIGO_PATH: ${{ github.workspace }}/tmp/lib/netstandard2.0/Indigo.Net.dll
PATH: ${{ env.PATH }};${{ github.workspace }}/tmp/runtimes/win-x86/native
run: ./IronPython/net45/ipy32.exe -X:ExceptionDetail api/tests/integration/test.py -t 1 -p basic/basic.py -j junit_report.xml -platform ironwin
run: ./IronPython/net462/ipy32.exe api/tests/integration/test.py -t 1 -p basic/basic.py -j junit_report.xml
- name: Publish Test Report
if: always()
uses: mikepenz/action-junit-report@v1
Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ option(WITH_STATIC "Build Indigo static library as well as shared" OFF)

# Indigo API options
option(BUILD_INDIGO "Build indigo shared library" ON)
option(USE_FONT_MANAGER "Build indigo render with font_face_manager" OFF)

# Indigo API Wrappers options
option(BUILD_INDIGO_WRAPPERS "Build all existing Indigo API wrappers" ON)
Expand Down Expand Up @@ -82,6 +83,7 @@ if (EMSCRIPTEN)
set(BUILD_BINGO_SQLSERVER OFF)
set(BUILD_BINGO_ORACLE OFF)
set(BUILD_BINGO_ELASTIC OFF)
set(USE_FONT_MANAGER ON)
endif()

if (BUILD_INDIGO OR BUILD_INDIGO_UTILS OR BUILD_BINGO_SQLSERVER OR BUILD_BINGO_ORACLE OR BUILD_BINGO_POSTGRES OR EMSCRIPTEN)
Expand Down
6 changes: 6 additions & 0 deletions api/c/indigo/indigo.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,13 @@ CEXPORT const char* indigoCml(int object);

// accepts molecules and reactions
CEXPORT int indigoSaveCdxml(int object, int output);
CEXPORT int indigoSaveCdx(int item, int output);

CEXPORT const char* indigoCdxml(int item);

CEXPORT int indigoSaveCdxmlToFile(int object, const char* filename);
CEXPORT int indigoSaveCdxToFile(int item, const char* filename);

CEXPORT const char* indigoCdxml(int object);

// the output must be a file or a buffer, but not a string
Expand Down
1 change: 1 addition & 0 deletions api/c/indigo/src/indigo_layout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ CEXPORT int indigoLayout(int object)
bool no_layout = rxn.catalystCount() || rxn.intermediateCount() || rxn.specialConditionsCount() || rxn.meta().getNonChemicalMetaCount();
if (!no_layout)
{
rxn.meta().resetMetaData();
ReactionLayout rl(rxn, self.smart_layout);
rl.max_iterations = self.layout_max_iterations;
rl.layout_orientation = (layout_orientation_value)self.layout_orientation;
Expand Down
14 changes: 14 additions & 0 deletions api/c/indigo/src/indigo_macros.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,20 @@ CEXPORT int indigoSaveCdxmlToFile(int item, const char* filename)
return res;
}

CEXPORT int indigoSaveCdxToFile(int item, const char* filename)
{
int f = indigoWriteFile(filename);
int res;

if (f == -1)
return -1;

res = indigoSaveCdx(item, f);

indigoFree(f);
return res;
}

CEXPORT const char* indigoCdxml(int item)
{
int b = indigoWriteBuffer();
Expand Down
44 changes: 44 additions & 0 deletions api/c/indigo/src/indigo_savers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -735,3 +735,47 @@ CEXPORT int indigoSaveCdxml(int item, int output)
}
INDIGO_END(-1);
}

CEXPORT int indigoSaveCdx(int item, int output)
{
INDIGO_BEGIN
{
IndigoObject& obj = self.getObject(item);
Output& out = IndigoOutput::get(self.getObject(output));

if (IndigoBaseMolecule::is(obj))
{
MoleculeCdxmlSaver saver(out, true);
if (obj.type == IndigoObject::MOLECULE)
{
Molecule& mol = obj.getMolecule();
saver.saveMolecule(mol);
}
else if (obj.type == IndigoObject::QUERY_MOLECULE)
{
QueryMolecule& mol = obj.getQueryMolecule();
saver.saveMolecule(mol);
}
out.flush();
return 1;
}
if (IndigoBaseReaction::is(obj))
{
ReactionCdxmlSaver saver(out, true);
if (obj.type == IndigoObject::REACTION)
{
Reaction& rxn = obj.getReaction();
saver.saveReaction(rxn);
}
else if (obj.type == IndigoObject::QUERY_REACTION)
{
QueryReaction& rxn = obj.getQueryReaction();
saver.saveReaction(rxn);
}
out.flush();
return 1;
}
throw IndigoError("indigoSaveCdxml(): expected molecule or reaction, got %s", obj.debugInfo());
}
INDIGO_END(-1);
}
2 changes: 1 addition & 1 deletion api/dotnet/src/Indigo.Net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<Version>1.9.0-dev.0</Version>
<Version>1.9.0-rc.1</Version>
<Authors>EPAM Systems Life Science Department</Authors>
<Company>EPAM Systems</Company>
<Description>Universal cheminformatics toolkit</Description>
Expand Down
4 changes: 2 additions & 2 deletions api/dotnet/src/Indigo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -301,13 +301,13 @@ public void setOption(string name, int value)
public void setOption(string name, float valuer, float valueg, float valueb)
{
setSessionID();
checkResult(IndigoLib.indigoSetOptionColor(name, valuer / 255.0f, valueg / 255.0f, valueb / 255.0f));
checkResult(IndigoLib.indigoSetOptionColor(name, valuer, valueg, valueb));
}

public void setOption(string name, double valuer, double valueg, double valueb)
{
setSessionID();
checkResult(IndigoLib.indigoSetOptionColor(name, (float) valuer / 255.0f, (float) valueg / 255.0f, (float) valueb / 255.0f));
checkResult(IndigoLib.indigoSetOptionColor(name, (float) valuer, (float) valueg, (float) valueb));
}

public void setOption(string name, Color value)
Expand Down
2 changes: 1 addition & 1 deletion api/http/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
anyio==3.3.4
asgiref==3.4.1
click==8.0.3
epam.indigo==1.9.0.dev0
epam.indigo==1.9.0.rc1
fastapi==0.70.0
h11==0.12.0
idna==3.3
Expand Down
2 changes: 1 addition & 1 deletion api/http/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

setup_kwargs = {
"name": "indigo-service",
"version": "1.9.0.dev0",
"version": "1.9.0.rc1",
"description": "",
"long_description": None,
"author": "Ruslan Khyurri",
Expand Down
5 changes: 2 additions & 3 deletions api/indigo-version.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
set(INDIGO_DEFAULT_VERSION "1.9.0-dev.0")
set(INDIGO_MAX_REVISION 500)

set(INDIGO_DEFAULT_VERSION "1.9.0-rc.1")
set(INDIGO_MAX_REVISION 1000)
find_package(Git)
if(GIT_EXECUTABLE)
EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} describe --long --tags --match indigo-*
Expand Down
16 changes: 8 additions & 8 deletions api/java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>${maven.compiler.source}</maven.compiler.target>
<revision>1.9.0-dev.0</revision>
<revision>1.9.0-rc.1</revision>
</properties>

<licenses>
Expand Down Expand Up @@ -52,7 +52,7 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.7.1</version>
<version>5.9.1</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand All @@ -73,7 +73,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.1.0</version>
<version>1.3.0</version>
<configuration>
<updatePomFile>true</updatePomFile>
<flattenMode>resolveCiFriendliesOnly</flattenMode>
Expand All @@ -98,7 +98,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.10.1</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
Expand All @@ -107,7 +107,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.0</version>
<version>3.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -121,7 +121,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<version>3.4.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand All @@ -135,7 +135,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<version>3.3.0</version>
<configuration>
<archive>
<addMavenDescriptor>true</addMavenDescriptor>
Expand Down Expand Up @@ -175,7 +175,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<version>3.0.1</version>
<configuration>
<passphrase>${gpg.passhprase}</passphrase>
<gpgArguments>
Expand Down
2 changes: 1 addition & 1 deletion api/python/indigo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
from .indigo.indigo_exception import IndigoException # noqa
from .indigo.indigo_object import IndigoObject # noqa

__version__ = "1.9.0.dev0"
__version__ = "1.9.0.rc1"
2 changes: 1 addition & 1 deletion api/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@

setup(
name="epam.indigo",
version="1.9.0.dev0",
version="1.9.0.rc1",
description="Indigo universal cheminformatics toolkit",
author="EPAM Systems Life Science Department",
author_email="[email protected]",
Expand Down
2 changes: 1 addition & 1 deletion api/r/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: rindigo
Version: 1.9.0-dev.0
Version: 1.9.0-rc.1
Date: 2020-12-10
Title: R Package for Indigo Toolkit
Authors@R: c(person(given = "Mikhail", family = "Kviatkovskii", role = c("cre"),
Expand Down
2 changes: 1 addition & 1 deletion api/tests/integration/common/env_indigo.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def rmdir(path):
jars.insert(0, jar_path)
else:
jars.append(jar_path)
for jar in jars:
for jar in sorted(jars):
sys.path.append(jar)
from com.epam.indigo import (
Bingo,
Expand Down
Loading