Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Rendering nanopublications & LD in the terminal

22 views
Skip to first unread message

Anatoly Scherbakov

unread,
Jan 4, 2025, 7:50:54 AMJan 4
to Nanopublications
Hi all, hope you had great Christmas ∧/∨ New Year celebrations!

I've been working on a tool to browse and render Linked Data from the Web in the terminal, would like to show you what I've got, and maybe ask a few questions. This is very much α at this point.

If you have Python 3.10+ then installing the tool is as easy as

pip install iolanta

and then,


to look at an example Nanopublication:

retracting.png

This screen shows that this nanopublication says that a person is retracting another nanopublication. Let's click the yellow block to see what is being retracted.

retracted.png

Each of the blocks is clickable. For instance, you can click on the author's name and get a lot of information from ORCID.

author.png

The system attempts to retrieve the information about URIs from the Web. For instance,  if to click on mainEntityOfPage property name above, we'll get information from Schema ontology where that is described.

schema.png

There is at least one caveat I know of. Let's try out this thing:


which shows:

not-retracted.png

This is the same publication as above, but now Iolanta doesn't know it was retracted. Why? ­— because, by design, it doesn't store the state of the RDF graph it visualizes stuff off of between invocations. Since, on this invocation, Iolanta hasn't seen the retracting publication ⇒ then it doesn't know about it. Which means the information displayed is incomplete, and that's what I would like to fix.

1. If I know a URI of a nanopublication, is there a way I can find any nanopublications which retract or somehow else reference this nanopublication? Perhaps a special URL I could ping to get JSON-LD information? Or a SPARQL endpoint to ask?

2. Do you see any potential use cases in your practice where this tool, if more mature, could be useful?

On the screenshots, you can see that a number of URIs are displayed as URIs, as non-human-readable strings of symbols; I aim to solve that and make Linked Data more friendly to someone who's not a professional in Linked Data tech. Thus, potentially, making it easier to use and to produce Linked Data. So feedback would be much welcome.


Thanks a lot!
Anatoly

Barend Mons

unread,
Jan 4, 2025, 8:20:56 AMJan 4
to Anatoly Scherbakov, Nanopublications
Hi Anatoly
I cannot run the tool here but would love to see it next week. 
One remark: you talk about ‘retracting’ a nanopub and we cannot exclude that, however, in 90% + of the cases, the author(s) or peers will ‘annotate’ existing nanopubs. This means that a variety of ‘annotations’ at the individual nanopub level should be supported, including ‘confirmation’ (we found further evidence for the assertion), ‘contesting’ I [ORCID] [contest] [nanopub ID] etc. 
Even if the original author does not believe anymore that the original assertion is correct, it should be ‘marked as contested’ rather than ‘retracted’ imho. One goal of the annotation approach is that machines reasoning over graphs or using them
As ‘input’ for anything should be independently able to ‘weigh’ or even exclude certain triples, based on post publication annotations.
I suppose your tool can do multiple predicates….
My two cents 
Barend Mons 

Prof. Barend Mons

Leiden University Medical Center

Leiden Academic Centre for Drug Research

Past President of CODATA 

GO FAIR foundation


Mail: baren...@go-fair.org

+31624879779

ORCID: 0000-0003-3934-0072

sent from my IPhone



Op 4 jan 2025 om 13:50 heeft Anatoly Scherbakov <alta...@gmail.com> het volgende geschreven:

Hi all, hope you had great Christmas ∧/∨ New Year celebrations!
--
You received this message because you are subscribed to the Google Groups "Nanopublications" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nanopub-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/nanopub-users/e7b6a907-5192-4483-ab9c-29779dec25e9n%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
author.pngretracting.pngschema.pngretracted.pngnot-retracted.png

Anatoly Scherbakov

unread,
Jan 4, 2025, 10:28:12 AMJan 4
to Nanopublications
Hi Barend,

Thanks for your reply! Happy to help if the tool turns out to behave weirdly for you, this is a very α version.

Indeed: removing a nanopub in its entirety would mean that the tool wouldn't be able to render it. The information no longer exists, so how do we know it existed before? — we do not.

The tool relies upon assertions made about a nanopublication, in this particular instance, one nanopublication says that the author  https://purl.org/nanopub/x/retracts another nanopublication. This was an example from Nanodash documentation. I'd like to support other such relations as well, of course. Perhaps you have nanopubs in mind that would be good examples for such relations?

Anatoly

Tobias Kuhn

unread,
Jan 6, 2025, 2:58:27 AMJan 6
to nanopu...@googlegroups.com
Hi Anatoly,

This looks really interesting!

I wanted to try it out myself, but didn't manage. Installing iolanta as
you described didn't work for me:

> $ pip install iolanta
> error: externally-managed-environment
>
> × This environment is externally managed
> ╰─> To install Python packages system-wide, try apt install
> python3-xyz, where xyz is the package you are trying to
> install.
>
> If you wish to install a non-Debian-packaged Python package,
> create a virtual environment using python3 -m venv path/to/venv.
> Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
> sure you have python3-full installed.
>
> If you wish to install a non-Debian packaged Python application,
> it may be easiest to use pipx install xyz, which will manage a
> virtual environment for you. Make sure you have pipx installed.
>
> See /usr/share/doc/python3.12/README.venv for more information.
>
> note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
> hint: See PEP 668 for the detailed specification.

