Maintenance: CI/CD, packaging, docs, C++ cleanup, and docstring fixes#40
Merged
Maintenance: CI/CD, packaging, docs, C++ cleanup, and docstring fixes#40
Conversation
CI/CD:
- Unify artifact actions to upload-artifact@v7 + download-artifact@v7
- Switch to trusted publishing (remove token-based PyPI auth)
- Add github-actions ecosystem to Dependabot
- Add timeout-minutes to pytest workflow
- Pin Python 3.13 in pre-commit workflow
Packaging:
- Add PyPI classifiers (status, audience, Python versions, topic)
Pre-commit:
- Add check-yaml, check-toml, check-merge-conflict hooks
Docs:
- Replace sphinx.ext.imgmath with mathjax
- Remove references to non-existent _static/_templates dirs
- Clean up sphinx-quickstart boilerplate comments
C++:
- Remove 32 redundant std::cerr lines before throw statements
- Replace 5 bare TODO comments with descriptive notes
- Fix typos in comments ('Shold not hapen' -> 'Should not happen')
Tests:
- Add conftest.py for shared test config
- Add test_MaterialConstructors.py with constructor, interpolation,
error-path, and public API surface tests
- Switch theme from alabaster to furo - Add intersphinx mappings (Python, NumPy, SciPy) - Enable autosummary_generate - Disable numpydoc_xref_param_type (false-positive cross-refs) - Suppress ref.any warnings for parameter-name references - Fix ambiguous :any: refs → explicit :class: roles - Fix docstring definition-list formatting in .pyx - Remove legacy Makefile and make.bat (CI uses sphinx-build) - Clean index.rst boilerplate comment - Add furo to dev dependencies
Comprehensive review and correction of all library docstrings: Spelling fixes: - amplitute/amplitutes → amplitude/amplitudes - Electical/electical → Electrical/electrical - enhancment/enhencment/enchncment → enhancement - absoprtiopn/asborption → absorption - confortable → convenient - Correspondig → Corresponding - contructor → constructor - Dafualt/Defualt → Default - represenbt → represent - neccesary → necessary - fiedProfile → fieldProfile - foreard → forward - Innstance/inctance → Instance/instance - vaccuum → vacuum - propageted → propagated - netagtive → negative - inuput/imput → input - nonliner → nonlinear - thikness/thikness → thickness - mathods → methods - corrorrespond → corresponds - z-coorinate/z-cooridnate → z-coordinate Grammar and wording fixes: - 'This class is helper class' → 'This is a helper class' - 'For shortcut __call__ is defined as GetN' → proper sentence - 'Allows to access' → 'Allows accessing' - 'Other mode is,' → 'The other mode is' - 'deviation form' → 'deviation from' - 'First index is determines' → 'First index corresponds to' - Trailing 'values' after period removed - 'wave vector the generated' → 'wave vector of the generated' Factual/semantic fixes: - _SecondOrderNLIntensities: P1/P2 descriptions were swapped - _WaveSweepResultSecondOrderNLTMM: P2 was listed as P1 - _NonlinerLayer → _NonlinearLayer (typo in class reference) - WaveGetFields2D: 'dir' param name → 'dirStr' to match signature Cross-reference modernization: - Replaced all :any: roles with explicit :class:, :meth:, :attr:, or backtick literals as appropriate - GettingStarted.rst: :any: → :meth:/:attr:/:class: for method/attr refs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses high and medium priority maintenance items identified during a project audit, modernizes the Sphinx documentation setup, and fixes all library docstrings.
Changes
Commit 1: High & medium priority maintenance (
e74a47a)CI/CD (High)
v7(upload-artifact,download-artifact)github-actionsecosystem to DependabotCI/CD (Medium)
timeout-minutes: 30to pytest workflow3.13) in pre-commit CIPackaging (Medium)
Pre-commit (Medium)
check-yaml,check-toml,check-merge-conflicthooksC++ cleanup (Medium)
std::cerrlines (errors already thrown via exceptions)Tests (Medium)
conftest.pywithsys.pathsetuptest_MaterialConstructors.py(8 new tests for Material, TMM, public API)Commit 2: Sphinx modernization (
b9214d6)autosummary_generatenumpydoc_xref_param_type = False)ref.anywarnings for parameter-name references:any:→ explicit:class:roles.pyxMakefile/make.batfuroto dev dependenciesCommit 3: Docstring fixes (
e8c7d04)_SecondOrderNLIntensities: P1/P2 descriptions were swapped_WaveSweepResultSecondOrderNLTMM: P2 attribute was listed as P1_NonlinerLayer→_NonlinearLayerclass referenceWaveGetFields2D: param name "dir" → "dirStr" to match actual signature:any:roles with explicit:class:,:meth:,:attr:, or backtick literalsValidation