Skip to content

auto publish to pypi on tagged commit#23

Merged
PolarBean merged 28 commits intomainfrom
small_fixes
Feb 9, 2026
Merged

auto publish to pypi on tagged commit#23
PolarBean merged 28 commits intomainfrom
small_fixes

Conversation

@PolarBean
Copy link
Member

After addressing the issues in the previous PR we are now using the same action as other brainglobe projects. The main change is I have set this repo to be a trusted publisher so we no longer require the twine api key from pypi.

@PolarBean PolarBean marked this pull request as draft December 4, 2025 15:29
@PolarBean
Copy link
Member Author

Since this PR now includes the reformatting required by the bg tests its quite a few LOC, but ofc thats just formatting changes.

@PolarBean PolarBean marked this pull request as ready for review December 4, 2025 16:14
@PolarBean PolarBean marked this pull request as draft December 4, 2025 16:17
@PolarBean
Copy link
Member Author

the ebrains storage is currently offline which this package relies on which is why the tests are failing. I'll mark it ready for review once this is back online.

@PolarBean PolarBean marked this pull request as ready for review December 5, 2025 16:52
@PolarBean
Copy link
Member Author

PolarBean commented Dec 5, 2025

this is ready for review. I believe the remote tests will fail as they are too heavy duty for a github action however I have run them locally and they are passing

This was referenced Dec 5, 2025
Copy link
Member

@IgorTatarnikov IgorTatarnikov left a comment

Choose a reason for hiding this comment

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

Just a few comments regarding consistency/standardisation throughout. Feel free to leave those as separate issues that can be fixed in future PRs.

I would also suggest changing the imports for brainglobe-ccf-translator to be absolute as opposed to relative throughout. At this point it's used interchangeably and standardising it would be nice!

Comment on lines +32 to +35
- os: macos-latest
python-version: "3.11"
- os: windows-latest
python-version: "3.11"
Copy link
Member

Choose a reason for hiding this comment

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

We typically have these set to 3.13 (or the latest compatible version of Python being tested)

segmentation_file=dictionary["segmentation_file"],
)
except:
except Exception:
Copy link
Member

Choose a reason for hiding this comment

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

Catching a broad exception is best avoided. Could this be made more specific?


ccft_vol.transform(target_age, "perens_multimodal_lsfm")
ccft_vol.save(rf"../demo_data/perens_lsfm_from_princeton.nii.gz")
ccft_vol.save(r"../demo_data/perens_lsfm_from_princeton.nii.gz")
Copy link
Member

Choose a reason for hiding this comment

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

The use of raw strings in ccft.Volume.save is inconsistent between tutorials/transform_brainglobe_volume.py and tutorials/view_allen_connectivity.py. I think the r can be removed here and on line 26.

save_path = os.path.expanduser(f"~/.brainglobe/deformation_fields/{space_name}")
save_path = os.path.expanduser(
f"~/.brainglobe/deformation_fields/{space_name}"
)
Copy link
Member

Choose a reason for hiding this comment

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

Could all path related functions be standardised to use the same method, (e.g. all paths are Path objects)

Copy link
Member

Choose a reason for hiding this comment

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

Is this file necessary? The instructions can be found https://brainglobe.info/community/developers/new_releases.html

name = "brainglobe_ccf_translator"
description = "a package to translate data between common coordinate frameworks"
readme = "README.md"
license = { file = "LICENSE" }
Copy link
Member

Choose a reason for hiding this comment

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

I think this is okay to keep as license = {file = "LICENSE"} or as license = {text = "MIT"} based on the NIU cookiecutter

"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"License :: OSI Approved :: MIT License",
Copy link
Member

Choose a reason for hiding this comment

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

This could stay as well based on the NIU cookiecutter

Comment on lines 113 to +117
3.9: py39
3.10: py310
3.11: py311
3.12: py312
3.13: py313
Copy link
Member

Choose a reason for hiding this comment

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

I think py39 and py310 can be dropped here

#"C90", # McCabe complexity
]
lint.ignore = [
"E501", # line too long - let Black handle formatting
Copy link
Member

Choose a reason for hiding this comment

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

Is there a specific reason to delegate to black?

* implement atlas synonyms to be more compatible with brainglobe

* return atlas synonyms among near misses

* Update README with atlas synonyms

Added information about brainglobe atlas API names and their conversions.

* precommit

* precommit and add documentation about running just one test

* add to ignore words list so that codespell doesnt think the method name is a typo

* include demba api name in autoconvert list

* update metadata and ingestion scripts to include dorr

* update readme

* run graph update script and update readme

* run graph update script and update readme

* update dorr age to p84

* update accessibility text as we are no longer using an image

* update ruff formatting

* run precommit

* precommit

* replace click with print

* add mode arg to suppress future warning

* ruff reformat

* unittest worked but pytest failed, here we introduce a fix for this

* drop workflows for 3.9 and 3.10 as they seem to run out of resources

* use atlas api to access atlas shapes

* remove license to make pre-commit happy

* Dorr mri (#27)

* include demba api name in autoconvert list

* update metadata and ingestion scripts to include dorr

* update readme

* run graph update script and update readme

* run graph update script and update readme

* update dorr age to p84

* update accessibility text as we are no longer using an image

* update ruff formatting

* run precommit

* precommit

* replace click with print

* add mode arg to suppress future warning

* ruff reformat

* unittest worked but pytest failed, here we introduce a fix for this

* drop workflows for 3.9 and 3.10 as they seem to run out of resources

* use atlas api to access atlas shapes

* remove license to make pre-commit happy

* Remove unnecessary whitespace in config.py

---------

Co-authored-by: Igor Tatarnikov <61896994+IgorTatarnikov@users.noreply.github.com>
@PolarBean PolarBean merged commit 40152a2 into main Feb 9, 2026
2 checks passed
@codecov
Copy link

codecov bot commented Feb 9, 2026

Codecov Report

❌ Patch coverage is 0% with 88 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@ca99070). Learn more about missing BASE report.

Files with missing lines Patch % Lines
brainglobe_ccf_translator/space_utils.py 0.00% 35 Missing ⚠️
brainglobe_ccf_translator/Volume.py 0.00% 13 Missing ⚠️
brainglobe_ccf_translator/VolumeSeries.py 0.00% 11 Missing ⚠️
...be_ccf_translator/deformation/apply_deformation.py 0.00% 7 Missing ⚠️
brainglobe_ccf_translator/PointSet.py 0.00% 6 Missing ⚠️
...be_ccf_translator/deformation/forward_transform.py 0.00% 5 Missing ⚠️
brainglobe_ccf_translator/config.py 0.00% 3 Missing ⚠️
...deformation/interpolation/NearestNDInterpolator.py 0.00% 3 Missing ⚠️
brainglobe_ccf_translator/read_write.py 0.00% 3 Missing ⚠️
...be_ccf_translator/deformation/route_calculation.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##             main     #23   +/-   ##
======================================
  Coverage        ?   0.00%           
======================================
  Files           ?      13           
  Lines           ?     660           
  Branches        ?       0           
======================================
  Hits            ?       0           
  Misses          ?     660           
  Partials        ?       0           

☔ 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.

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