Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation overhaul and update to fast converter function generation #49

Merged
merged 8 commits into from
Jan 29, 2025

Conversation

taldcroft
Copy link
Member

@taldcroft taldcroft commented Jan 24, 2025

Description

  • Use pydata sphinx theme
  • Improve overall organization
  • Remove or move some outdated content
  • Change API docs to use sphinx-autoapi
    • Remove all the curated API doc pages.

Update to fast converter functions

A substantial code change was driven by API autodocs. This was to change from dynamically-generated functions like date2secs to the same code-generated functions which now live as static functions in converters.py. This is accomplished via a new script make_converters.py.

The dynamically generated functions were not visible to the API autodocs and didn't show up.

These are all covered in unit testing.

Output

See: https://cxc.cfa.harvard.edu/mta/ASPECT/tests/cxotime/pr49/

Requires

  • sphinx-autoapi
  • pydata-sphinx-theme
  • sphinx-copybutton

Interface impacts

None.

Testing

Unit tests

  • Mac
(ska3-flight-2025.0rc2) ➜  cxotime git:(docs-pydata-autoapi) git rev-parse --short HEAD
23c8f0b
(ska3-flight-2025.0rc2) ➜  cxotime git:(docs-pydata-autoapi) pytest
=========================================================================== test session starts ============================================================================
platform darwin -- Python 3.12.8, pytest-8.3.4, pluggy-1.5.0
rootdir: /Volumes/git
configfile: pytest.ini
plugins: doctestplus-1.3.0, anyio-4.7.0, timeout-2.3.1
collected 250 items                                                                                                                                                        

cxotime/tests/test_cxotime.py ...................................................................................................................................... [ 53%]
.....................................................................................................                                                                [ 94%]
cxotime/tests/test_cxotime_linspace.py ...............                                                                                                               [100%]

=========================================================================== 250 passed in 1.50s ============================================================================

Independent check of unit tests by Jean

  • osx arm64
(2025.1rc1) flame:cxotime jean$ git rev-parse HEAD
7831110696f3db9c0ff118665a60bd58ee2ae07b
(2025.1rc1) flame:cxotime jean$ pytest
============================================================= test session starts =============================================================
platform darwin -- Python 3.12.8, pytest-8.3.4, pluggy-1.5.0
rootdir: /Users/jean/git
configfile: pytest.ini
plugins: anyio-4.7.0, timeout-2.3.1
collected 250 items                                                                                                                           

cxotime/tests/test_cxotime.py ......................................................................................................... [ 42%]
..................................................................................................................................      [ 94%]
cxotime/tests/test_cxotime_linspace.py ...............                                                                                  [100%]

============================================================= 250 passed in 1.70s

Functional tests

Building docs generates no visible warnings and no errors.

@taldcroft taldcroft changed the title Docs pydata autoapi Documentation overhaul Jan 24, 2025
@jeanconn jeanconn requested a review from Copilot January 28, 2025 17:55
Copy link
Contributor

@jeanconn jeanconn left a comment

Choose a reason for hiding this comment

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

From my perspective the PR description doesn't really address what's going on with converters.

@taldcroft taldcroft changed the title Documentation overhaul Documentation overhaul and update to fast converter function generation Jan 29, 2025
@taldcroft
Copy link
Member Author

From my perspective the PR description doesn't really address what's going on with converters.

Good point, fixed.

@taldcroft taldcroft merged commit a724f62 into master Jan 29, 2025
2 checks passed
@taldcroft taldcroft deleted the docs-pydata-autoapi branch January 29, 2025 10:56
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.

2 participants