Information for Interested GSoC Students 2022

Training GitHub - plone/training: Various Plone Trainings is part of the Plone Foundation · GitHub repository, so, yes.
As you will contribute to Plone, you can do it now. It doesn't hurt. It's just to be sure that it's clear that all rights on code and documentation belong to our Plone foundation.

1 Like

For the React training documentation: @jackahl @iFlameing are the trainers of Plone Conference 2021 and 2020. Maybe they can be mentors for updating the React and Volto trainings?

We should probably try to clarify this by being more specific that anything in the GitHub plone organization (and equivalent for Zope) is considered core, and anything outside of it (e.g. collective) is not.

1 Like

Email sent to the Plone foundation. :fist_right:t4: :fist_left:t4: How will I know the status of the application? I mean, when I can start contributing. :face_with_hand_over_mouth: :upside_down_face:

Thanks for sending it in. It is still a manual process so it may take a day or two.

In the meantime, keep doing your investigation and learning!

1 Like

Building and Checking the Quality of Documentation Installation

System: Using M1 Mac Air + Monterey
Ran the following commands before the one in the screenshot:

brew install enchant
git clone https://github.com/plone/training.git
cd training
make build
source bin/activate

Then, I ran brew install sphinx-doc and added the path in my .zshrc file in an attempt to fix this error. But got another error.

Am I doing something wrong or is this some Apple Silicon Chip issue :sweat_smile:

After some hours of debugging, I realized the issue. I was using py3 for running the plone backend project. But the training project works with py2 only in my machine. :grimacing:

I am not sure whether it is an issue on my machine only. Otherwise, I think it should be mentioned in the documentation @tkimnguyen? :cry:

Are these warnings to be ignored?

  1. make spellcheck => WARNING: Found 1296 misspelled words
    build succeeded, 61 warnings.

  2. make linkcheck => build succeeded, 60 warnings.

Excited to be the newest member of the Plone Foundation on Github. :star_struck: :partying_face: Thank you, everyone! :hugs: :innocent:

Please, review the Pull Request with respect to the issue. :grin: :slightly_smiling_face:

Awaiting your valuable feedback, any convention/standard/guideline that I should follow to improve as a contributor and developer. :smiley:

This is not necessary. See what make build does.

Also do you have Python 3 installed on your machine? You can use pyenv for Windows to manage multiple Python versions on your machine, or use WSL. I don't do Windows myself, so I can't be of much help here.

1 Like

If you added a new warning or error, then you should fix it. If you did not add it, then it is not mandatory to fix them, but golly it sure would be appreciated if you did!

Spellcheck has mostly false positives. We need to add more valid word spellings to the file https://github.com/plone/training/blob/main/docs/spelling_wordlist.txt. We need to eat this elephant one bite at a time.

Linkcheck had zero errors last September. 60 errors is excessive. Without looking at it, I suspect that a couple of websites updated their links with redirects. I'd have to look at the log file to know.

1 Like

Thread 1

Yes, I knew that. Still, I was just trying to fix it by brute force there. :rofl:
Switching from py3 to py2 fixed it for me. Check this:

Thread 2

(Light Joke Alert) For a surprise, even though, I am from India. I am not using Windows. :laughing: Currently:

I am using pyenv for Mac.

Thread 3

Sure, I will be more than happy to own this up. :fire: :rocket:

So how should I approach it? After finding some common false positives should I create an issue for the same?

1 Like

I saw that, but that cannot be true. We require Sphinx >= 4.1.2. Furthermore Python 2 support was dropped in Sphinx 2.

You can go straight to a PR, no issue creation necessary.

1 Like

I had these questions regarding spellcheck task:

  1. Are - (dash) containing words breaking into two different words. Like add-ons breaks into:
    1. add
    2. ons
  2. Is the file spelling_wordlist.tx case sensitive?
  3. How are the letters being sorted in that document?

Good questions.

The Sphinx plugin for spell checking is sphinxcontrib.spelling, and its documentation explains how it works and its settings, in case you have other questions that you want to answer right away. The settings and their default values for the extension are defined in docs/conf.py, here and here. We can always change settings, if it makes sense.

  1. No.
  2. Yes. For example, if you spell "ZODB" as "zodb", that is incorrect and it will be caught by the spellchecker.
  3. Sorting is alphanumeric, where case does not matter. If we were to sort by ASCII value, where A-Z is followed by a-z, then case would matter. That would be bad because maintainers would not look in two different parts of a looooooong file to see whether the correct spelling of a word should be upper- or lower-case. It's best to keep them clustered closely.
1 Like

Issue 1

If I simply wrtite, 'ons' in the dictionary file, It reduces spelling error count by ~100. There are a lot of false positives for different versions of add-ons which is already added in the dictionary. I think that hyphen is splitting the word into two different tokens, and then applying spellcheck.

voltoaddons/01-addon-basics.md:249: (ons)  transpiling, less loading, and so on) if they are identified as Volto add-ons.
voltoaddons/01-addon-basics.md:296: (ons)  Notice that the add-ons should be named by their package name, plus any

Issue 2

Couldn't understand this error? How can I fix it?

Issue 3

