Skip to content

tests(topostats): Compare versions as strings#136

Merged
ns-rse merged 1 commit intomainfrom
ns-rse/topostats-version-tweak
Apr 24, 2025
Merged

tests(topostats): Compare versions as strings#136
ns-rse merged 1 commit intomainfrom
ns-rse/topostats-version-tweak

Conversation

@ns-rse
Copy link
Copy Markdown
Collaborator

@ns-rse ns-rse commented Apr 23, 2025

Compares versions of .topostats as strings with a view to moving to storing the version of TopoStats that .topostats files were created in as a field in the HDF5 .topostats file itself.

Strings seem to be compared logically...

In [1]import topostats

In [2]: topostats.__release__
Out[2]: '2.3.2'

In [3]: topostats.__release__ > "0.2"
Out[3]: True

In [4]: "0.2.1" > "0.2"
Out[4]: True

In [5]: "0.2.0" >= "0.2"
Out[5]: True

@ns-rse ns-rse added the topostats Loading the .topotats file format label Apr 23, 2025
@ns-rse ns-rse marked this pull request as draft April 23, 2025 15:44
@ns-rse ns-rse marked this pull request as ready for review April 23, 2025 15:44
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.88%. Comparing base (ac9753c) to head (cf2928b).
Report is 116 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #136      +/-   ##
==========================================
+ Coverage   74.62%   76.88%   +2.25%     
==========================================
  Files           8       10       +2     
  Lines         607      783     +176     
==========================================
+ Hits          453      602     +149     
- Misses        154      181      +27     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread AFMReader/topostats.py Outdated
Compares versions of `.topostats` as strings with a view to moving to storing the version of TopoStats that `.topostats`
files were created in as a field in the HDF5 `.topostats` file itself.

Strings seem to be compared logically...

```python
In [1]import topostats

In [2]: topostats.__release__
Out[2]: '2.3.2'

In [3]: topostats.__release__ > "0.2"
Out[3]: True

In [4]: "0.2.1" > "0.2"
Out[4]: True

In [5]: "0.2.0" >= "0.2"
Out[5]: True
```
@ns-rse ns-rse merged commit c5bf96d into main Apr 24, 2025
13 checks passed
@ns-rse ns-rse deleted the ns-rse/topostats-version-tweak branch April 24, 2025 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topostats Loading the .topotats file format

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants