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

Add a linspace class method #44

Merged
merged 13 commits into from
Oct 22, 2024
Merged

Add a linspace class method #44

merged 13 commits into from
Oct 22, 2024

Conversation

jeanconn
Copy link
Contributor

@jeanconn jeanconn commented Sep 25, 2024

Description

Add linspace CxoTime class method

Interface impacts

Testing

Unit tests

  • Mac
(ska3-flight-latest) flame:cxotime jean$ git rev-parse HEAD
566ee5f6a81f343cf0e490c314804ed7365fc5c3
(ska3-flight-latest) flame:cxotime jean$ pytest
========================================================= test session starts =========================================================
platform darwin -- Python 3.11.8, pytest-8.0.2, pluggy-1.4.0
PyQt5 5.15.9 -- Qt runtime 5.15.8 -- Qt compiled 5.15.8
rootdir: /Users/jean/git
configfile: pytest.ini
plugins: astropy-0.11.0, qt-4.4.0, cov-5.0.0, timeout-2.2.0, remotedata-0.4.1, anyio-4.3.0, filter-subpackage-0.2.0, doctestplus-1.2.1, astropy-header-0.2.2, hypothesis-6.112.0, arraydiff-0.6.1, mock-3.14.0
collected 250 items                                                                                                                   

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

========================================================= 250 passed in 1.42

Independent check of unit tests by [REVIEWER NAME]

  • [PLATFORM]:

Functional tests

No functional testing.

cxotime/tests/test_utils.py Outdated Show resolved Hide resolved
@jeanconn jeanconn marked this pull request as ready for review September 26, 2024 22:21
cxotime/__init__.py Outdated Show resolved Hide resolved
cxotime/utils.py Outdated Show resolved Hide resolved
@jeanconn jeanconn changed the title Add get_range_in_chunks method Add a linspace class method Oct 9, 2024
@jeanconn jeanconn marked this pull request as draft October 9, 2024 21:15
@jeanconn jeanconn requested a review from taldcroft October 10, 2024 19:20
@jeanconn jeanconn marked this pull request as ready for review October 10, 2024 19:32
cxotime/cxotime.py Outdated Show resolved Hide resolved
cxotime/cxotime.py Outdated Show resolved Hide resolved
cxotime/cxotime.py Outdated Show resolved Hide resolved
cxotime/cxotime.py Outdated Show resolved Hide resolved
cxotime/cxotime.py Outdated Show resolved Hide resolved
cxotime/tests/test_cxotime_linspace.py Outdated Show resolved Hide resolved
cxotime/tests/test_cxotime_linspace.py Outdated Show resolved Hide resolved


# Add a test that shows that the time range is covered even if the time range is less than dt_max
def test_linspace_big_step():
Copy link
Member

Choose a reason for hiding this comment

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

You already have a test of this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think I now have on "big step" test with a nonzero range and one big step with a zero range, but let me know if there's still a test you'd like to cut.

cxotime/tests/test_cxotime_linspace.py Outdated Show resolved Hide resolved
cxotime/tests/test_cxotime_linspace.py Outdated Show resolved Hide resolved
Copy link
Member

@taldcroft taldcroft left a comment

Choose a reason for hiding this comment

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

Nice, very well tested!

@jeanconn jeanconn merged commit 5dcb3e7 into master Oct 22, 2024
2 checks passed
@jeanconn jeanconn deleted the chunks branch October 22, 2024 12:56
@javierggt javierggt mentioned this pull request Nov 7, 2024
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