Skip to content

Docs, tests, and CI: API reference, unit test coverage, and documentation updates#71

Open
charliekilpatrick wants to merge 3 commits intomainfrom
dev
Open

Docs, tests, and CI: API reference, unit test coverage, and documentation updates#71
charliekilpatrick wants to merge 3 commits intomainfrom
dev

Conversation

@charliekilpatrick
Copy link
Collaborator

Description

This PR merges the dev branch into main, bringing in Sphinx API documentation, a larger unit test suite with integration markers, CI/workflow updates, and refreshed README/contributing docs.

Documentation

  • Sphinx API reference added under docs/source/api/: generated RST for all instruments (BINOSPEC, DEIMOS, F2, FOURSTAR, GMOS, IMACS, LRIS, MMIRS, MOSFIRE, base instrument), primitives (absphot, calibration, image_procs, photometry, solve_wcs, sort_files), scripts (download_anet_index, download_gemini_data, download_keck_data, main_pipeline), and utils (logger, options, utilities).
  • Installation and index (docs/source/installation.rst, docs/source/index.rst) updated with testing instructions (unit vs integration), links to README/CONTRIBUTING, and deployment note.
  • docs/DEPLOY.md added with steps to enable GitHub Pages and deploy docs to https://ciera-transients.github.io/POTPyRI/.
  • README updated: testing (unit vs integration, CI behavior), documentation section (online + local + deploy), and contributing (dev branch).
  • CONTRIBUTING.md updated: branching from dev, offline test command, and PR target branches.

Testing

  • Integration markers: Five tests that download fixtures from Google Drive are now @pytest.mark.integration (e.g. test_absphot, test_cal, test_photometry, test_sort, test_wcs_integration). Run pytest tests -m "not integration" for unit-only (no network).
  • New unit tests:
    • tests/test_instruments.pyinstrument_getter (unsupported instrument), Instrument base and GMOS: match_type_keywords, needs_sky_subtraction, getters (pixscale, rdnoise, gain, target, filter, exptime, ampl, binning, out_size, time, number, instrument_name, catalog), format_datasec, raw_format, naming helpers (stk/sci/bkg, mbias/mdark/mflat/msky).
    • tests/test_options.pyinit_options, add_paths (raises when path missing, creates dirs).
    • tests/test_utilities.pyfind_catalog (PS1, 2MASS, SDSS, UKIRT, SkyMapper, unsupported filter), is_number, parse_coord (degrees, sexagesimal, invalid).
    • tests/test_image_procs.pytest_create_error for image_procs.create_error.
  • Bug fix: potpyri.utils.utilities.find_catalog early returns now consistently return a 6-tuple (catalog, catalog_ID, ra, dec, mag, err) to match the docstring and final return.

CI and workflows

  • Build and Test (.github/workflows/build-test.yml): runs pytest -m "not integration" so CI does not depend on external fixture downloads.
  • Documentation (.github/workflows/documentation.yml): deploy step runs only on push to main (not on pull_request), so PRs still build docs without updating the live site.

Environment and packaging

  • Conda env name standardized to potpyri in environment.yml and related docs (replacing potpyri_test).
  • pyproject.toml and package metadata/scripts remain aligned with current layout.

Scope

  • ~80 files changed; substantial additions in potpyri/ (instruments, primitives, utils), tests/, and docs/.
  • No intended change to the documented user workflow: main_pipeline INSTRUMENT DATA_PATH and options are unchanged.
  • Unit test count (excluding integration): 60. All pass with pytest tests -m "not integration".

Checklist

  • Unit tests pass: pytest tests -m "not integration"
  • Docs build locally: cd docs && make html
  • README and CONTRIBUTING reflect current setup

- Introduced test_create_error to validate the output of the create_error function.
- Enhanced test coverage for image processing functionalities.
- Updated README and CONTRIBUTING.md for clarity on testing procedures and documentation deployment.
- Added unit tests for create_error function to ensure expected behavior.
- Enhanced test_image_procs.py for better coverage of image processing features.
- Revised README and CONTRIBUTING.md to clarify testing guidelines and documentation processes.
- Added additional unit tests for create_error function to improve coverage.
- Further refined test_image_procs.py for comprehensive testing of image processing.
- Updated README and CONTRIBUTING.md to provide clearer instructions on testing and documentation practices.
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