Conversation
|
@aazuspan, I took a bit of a tangent this week to get |
There was a problem hiding this comment.
Pull Request Overview
This PR adds four new properties to ConstrainedOrdination to expose species and site statistics (abundance and Hill's N2 diversity), simplifying their use in pynnmap.
- Added species_weights and species_n2 properties for species-level metrics.
- Added site_weights and site_n2 properties for site-level metrics.
- Bumped the version in about.py from 0.1.0a2 to 0.1.0a3.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/sknnr/transformers/_cca.py | Added properties for species and site statistics to the CCA transformer. |
| src/sknnr/about.py | Updated the version to support pynnmap requirements. |
aazuspan
left a comment
There was a problem hiding this comment.
@grovduck, that's very exciting that sknnr's starting to get integrated into pynnmap!
I disagreed with the Copilot reviews about zero division errors since I think you've already covered that contingency, but we could leave those in for redundant safety if you prefer. Other than that, LGTM.
Do you want to make the PyPI release once this is merged?
Good catch. Yep, you're absolutely right. I'm a bit too reliant on AI code changes.
I will certainly give it a shot! Fingers crossed I don't screw anything up. |
|
Let me know if you run into issues! FYI I'm trying to set up a workflow on another package (aazuspan/eerepr#65) to automate PyPI releases. If that works well there, I can get it set up for |
|
@aazuspan, I got it released on PyPI, but curious how you typically publish. It sounds like there are a bunch of different ways including:
I created the API key to just have upload permission on but then it looks like you would need to modify the but that would affect both of us, so that didn't seem like a great solution. Finally I tried to set it temporarily in my shell: and then run
EDIT: Sorry, I totally missed this response before writing this. Automating this workflow sounds cool. I see the section: Is that all it takes?? |
No, I ran into the same complications you did and have just been using I think the workflow is definitely a better approach since it removes the token entirely and delegates authentication to Github - the only way to make a release is to have authority to push tags to the repository.
There's also some setup required on the PyPI side to add the Github repository as a "Trusted publisher", but once that's done the workflow seemed to run perfectly. I'll make a PR to add that workflow and update the contributing guide. |
This PR adds four additional properties to
sknnr.transformers._cca.ConstrainedOrdination. The properties are standard output used in pynnmap ordination files even though they aren't directly used in the CCA transformation. Rather than calculate these independently inpynnmap, it's more convenient to expose these as properties insknnreven if they are rarely used.The properties added are:
Because
pynnmapis reliant upon this change happening (lemma-osu/pynnmap#14), I'm bumping the version to0.1.0a3as well.