So, I installed it in a virtual environment as instructed, which seems
to have worked, but now running the command as you wrote, gives me
another error message:

> $ bin/iolanta http://purl.org/np/RAYskLSM5x29icArnWvo9nVrIVEN2mfPoDq3TQSgm-9kk
> Usage: iolanta [OPTIONS] COMMAND [ARGS]...
> Try 'iolanta --help' for help.
> ╭─ Error ─────────────────────────────────────────────────────────────────────────────────────────────╮
> │ No such command 'http://purl.org/np/RAYskLSM5x29icArnWvo9nVrIVEN2mfPoDq3TQSgm-9kk'. │
> ╰─────────────────────────────────────────────────────────────────────────────────────────────────────╯

What am I doing wrong?

Regards,
Tobias


On 04.01.25 13:50, Anatoly Scherbakov wrote:
> Hi all, hope you had great Christmas ∧/∨ New Year celebrations!
>
> I've been working on a tool to browse and render Linked Data from the
> Web in the terminal, would like to show you what I've got, and maybe ask
> a few questions. This is very much α at this point.
>
> If you have Python 3.10+ then installing the tool is as easy as
>
> pip install iolanta
>
> and then,
>
> iolanta http://purl.org/np/RAYskLSM5x29icArnWvo9nVrIVEN2mfPoDq3TQSgm-9kk
>
> to look at an example Nanopublication:
>
> retracting.png
>
> This screen shows that this nanopublication says that a person is
> retracting another nanopublication. Let's click the yellow block to see
> what is being retracted.
>
> retracted.png
>
> Each of the blocks is clickable. For instance, you can click on the
> author's name and get a lot of information from ORCID.
>
> author.png
>
> The system attempts to retrieve the information about URIs from the Web.
> For instance,  if to click on mainEntityOfPage property name above,
> we'll get information from Schema ontology where that is described.
>
> schema.png
>
> There is at least one caveat I know of. Let's try out this thing:
>
> iolanta http://purl.org/np/RARv1-bZWsdvQs88TDH2trcwNoGF1g5AawE2sPKeh5K_0
>
> which shows:
>
> not-retracted.png
>
> This is the same publication as above, but now Iolanta doesn't know it
> was retracted. Why? ­— because, by design, it doesn't store the state of
> the RDF graph it visualizes stuff off of between invocations. Since, on
> this invocation, Iolanta hasn't /seen/ the retracting publication ⇒ then
> it doesn't know about it. Which means the information displayed is
> incomplete, and that's what I would like to fix.
>
> 1. If I know a URI of a nanopublication, is there a way I can find any
> nanopublications which retract or somehow else reference this
> nanopublication? Perhaps a special URL I could ping to get JSON-LD
> information? Or a SPARQL endpoint to ask?
>
> 2. Do you see any potential use cases in your practice where this tool,
> if more mature, could be useful?
>
> On the screenshots, you can see that a number of URIs are displayed as
> URIs, as non-human-readable strings of symbols; I aim to solve that and
> make Linked Data more friendly to someone who's not a professional in
> Linked Data tech. Thus, potentially, making it easier to use and to
> produce Linked Data. So feedback would be much welcome.
>
> - Site: https://iolanta.tech
> - GitHub: https://github.com/iolanta-tech/iolanta/
>
> Thanks a lot!
> Anatoly
>
> --
> You received this message because you are subscribed to the Google
> Groups "Nanopublications" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to nanopub-user...@googlegroups.com <mailto:nanopub-
> users+un...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/nanopub-
> users/e7b6a907-5192-4483-ab9c-29779dec25e9n%40googlegroups.com <https://
> groups.google.com/d/msgid/nanopub-users/e7b6a907-5192-4483-
> ab9c-29779dec25e9n%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout <https://
> groups.google.com/d/optout>.

Anatoly Scherbakov

unread,
Jan 6, 2025, 4:16:18 AMJan 6
to Nanopublications
Hi Tobias,

Judging from the output you had shared, your active Python version is 3.12, which is the latest stable version, but sadly Iolanta currently does not install on it (because of some dev dependencies issues I was going to fix, but haven't gotten to that yet). To confirm this theory, please try these commands within your virtual environment:

python --version
pip freeze | grep iolanta

To fix, please try installing a Python 3.11 environment instead. You can do it using pyenv. Installation as per their GitHub https://github.com/pyenv/pyenv?tab=readme-ov-file#1-automatic-installer-recommended, in case you do not have it on your system, looks like this:

curl -fsSL https://pyenv.run | bash

Then, follow prompts, and restart your terminal. After that, you should have pyenv command available.

pyenv install 3.11.9
pyenv virtualenv 3.11.9 iolanta
pyenv shell iolanta
pip install iolanta

I am sorry for the clumsiness, I'll try to fix the thing to work under 3.12 (ETA is next Monday) — but the above is a short term solution in case you're still willing to go through this kind of hassle. Thank you!

Anatoly

Anatoly Scherbakov

unread,
Jan 11, 2025, 1:32:04 PMJan 11
to Nanopublications
Hi Tobias,

The issue with Python 3.12 has been fixed (I hope).

pip install iolanta

on your machine should bring in iolanta 1.2.2 which fixes 3.12 installation capability.

Thanks!
Anatoly

On Monday, January 6, 2025 at 11:58:27 AM UTC+4 kuhnt...@gmail.com wrote:

Tobias Kuhn

unread,
Jan 13, 2025, 2:21:34 AMJan 13
to nanopu...@googlegroups.com
Hi Anatoly,

Yes, it seems to work now! :)

