|
2 | 2 |
|
3 | 3 | **We appreciate all kinds of help, so thank you!**
|
4 | 4 |
|
5 |
| -First please read the overall project contributing guidelines. These are |
| 5 | +First, please read the overall project contributing guidelines. These are |
6 | 6 | included in the Qiskit documentation here:
|
7 | 7 |
|
8 | 8 | https://github.com/Qiskit/qiskit/blob/main/CONTRIBUTING.md
|
@@ -58,40 +58,64 @@ please ensure that:
|
58 | 58 | make html
|
59 | 59 | ```
|
60 | 60 | from the root of the Machine Learning repository clone. You might also like to check the html output
|
61 |
| - to see the changes formatted output is as expected. You will find an index.html |
62 |
| - file in docs\_build\html and you can navigate from there. |
| 61 | + to see the changes formatted output is as expected. You will find an `index.html` |
| 62 | + file in `docs\_build\html` and you can navigate from there. |
63 | 63 |
|
64 |
| - Please note that a spell check is run in CI, on the docstrings. |
| 64 | +3. Please note that a spell check is run in CI, on the docstrings. |
65 | 65 |
|
66 |
| - You can run `make spell` locally to check spelling though you would need to |
| 66 | + You can run |
| 67 | + ```shell script |
| 68 | + make spell |
| 69 | + ``` |
| 70 | + locally to check spelling though you would need to |
67 | 71 | [install pyenchant](https://pyenchant.github.io/pyenchant/install.html) and be using
|
68 | 72 | hunspell-en-us as is used by the CI.
|
69 | 73 |
|
70 | 74 | For some words, such as names, technical terms, referring to parameters of the method etc.,
|
71 | 75 | that are not in the en-us dictionary and get flagged as being misspelled, despite being correct,
|
72 | 76 | there is a [.pylintdict](./.pylintdict) custom word list file, in the root of the Machine Learning repo,
|
73 | 77 | where such words can be added, in alphabetic order, as needed.
|
74 |
| - |
75 |
| -3. If it makes sense for your change that you have added new tests that |
| 78 | + |
| 79 | + > [!NOTE] |
| 80 | + > When running PyEnchant on Apple Silicon M1(/2/3) hardware in a virtual environment, you may |
| 81 | + > encounter an error like: |
| 82 | + > ```text |
| 83 | + > ImportError: The ‘enchant’ C library was not found and maybe needs to be installed. |
| 84 | + > ``` |
| 85 | + > This happens because the Arm-based `brew install` command places the library files |
| 86 | + > (libenchant-2 and dylib) in a non-standard location that PyEnchant doesn’t look into by |
| 87 | + > default. A convenient workaround (originally documented in the Plone documentation toolchain |
| 88 | + > and discussed in the PyEnchant issue tracker) is to point PyEnchant at the Homebrew library |
| 89 | + > _before_ launching your Python tool. On an Apple Silicon MacOS you can run |
| 90 | + > ```bash |
| 91 | + > export PYENCHANT_LIBRARY_PATH=/opt/homebrew/lib/libenchant-2.dylib |
| 92 | + > ``` |
| 93 | + > in your shell session, and then invoke your script or REPL as usual. This forces PyEnchant to |
| 94 | + > load the correct C library, eliminating the import error. |
| 95 | + > See the docs contribution guide for context on how they use PyEnchant in their toolchain |
| 96 | + > (https://github.com/plone/documentation/pull/1242) and the related discussion in the |
| 97 | + > PyEnchant issue tracker (https://github.com/pyenchant/pyenchant/issues/265#issuecomment-1126415843). |
| 98 | + |
| 99 | +4. If it makes sense for your change that you have added new tests that |
76 | 100 | cover the changes and any new function.
|
77 | 101 |
|
78 |
| -4. Ensure that if your change has an end user facing impact (new feature, |
| 102 | +5. Ensure that if your change has an end user facing impact (new feature, |
79 | 103 | deprecation, removal etc) that you have added a reno release note for
|
80 | 104 | that change and that the PR is tagged for the changelog.
|
81 | 105 |
|
82 |
| -5. Ensure all code, including unit tests, has the copyright header. The copyright |
| 106 | +6. Ensure all code, including unit tests, has the copyright header. The copyright |
83 | 107 | date will be checked by CI build. The format of the date(s) is _year of creation,
|
84 | 108 | last year changed_. So for example:
|
85 | 109 |
|
86 |
| - > \# (C) Copyright IBM 2018, 2021. |
| 110 | + > \# (C) Copyright IBM 2018, 2025. |
87 | 111 |
|
88 | 112 | If the _year of creation_ is the same as _last year changed_ then only
|
89 | 113 | one date is needed, for example:
|
90 | 114 |
|
91 |
| - > \# (C) Copyright IBM 2021. |
| 115 | + > \# (C) Copyright IBM 2025. |
92 | 116 |
|
93 | 117 | If code is changed in a file make sure the copyright includes the current year.
|
94 |
| - If there is just one date and it's a prior year then add the current year as the 2nd date, |
| 118 | + If there is just one date, and it's a prior year then add the current year as the 2nd date, |
95 | 119 | otherwise simply change the 2nd date to the current year. The _year of creation_ date is
|
96 | 120 | never changed.
|
97 | 121 |
|
|
0 commit comments