Skip to content

Conversation

@lukaspie
Copy link
Contributor

@lukaspie lukaspie commented Jul 16, 2025

This adds a spellchecker (cspell) and introduces a custom dictionary for it. In the course of implementing this, a couple of typos were fixed, mostly in the contributed definitions.

@lukaspie lukaspie added NIAC has requested The NIAC has requested this issue to be considered workflows Continuous integration and deployment labels Jul 16, 2025
@prjemian
Copy link
Contributor

Not sure we should keep weared in the custom dictionary. It secures the spelling here:

Medium on the abrasive_medium_carrier (cloth or grinding plate)
whereby material is abrasively weared.

Can we improve this wording? Perhaps

Medium on the 'abrasive_medium_carrier' (cloth or grinding plate) whereby material is removed.

@prjemian
Copy link
Contributor

The word hehe appears in the custom dictionary. Looks odd. Where is this used?

@prjemian
Copy link
Contributor

Custom dictionary: E_LAPLACE_RITCHARDSON -- Where is this used? Is the letter T correct?

@prjemian
Copy link
Contributor

Custom dictionary: castaing_henry Where is this used?

@lukaspie
Copy link
Contributor Author

lukaspie commented Jul 17, 2025

Thanks for the suggestion @prjemian! The custom-dictionary as it is was copied over from our fork of the repository where we have some additional classes that are not yet in this repo. I suggest we wait with this PR here until at least #1581 and #1423 (where some of the contributed definitions are also removed) are done, then I will update the custom word list again and remove those words that are not actually needed.

@phyy-nx phyy-nx added this to the NXDL 2025 milestone Aug 11, 2025
@lukaspie
Copy link
Contributor Author

@phyy-nx @prjemian this should be ready now. I went to the custom dictionary again and checked that every word has meaning and is not a typo. I also ran two bash script that explicitly check 1) that each file in the custom dict is actuall used somewhere, and 2) that none of the words from the custom dict are already used in the imported dictionaries from cspell.

@lukaspie lukaspie added NIAC should review The NIAC should review/discuss and removed NIAC has requested The NIAC has requested this issue to be considered labels Aug 26, 2025
@lukaspie lukaspie requested review from phyy-nx and prjemian August 26, 2025 15:06
@lukaspie lukaspie marked this pull request as ready for review August 26, 2025 15:06
@mkuehbach mkuehbach requested a review from PeterC-DLS September 9, 2025 10:16
@phyy-nx
Copy link
Contributor

phyy-nx commented Sep 10, 2025

Need all comments resolved before merging :)

@PeterC-DLS
Copy link
Contributor

PeterC-DLS commented Sep 10, 2025

In fact, a bit of shell scripting gives this list of unused "words":

tex
aabb
beamstops
Bitdepth
calib
datablock
forw
globar
granularize
HAGB
halfwidth
HPDB
IFES
LIMS
lockin
nanostructure
Ncluster
phaseplate
PYCCAPT
TERMS
traj
wavelen
invizo
Mersenne
VORONOI
Zener
paraview
Neighbour

…ith some terms on Peters side suggested that they are unused while cspell identifies them as used and warns about them no in the custom dictionary. Therefore, made a copy of the previous list, removed grouping, sorted lexi ascending and removed duplicates. Now will run the CI and a script that fishes all unknown words and then compare, strongly suggest to remove the grouping but instead sort all lexicographically ascending
…nary more changes observed than revealed by the review process, compared changes between that list and the previously used list when that was also sorted, like one-on-one comparison
@mkuehbach
Copy link
Contributor

@PeterC-DLS thank you for your careful feedback, observed differences also in between your scripting and running with a virgin custom-dictionary --- that change in strategy solved the issue, compared the resulting custom dictionary with the previous one that you reviewed prior fa46697, overall number of custom fragments/words remains but changes also in other places, eventually changes on the cspell dictionary side and processing strategy while this PR evolved also had an effect. I checked that the side-by-side comparison of the prior fa46697 dict and the present 1afe did not add terms that are unreasonable from a human perspective.

@mkuehbach
Copy link
Contributor

Mind this PR's source is on FAIRmat-NFDI directed towards the NIAC repo, we keep the FAIRmat-NFDI/main synced up with nexusformat/definitions/main while work was pursued on the spellcheck branch the niac main changed 1afe2d4 synced this up

@phyy-nx
Copy link
Contributor

phyy-nx commented Sep 16, 2025

Can we merge in the typos part of this and delay the CI stuff until the next release? In other words, remove all the cspell stuff from this PR and punt that down the road, but get the useful changes in now?

…f cspell down the road but take the corrections this experiment brought about
@mkuehbach
Copy link
Contributor

Can we merge in the typos part of this and delay the CI stuff until the next release? In other words, remove all the cspell stuff from this PR and punt that down the road, but get the useful changes in now?

@phyy-nx done

@phyy-nx
Copy link
Contributor

phyy-nx commented Sep 16, 2025

Great. Just needs an approval. @PeterC-DLS ?

Copy link
Contributor

@PeterC-DLS PeterC-DLS left a comment

Choose a reason for hiding this comment

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

All looks fine to me

@lukaspie lukaspie dismissed mkuehbach’s stale review October 20, 2025 16:34

We removed the make target, so the review is no longer applicable

@lukaspie lukaspie merged commit 9932b7b into nexusformat:main Oct 20, 2025
2 checks passed
@lukaspie lukaspie deleted the spellcheck branch October 20, 2025 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

NIAC should review The NIAC should review/discuss workflows Continuous integration and deployment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants