Skip to content

docs: fix runnable onboarding examples and commands - #432

Open
dajiaohuang wants to merge 1 commit into
daler:masterfrom
dajiaohuang:docs/onboarding-python3-20261015
Open

dajiaohuang wants to merge 1 commit into
daler:masterfrom
dajiaohuang:docs/onboarding-python3-20261015

Conversation

@dajiaohuang

Copy link
Copy Markdown

Problem

The installation page's mytest.py and the README's Python example still use Python 2 print statements. Copying either example into Python 3 fails with SyntaxError before the example can run. The installation page also names the Ubuntu package build-essentials (the package is build-essential) and instructs users to run condatest.sh, which is no longer in the repository.

The design guide additionally calls a nonexistent BedTool.intersectBed method and uses merge rather than the BEDTools mergeBed alias in its shell pipeline. Its statement that every BedTool must point to a file contradicts the documented stream=True interface.

Changes

  • Use print(...) in the two runnable onboarding examples.
  • Correct the Ubuntu package name and remove the obsolete condatest.sh subsection, retaining the existing unit/doctest instructions.
  • Correct the intersect method and merge executable names, and distinguish default file-backed results from streaming results.

No runtime code or generated documentation is changed.

Validation

  • Built and installed the source at efb8534c11ca6b45a6cd173ff3b3d1bf754e34a1 in an isolated Python 3.12.3 environment on Ubuntu 24.04, using Cython 3.3.0 and bedtools 2.31.1.
  • Confirmed both original Python examples fail to compile; the corrected installation quick test runs and produces exactly the documented three intersection rows using the bundled a.bed/b.bed fixtures.
  • Ran the corrected README pipeline with tiny synthetic local interval files, including an intergenic interval, and checked the printed names.
  • Checked synthetic public BedTool construction, coordinate/strand mutation, intersect/sort/merge, streaming/iterator consumption, saving and isolated temporary-file cleanup against real bedtools. The corrected shell pipeline matches the chained Python API result.
  • Confirmed Ubuntu package metadata contains build-essential, and the repository tree has no condatest.sh.
  • git diff --check passed.

The complete test suite, Sphinx site build and older Python/bedtools version matrix were not run. No external genomic data or chromosome-size downloads were used.

This branch has not been deployed

No deployments
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.

1 participant