-
Notifications
You must be signed in to change notification settings - Fork 30
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
Installation from pip #23
Comments
Wanted to post a follow-up to this. What is the gap preventing this from getting put on PyPI? Is it knowledge? Would you be open to a PR adding that? |
Dear @kr-hansen and others, I will have time to work on the project towards the end of May for a couple of weeks. Getting it to be redistributable using pip is one of the things I want to look into. The main issues are mostly time and getting it to build for different platforms (anylinux, macos, windows). |
Sounds good. As an FYI, I was able to get it pip installed using the following commands. I imagine the hardest part will be working out the OGDF installation.
After doing that, I'm able to import tmap and use it out of the box. This is all on Linux, but I imagine it should be pretty portable once the OGDF portion is worked out. |
I was working on getting the OGDF itself to Conda (see here), but I guess if one can get the packaging right pip would also be a good place for distribution. I'd be happy to work with you on getting this to work and also make this an official distribution for the OGDF. Once that is done, building tmap and pulling in the OGDF as dependency should be comparatively easy. The CMake-based build process for the OGDF should also be easy to handle, my problem is currently how to get this into a setup.py controlled package and how to provide correct binary builds for all systems with stuff like anylinux and the like. PS: If you are using the OGDF from python, `ogdf-python might be interesting for you. |
I managed to get both ogdf and tmap into a single wheel (see the development branch action artifacts). The only issue I have to work out is a SIGILL erro on some linux environments (e. g. on google colab). I hope to get this fixed later this week. The packages are deployed on test.pypi if anyone wants to give it a go. Sorry for not adding links, I'm writing from the github mobile app and it's a bit of a pain 😊 |
Update: Had to build OGDF with
As I've deployed it from the development branch, it already has the new API, e.g.: te = tm.embed(
data,
layout_generator=tm.layout_generators.BuiltinLayoutGenerator(),
keep_knn=True,
)
tm.plot(
te,
show=True,
line_kws={"linestyle": "--", "color": "gray"},
scatter_kws={"s": 5},
) |
The |
I did some more debugging on the |
Quick update: |
But that probably still only fixes the issues for some systems, right? So in a generic |
Yes, especially with M1 et al becoming more common. I didn't have time yet to look at the performance--what do you reckon the impact is? |
Honestly, I have no clue there. 😅 |
Note: I'm now also building wheels with just the OGDF shared library here. Unfortunately, there is still some weird unrelated issue with our C++ bindings on Windows, so the tests keep failing. Still, the wheels produced there should be good, but I'm waiting for all tests to pass to move the release from the testing to the actual PyPI. I'm using PyPA's new hatch build system, which makes for a very nice and clean pyproject.toml file without the (at least for me) hard-to-understand setuptools code in setup.py (that file is no longer required for hatch). The actual cmake build happens, nicely isolated, in a dedicated build hook, so this build also works outside of cibuildwheel (even when doing Still, I'm not sure whether you want to depend on this, as static linking is probably preferable if you are after the most performance. |
Thanks for the info, I have been a bit busy preparing papers for conferences, so I'll take a look once I can get back to maintaining TMAP. Hatch looks really cool--I haven't heard about it. I'll give it a go for my next project. Thanks for identifying the line, I'll use this in the next version of TMAP. I'll stick to static linking for the time being (depending on whether I can find a Master's student for a project idea I have, this might change though--btw, you don't have a surplus of students interested in graph-viz by any chance? 😉 ) |
Hi guys, any update to build tmap development branch using a docker ubuntu image running on a M1 machine ?
|
See #33 for a temporary workaround. |
It looks like there are some C++ dependencies in tmap. Would it be possible to build some wheels and distribute them on PyPI? I'm personally not very happy to use conda as a crutch to installing things, as it introduces a manual step installation that works pretty differently on system to system.
The text was updated successfully, but these errors were encountered: