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

Update documentation cross references #327

Merged
merged 20 commits into from
Feb 3, 2023

Conversation

matteopilz
Copy link
Contributor

@matteopilz matteopilz commented Jan 26, 2023

Add cross references to the documentation. Additionally, we can also include terms or make a new PR for that.

adjusted. These are accessible through ``getParameters()`` and yield a
``Param`` object (see `Parameter handling <parameter_handling.html>`_) which can
be manipulated. After changing parameters, one can use ``setParameters()`` to
adjusted. These are accessible through :py:meth:`~.Algorithm.getParameters()` and yield a
Copy link
Contributor

@jpfeuffer jpfeuffer Jan 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will not work since the above is pseudocode. Unfortunately, we are not wrapping DefaultParamHandler which is where these methods come from (not "Algorithm"). It is kind of a hidden (C++-only) base class.
Not sure what to do here @timosachsenberg

docs/source/id_by_mz.rst Outdated Show resolved Hide resolved
docs/source/id_by_mz.rst Outdated Show resolved Hide resolved
docs/source/id_by_mz.rst Outdated Show resolved Hide resolved
docs/source/id_by_mz.rst Outdated Show resolved Hide resolved
matteopilz and others added 2 commits January 26, 2023 13:21
Co-authored-by: Julianus Pfeuffer <pfeuffer@informatik.uni-tuebingen.de>
Co-authored-by: Julianus Pfeuffer <pfeuffer@informatik.uni-tuebingen.de>
Copy link
Contributor

@jpfeuffer jpfeuffer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks. You can batch commit my suggestions.

got to "Files changed". Then for each comment, "Add to batch"

matteopilz and others added 6 commits January 26, 2023 13:22
Co-authored-by: Julianus Pfeuffer <pfeuffer@informatik.uni-tuebingen.de>
Co-authored-by: Julianus Pfeuffer <pfeuffer@informatik.uni-tuebingen.de>
Co-authored-by: Julianus Pfeuffer <pfeuffer@informatik.uni-tuebingen.de>
Co-authored-by: Julianus Pfeuffer <pfeuffer@informatik.uni-tuebingen.de>
Co-authored-by: Julianus Pfeuffer <pfeuffer@informatik.uni-tuebingen.de>
@matteopilz matteopilz reopened this Jan 31, 2023

Mass
Mass is a measure of the amount of matter that an object contains. In comparison to often used term weight, which is a measure of the force of gravity on that object.
Octadecyl (C18)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

capitalization and inclusion of abbreviations actually looks like the least efficient choice for glossary terms.
@timosachsenberg @tjeerdijk See discussion in #331

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. But my main concern is not styling, but usage. If you capitalize the terms, you need to write :term:non-capitalize <Non-capitalize> all the time. When in English you need the lower case 95% of the time.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same goes for abbreviations. If you add "mass spectrometry (MS)" as a term you can neither use :term:mass spectrometry nor :termMS separately.
I want to balance the amount of terms in the glossary and the number of times you need to add an alternative text. Therefore we need rules.

By the way, you can have multiple terms for the same description. Not sure why you removed that idea.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see #331 unfortunately no one has an opinion there.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess with the term that was used in the :term: that triggered the pop up.
Of course you have to start your descriptions with "Mass spectrometry (MS) is ..." as I changed in my previous PR.

Copy link
Contributor Author

@matteopilz matteopilz Feb 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't look great in the glossary itself and from the formatting it also looks like it will always be registered as two separate terms https://pyopenms.readthedocs.io/en/latest/glossary.html?highlight=lcms#term-LC-MS.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I prefer it over many "see XYZ" entries. That's why I wanted to trigger a discussion with opinions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does it look like in the popup. Seems like it is never referenced...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not many glossary terms are actually linked right now.

@jpfeuffer
Copy link
Contributor

By the way, I am very sorry for ruining the PR a bit. But the changes in the codeblocks were necessary for blacken to run through.

… cross-ref-update

# Conflicts:
#	docs/source/ML_tutorial.rst
#	docs/source/chemistry.rst
#	docs/source/datastructures_id.rst
#	docs/source/datastructures_peak.rst
#	docs/source/glossary.rst
#	docs/source/id_by_mz.rst
#	docs/source/interactive_plots.rst
#	docs/source/massql.rst
#	docs/source/pandas_df_conversion.rst
#	docs/source/peptide_search.rst
#	docs/source/smoothing.rst
#	docs/source/spectrumalignment.rst
# Conflicts:
#	docs/source/aasequences.rst
#	docs/source/digestion.rst
#	docs/source/id_by_mz.rst
@jpfeuffer
Copy link
Contributor

jpfeuffer commented Feb 2, 2023

So, I was thinking about glossary terms a bit more yesterday. Ad since no one has any opinion, I am deciding that we do the glossary as follows:

ABBR1
ABBR2
..
full term1
full term2

  Full term (ABBR1 or also ABBR2, ...) is a foobar

Then in the text:

Talking about :term:`full term1` (:term:`ABBR1`) will help users.
In the rest of the text we will only call it :term:`ABBR1`.

@jpfeuffer jpfeuffer mentioned this pull request Feb 2, 2023
@matteopilz
Copy link
Contributor Author

matteopilz commented Feb 2, 2023

I'm not sure if we then would have to add definitions for all of them: ABBR1, ABBR2, full term1 and full term2.
Because for ABBR1 it will probably only show ABBR1 when hovering over it.

@jpfeuffer
Copy link
Contributor

Did you try?

@matteopilz
Copy link
Contributor Author

I don't know how, when I build it locally, the hover references do not work.

@jpfeuffer
Copy link
Contributor

See docs: https://sphinx-hoverxref.readthedocs.io/en/latest/development.html

But I tried and read the docs is bugged..

readthedocs/readthedocs.org#9975

@matteopilz
Copy link
Contributor Author

Then I guess we don't have another choice right now but include only 1 term in the glossary and reference it with e.g. :term:MS<mass spectrometry>.

@jpfeuffer
Copy link
Contributor

No I vote for reordering with the abbreviations on the bottom and then always use the last term for referencing.

… cross-ref-update

# Conflicts:
#	docs/source/background.rst
#	docs/source/glossary.rst
@matteopilz
Copy link
Contributor Author

But didn't your picture show, that the hover references won't be working then?

@jpfeuffer
Copy link
Contributor

If you link to any non-last terms, yes

@matteopilz
Copy link
Contributor Author

Why do you want to include the other terms before that then?

@jpfeuffer
Copy link
Contributor

For the future so we can switch, as soon as the bug is fixed.

@matteopilz
Copy link
Contributor Author

Ok, works for me.

@jpfeuffer
Copy link
Contributor

I think it is not too often that we have this case. So it should be fine.

@matteopilz matteopilz marked this pull request as ready for review February 2, 2023 15:09
@jpfeuffer
Copy link
Contributor

Are you doing the glossary separately?
It seems like the terms are now capitalized right?

@matteopilz
Copy link
Contributor Author

I would do it in a different PR now. I hanged it back to lowercase, but adding the term references would make this PR a bit too convoluted.

@jpfeuffer
Copy link
Contributor

I will merge but we should fix the terms ASAP. Many of them will not work anymore.

@jpfeuffer jpfeuffer merged commit 215d908 into OpenMS:master Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants