RDKit minimal lib (JavaScript Lib) next steps & more #4124
Replies: 10 comments 35 replies
-
@greglandrum should I open specific issues for this or it should start here as a discussion like this? Let me know what's best, have a good day! |
Beta Was this translation helpful? Give feedback.
-
I agree that having a separate repo for doing builds/distributions of the MinimalLib JS wrappers makes sense. That's the same model that we were using with the rdkit conda builds. It might be worth adding a build of the JS wrappers to the main repo CI setup, but that would only be to make sure that code changes don't break them (like the rest of the CI builds). So that's sticking with the model that the main repo is really only doing CI, not CD. I've already created a repo for doing CI/CD builds of the RDKit CFFI wrappers (also done on top of MinimalLib) here: https://github.com/greglandrum/rdkit-minimallib-build. I haven't set that up in the RDKit org yet because I wanted to try it out first, but I'll be transferring it in the near future. It needs to be reorganized a bit first - the current setup is more or less completely focused on getting the CI/CD stuff working, but the repo could also theoretically includes space for examples of things like using the CFFI wrappers in other languages. So, yeah, I think it'd be great to have a repo which we can use for CI/CD around the JS wrappers and which includes examples and documentation. I'd be happy to coordinate with you on that if you want to set something up and transfer it into the RDKit org. @eloyfelix has also set up something similar to handle CI/CD of Julia wrappers around the CFFI code, so he may also be interested in thinking about this topic. |
Beta Was this translation helpful? Give feedback.
-
Hi. Looks like we're giving you a lot of work related to the MinimalLib @greglandrum! I think that we should approach it in a way that the users of each programming language find what they expect to find. In my case with Julia I tried to do everything the "Julian" way and this implied sending a PR with a recipe to build RDKit (RDKit_jll) to their repository of recipies + setting a different repo with the wrappers to that library. I also tried to use the tools I saw the most pouplar repos are using (Documenter.jl, Test.jl, Codecov, GitHub Actions for CI...). For the examples I set a jupyter notebook using binder because I think that it works well for this kind of minimal examples. The good thing about this approach (which is possibly the only one!) is that if someone, for example, decides to build their own cheminformatics package using the MinimalLib only to parse the molecules (as you suggested in your post) they will have enough installing RDKit_jll. I understand that this might work completely different in the JS case. In any case, I agree that having a different repo for it is what makes more sense. For the versioning my plan was to stick to anything appearing in Releases keepeing the same exact RDKit released version so every time there is an RDKit release I can send a PR to the recipe repository to update it with the latest archive (e.g. https://github.com/rdkit/rdkit/archive/refs/tags/Release_2021_03_1.tar.gz). I'm currently using Git as a source because there is no public release with the CFFI yet. Regarding the organization I'm happy to move the wrappers to any organisation it can make the package look better. RDKit seems the most natural one. Finally, I'm also happy to change the license of the wrappers package. I don't think should be any issue with MIT (I think that both are almost identical) but I could change it to RDKit's BSD-3 if preferred. |
Beta Was this translation helpful? Give feedback.
-
Hi @greglandrum , To continue on #4124 (comment) . I have started a small repo https://github.com/MichelML/rdkit-js to explore how we could organize this (and it builds the same way as the current npm build in the main rdkit project (see beta version built from the new repo here. The way I see how we could organise things is this:
I have two good reasons and one bad reason to do it this way: The first good reason is that people coming from the JavaScript world will be more comfortable contributing to a repository looking like a regular npm package/project, without the artifacts related to the C++/WASM build. The second good reason is I think it makes sense to keep what is closely knitted to the main RDKit project, at pre-build time, inside the main project itself. As a start, the new rdkit-js repository would only be responsible to handle 1) the npm build and release with git tags -- still following the main rdkit releases while being able to release multiple versions for the same rdkit release as new examples come along, 2) good documentation for JS usage, and 3) examples on how to integrate rdkit-js in modern web application and frameworks (see issues https://github.com/MichelML/rdkit-js/issues ). The bad reason is I am a beginner at C++ (currently learning it in my spare time), and this vision reflects my reticence to move everything related to the minimallib under a new repository. Let me know if you have other ideas. If you agree with the seperation of concerns, here would be my next moves:
Looking forward to hearing your thoughts 👍 |
Beta Was this translation helpful? Give feedback.
-
@greglandrum @DavidACosgrove anyway we can do multi-color, multi-substruct highlighting with rdkit minimallib for javascript at the moment? It seems we can't but I might miss something Also, have you ever tried to do client-side similarity search with the minimal lib (not just substructure search)? |
Beta Was this translation helpful? Give feedback.
-
@greglandrum Just an update that this is still in progress https://michelml.github.io/rdkit-js/examples/react-example/build/ I think I'm mostly done with example for the React example besides improving the documentation along side the examples. If you check out the additional options example, i think it's pretty cool :D Will post further progress soon |
Beta Was this translation helpful? Give feedback.
-
New progress: A V1 of your (restyled) initial vanilla JS getting started is available here @greglandrum https://michelml.github.io/rdkit-js/examples/vanilla-javascript/ A V1 of React example is available here https://michelml.github.io/rdkit-js/examples/react-example/build/ A V1 of React-Redux is available here https://michelml.github.io/rdkit-js/examples/react-redux-example/build/ My goal from there is to consolidate the above efforts plus address issues related to packaging utilities with the vanilla RDKit.js in the npm package (see issues here https://github.com/MichelML/rdkit-js/issues ) Hopefully, after that and a revision of the whole README, the repository will be transferable to the RDKit GitHub org for better visibility Thoughts welcome! |
Beta Was this translation helpful? Give feedback.
-
Small update, still working on the v1, it has fallen low in my priorities but will get back to it very soon |
Beta Was this translation helpful? Give feedback.
-
Still in progress, and sorry for the long delays, it is still my intention to finish a v1 of a dedicated repository for rdkit-js will get back to this https://github.com/MichelML/rdkit-js soon enough |
Beta Was this translation helpful? Give feedback.
-
Hi there @greglandrum @ptosco (sorry for the long message) ! I think I now feel comfortable enough with the state of https://github.com/MichelML/rdkit-js to consider transferring it to the rdkit github organization 🎉 Obviously, it also depends on your vision and approval, so here are my suggestions and discussion points for next steps:
current state
suggested change
Or something like that. It's not a hard request, I don't mind not adding Valence, but that would be nice 👍 .
Waiting for your thoughts on next steps here. I'll be in vacation and unreachable next week, but looking forward to hearing from you both! |
Beta Was this translation helpful? Give feedback.
-
Hi @greglandrum , in the spirit of improving on #4086 , here are some next steps I've been meditating on to improve JS usage and stronger presence in the RDKit ecosystem (and more).
Is your feature request related to a problem? Please describe.
RDKit minimal lib (JS Lib) build could be moved from the main repo for separate releases - to gradually improve and modernize usage and examples, while always remaining bound to an RDKit release (think of having versions of the rdkit minimallib js on npm looking like
2021.3.1-release1
2021.3.1-release2
etc). Modernizing usage and examples could mean:Describe the solution you'd like
Describe alternatives you've considered
Keeping everything in main repository.?
Additional context
None.
All thoughts welcome 🙏
Beta Was this translation helpful? Give feedback.
All reactions