Regards,
Tobias
> RAYskLSM5x29icArnWvo9nVrIVEN2mfPoDq3TQSgm-9kk <http://purl.org/np/
> RAYskLSM5x29icArnWvo9nVrIVEN2mfPoDq3TQSgm-9kk>
> > Usage: iolanta [OPTIONS] COMMAND [ARGS]...
> > Try 'iolanta --help' for help.
> > ╭─ Error
> ─────────────────────────────────────────────────────────────────────────────────────────────╮
> > │ No such command 'http://purl.org/np/
> RAYskLSM5x29icArnWvo9nVrIVEN2mfPoDq3TQSgm-9kk <http://purl.org/np/
> RAYskLSM5x29icArnWvo9nVrIVEN2mfPoDq3TQSgm-9kk>'. │
> >
> ╰─────────────────────────────────────────────────────────────────────────────────────────────────────╯
>
> What am I doing wrong?
>
> Regards,
> Tobias
>
>
> On 04.01.25 13:50, Anatoly Scherbakov wrote:
> > Hi all, hope you had great Christmas ∧/∨ New Year celebrations!
> >
> > I've been working on a tool to browse and render Linked Data from
> the
> > Web in the terminal, would like to show you what I've got, and
> maybe ask
> > a few questions. This is very much α at this point.
> >
> > If you have Python 3.10+ then installing the tool is as easy as
> >
> > pip install iolanta
> >
> > and then,
> >
> > iolanta http://purl.org/np/
> RAYskLSM5x29icArnWvo9nVrIVEN2mfPoDq3TQSgm-9kk <http://purl.org/np/
> RAYskLSM5x29icArnWvo9nVrIVEN2mfPoDq3TQSgm-9kk>
> >
> > to look at an example Nanopublication:
> >
> > retracting.png
> >
> > This screen shows that this nanopublication says that a person is
> > retracting another nanopublication. Let's click the yellow block
> to see
> > what is being retracted.
> >
> > retracted.png
> >
> > Each of the blocks is clickable. For instance, you can click on the
> > author's name and get a lot of information from ORCID.
> >
> > author.png
> >
> > The system attempts to retrieve the information about URIs from
> the Web.
> > For instance,  if to click on mainEntityOfPage property name above,
> > we'll get information from Schema ontology where that is described.
> >
> > schema.png
> >
> > There is at least one caveat I know of. Let's try out this thing:
> >
> > iolanta http://purl.org/np/RARv1-
> bZWsdvQs88TDH2trcwNoGF1g5AawE2sPKeh5K_0 <http://purl.org/np/RARv1-
> bZWsdvQs88TDH2trcwNoGF1g5AawE2sPKeh5K_0>
> > - Site: https://iolanta.tech <https://iolanta.tech>
> > - GitHub: https://github.com/iolanta-tech/iolanta/ <https://
> github.com/iolanta-tech/iolanta/>
> >
> > Thanks a lot!
> > Anatoly
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Nanopublications" group.
> > To unsubscribe from this group and stop receiving emails from it,
> send
> > an email to nanopub-user...@googlegroups.com <mailto:nanopub-
> > users+un...@googlegroups.com>.
> > To view this discussion visit https://groups.google.com/d/msgid/
> nanopub- <https://groups.google.com/d/msgid/nanopub->
> > users/e7b6a907-5192-4483-ab9c-29779dec25e9n%40googlegroups.com
> <http://40googlegroups.com> <https://
> > groups.google.com/d/msgid/nanopub-users/e7b6a907-5192-4483-
> <http://groups.google.com/d/msgid/nanopub-users/e7b6a907-5192-4483->
> > ab9c-29779dec25e9n%40googlegroups.com?
> utm_medium=email&utm_source=footer <http://40googlegroups.com?
> utm_medium=email&utm_source=footer>>.
> > For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout> <https://
> > groups.google.com/d/optout <http://groups.google.com/d/optout>>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Nanopublications" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to nanopub-user...@googlegroups.com <mailto:nanopub-
> users+un...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/nanopub-
> users/1fc824f1-4a3e-465c-a1ef-dd6fd6faeeebn%40googlegroups.com <https://
> groups.google.com/d/msgid/nanopub-users/1fc824f1-4a3e-465c-a1ef-
> dd6fd6faeeebn%40googlegroups.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages