Skip to content

DOCS: Add contributing entrypoint - #836

Merged
mmcky merged 2 commits into
QuantEcon:mainfrom
wenlei0603:codex/add-contributing-entrypoint
Jul 8, 2026
Merged

mmcky merged 2 commits into
QuantEcon:mainfrom
wenlei0603:codex/add-contributing-entrypoint

Conversation

@wenlei0603

Copy link
Copy Markdown
Contributor

Summary

  • add a root CONTRIBUTING.md entrypoint for GitHub's contributing-guidelines link
  • point contributors to the rendered Read the Docs guide and the source docs/source/contributing.rst

Context

This addresses the root CONTRIBUTING.md suggestion from #834 without duplicating the full contributing guide in two places.

Validation

@mmcky mmcky changed the title [codex] Add contributing entrypoint DOCS: Add contributing entrypoint Jul 7, 2026
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 93.561%. remained the same — wenlei0603:codex/add-contributing-entrypoint into QuantEcon:main

@mmcky
mmcky requested a review from Copilot July 8, 2026 00:52
@mmcky
mmcky marked this pull request as ready for review July 8, 2026 00:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a root-level CONTRIBUTING.md so GitHub can surface the repository’s contributing guidelines, while keeping the canonical guidance in the documentation (Read the Docs + docs/source/contributing.rst) to avoid duplication.

Changes:

  • Introduces a new root CONTRIBUTING.md entrypoint for GitHub’s contributing-guidelines link.
  • Links contributors to the rendered Read the Docs guide and the in-repo source docs/source/contributing.rst.

mmcky added a commit that referenced this pull request Jul 8, 2026
* DOC: Refresh contributing guide and fix stale docs build config

Partner to #836 (root CONTRIBUTING.md entrypoint) and addresses part of
#834 (review contributing/developer docs for completeness).

contributing.rst
- Correct an out-of-date claim: the PR docs preview is built by Read the
  Docs, not "one of the GitHub Actions" (there is no docs-building GHA
  workflow).
- Add the concrete commands the guide only described in prose: clone +
  `conda env create -f environment.yml`, an editable `flit install
  --symlink`, running tests (`pytest`) and style checks (the exact CI
  `flake8 --select=F401,F405,E231 quantecon`), and building the docs
  (`pip install -r docs/rtd-requirements.txt` then `make html`).
- Use https for the issue-tracker and Discourse links; strip trailing
  whitespace.

conf.py
- Remove the dead `import pip` / `mock` block. It used `pip.main()`
  (removed in pip 10) and produced a `MagicMock` that nothing uses (the
  MOCK_MODULES section below it is fully commented out) -- a latent
  build hazard for no benefit.
- Fix the `numydoc_show_class_members` typo (-> `numpydoc_`), which was
  silently ignored.
- Modernise the deprecated intersphinx mapping to the current form
  `{'python': ('https://docs.python.org/3', None)}`.

index.rst
- Add `optimize` to the intro prose (it was in the toctree but missing
  from the module description); strip a trailing-whitespace line.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* DOC: Point API reference at implementation modules, not deprecated shims

qe_apidoc.py globbed `../quantecon/[a-z0-9]*.py` for the base-level
"tools" pages, which matches the lowercase compatibility shims
(`arma.py`, `lqcontrol.py`, ...) and excludes the real implementation
modules (`_arma.py`, `_lqcontrol.py`, ...). The generated stubs
therefore ran `.. automodule::` against modules that are marked "not
meant for public use and will be removed v0.8.0", carry no module
docstrings, and emit a DeprecationWarning on every attribute access
during the docs build.

- Add `base_module_target()` to qe_apidoc.py: a base-level module name
  maps to `_<name>` when `quantecon/_<name>.py` exists (21 modules),
  and stays as-is otherwise (`distributions`, `quad`). Page names and
  toctrees are unchanged; only the automodule target moves.
- Regenerate the committed stubs: 21 files under docs/source/tools/
  now target the implementation modules, whose real docstrings render.
  Read the Docs builds from the committed stubs (it does not run
  qe_apidoc.py), so the regeneration is required, not just cosmetic.
- Sync `split_index_template` in qe_apidoc.py with the index.rst edits
  from the previous commit (add `optimize` to the prose, drop the
  trailing-whitespace line). `make html` regenerates index.rst from
  this template, so without this the hand-edit would be silently
  reverted on the next local docs build. Regeneration now reproduces
  the committed index.rst byte-for-byte.
- Fix `all_auto()` (the `single` mode): it called `gen_module()`, which
  is not defined anywhere in the file, so the mode died with NameError.
  Write the module template directly, matching the default mode.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* DOC: Show public quantecon.* names in API reference

Follow-up to review feedback on this PR: documenting the private
implementation modules (``.. automodule:: quantecon._arma``) leaked the
private module name into the rendered headings, e.g.
``class quantecon._arma.ARMA(...)``.

Instead document the public objects in the ``quantecon`` namespace via
``.. currentmodule:: quantecon`` plus explicit ``autoclass`` /
``autofunction`` directives derived from each shim's ``__all__``, so the
headings render as ``quantecon.ARMA`` -- the namespace the shim's own
deprecation message points users to. The real docstrings still render,
the deprecated shim is never imported during the build, and the private
``_module`` name no longer appears.

qe_apidoc.py now classifies each ``__all__`` entry as class/function by
parsing (not importing) the implementation module, so the generator
stays import-free. Regenerated the 21 shim-backed stubs; genuinely
public base modules (``distributions``, ``quad``) keep their
``automodule`` directive.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
@mmcky

mmcky commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

thanks for setting up a CONTRIBUTING.md document @wenlei0603.

@mmcky
mmcky merged commit b897dcb into QuantEcon:main Jul 8, 2026
11 checks passed
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.

4 participants