This empty string error exists and there are 200+ instances of it.

Issue 1

I apologize, you are correct. In fact, I forgot I opened an issue with sphinx-contrib.spelling last fall for this exact issue. I just picked it up again and started a draft PR.

Let's ignore errors from hyphenated words for now. We can add them to the file as good words, and eventually we'll get that bug fixed.

Issue 2

See Mastering Plone, Theming, Volto Hand On Trainings - WARNING: document isn't included in any toctree · Issue #536 · plone/training · GitHub

It is up to the authors of the Mastering Plone for both versions 5 and 6 to decide what to do with those files, @ksuess, @pbauer.

I'm not sure what the status is for theming_plone_5. That's a question for the content creators, @agitator and @MrTango.

Issue 3

For now, please ignore those errors. That training might be obsolete. It was last updated 5 or so years ago, except when we converted it from reStructuredText to MyST and moved things around. We haven't figured out what to do with obsolete trainings yet. See Handle obsolete trainings and "Plone Training 2022 documentation" in logo area · Issue #581 · plone/training · GitHub

1 Like

Need help regarding this problem, posting it here as I don't think it is an issue but rather a configuration problem in my device.

Problem Description

Followed instructions mentioned on Building and Checking the Quality of Documentation. Ran the make html command in plone/documentation project but got this error.

Steps I did to resolve this issue

  • Deleted project directory and cloned it again. To delete the Python virtual environment.
  • Uninstalled and installed enchant again.
  • Have sphinx path i.e. export PATH="/opt/homebrew/opt/sphinx-doc/bin:$PATH" in my .zshrc
  • Have restarted the terminal and operating system many times.

Python version: 3.8.12
System: M1 Mac Air + Monterey
Note:

  • make commands like spellcheck, html work perfectly in the plone/training project locally.
  • Facing similar issue in plone/volto

The error message states:

See https://pyenchant.github.io/pyenchant/install.html

Under the macOS heading:

If you are using Apple Silicon and it displays this error: The 'enchant' C library was not found and maybe needs to be installed., as a workaround, you may need to install an x86_64 (Intel) version of enchant. In order to do so, you need to install the x86_64 version of Homebrew in /usr/local/ and then use this version to install the corresponding version of enchant.

arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
arch -x86_64 /usr/local/bin/brew install enchant
1 Like

I did the steps mentioned above. Had one doubt:
Do I need to uninstall the other version of enchant, which I already had?

As I am new to the python ecosystem, I am unsure whether I have made any progress or that error has got overshadowed by a new one.

The full traceback has been saved in /var/folders/0n/rwgb7dwx6blgfvxvpzycn03w0000gn/T/sphinx-err-zkvqt_an.log, if you want to report the issue to the developers.

# Sphinx version: 4.4.0
# Python version: 3.9.10 (CPython)
# Docutils version: 0.16 release
# Jinja2 version: 3.0.3
# Last messages:

# Loaded extensions:
Traceback (most recent call last):
  File "/Users/avimishra/Code/Projects/plone/documentation/lib/python3.9/site-packages/sphinx/cmd/build.py", line 280, in build_main
    app = Sphinx(args.sourcedir, args.confdir, args.outputdir,
  File "/Users/avimishra/Code/Projects/plone/documentation/lib/python3.9/site-packages/sphinx/application.py", line 230, in __init__
    self.setup_extension(extension)
  File "/Users/avimishra/Code/Projects/plone/documentation/lib/python3.9/site-packages/sphinx/application.py", line 387, in setup_extension
    self.registry.load_extension(self, extname)
  File "/Users/avimishra/Code/Projects/plone/documentation/lib/python3.9/site-packages/sphinx/registry.py", line 433, in load_extension
    mod = import_module(extname)
  File "/opt/homebrew/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/Users/avimishra/Code/Projects/plone/documentation/lib/python3.9/site-packages/sphinxcontrib/spelling/__init__.py", line 11, in <module>
    from .builder import SpellingBuilder
  File "/Users/avimishra/Code/Projects/plone/documentation/lib/python3.9/site-packages/sphinxcontrib/spelling/builder.py", line 20, in <module>
    from enchant.tokenize import EmailFilter, WikiWordFilter
  File "/Users/avimishra/Code/Projects/plone/documentation/lib/python3.9/site-packages/enchant/__init__.py", line 81, in <module>
    from enchant import _enchant as _e
  File "/Users/avimishra/Code/Projects/plone/documentation/lib/python3.9/site-packages/enchant/_enchant.py", line 161, in <module>
    e = ctypes.cdll.LoadLibrary(enchant_lib_path)
  File "/opt/homebrew/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ctypes/__init__.py", line 452, in LoadLibrary
    return self._dlltype(name)
  File "/opt/homebrew/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ctypes/__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: dlopen(/usr/local/lib/libenchant-2.dylib, 0x0006): tried: '/usr/local/lib/libenchant-2.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/lib/libenchant-2.dylib' (no such file), '/usr/local/Cellar/enchant/2.3.2/lib/libenchant-2.2.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/local/lib/libenchant-2.2.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/lib/libenchant-2.2.dylib' (no such file)