Repository navigation
Closed
Milestone
Description
I'd like to have some organization around the upcoming release. I'd like to have a list of all planned and included changes for v0.7 Please edit this for anything I forgot!
New features
- DataFrames everywhere
- Views of views Views take around as much memory as object #62
obsp,varpfor pairwise measures Backwards breaking change: Sparse observation and variables annotation #136- Allow sparse data and dataframes in
.obsm,.varm,.layers,.unsadata.uns dataframe gets converted into numpy.ndarray when saving and loading h5ad #134 - Updated
h5adspec (with backwards compatable reading) - Lazy views for faster subsetting
- Better test coverage
Breaking changes
- Modifying sparse
.Xinplace via a view, even if value was set with dense - Indexing into
AnnDataobject will not reduce dimensionality of contained arrays
TODO:
- Unbreak zarr implemntation (broken in [WIP] IO refactor #167)
- Restructure views, to allow views of view (merge Views of views #164)
- Standardize results of indexing into
AnnData(merge Views of views #164) (always 2d) inconsistent slicing of .X vs .layer #145 - Add in
obsp,varpattributes (uncomment) - Fix dense as sparse reading for h5ad
- Appropriate warnings for changed behaviour
- Make sure
scanpyand others work with new behaviour - deprecate
rename_categories
Reacted by Philipp A., Gökçen Eraslan and Alex Wolf
Metadata
Metadata
Assignees
Labels
No labels
Activity
flying-sheep commentedon Jun 27, 2019
Do we want “2d only” (the second breaking change) in something called 0.7?
I think to signal a breaking change and closeness to 1.0, we could name this version 0.90 or so!
(not 0.99, because then we’ll end up having 0.999, 0.9999, …)
flying-sheep commentedon Jun 27, 2019
Another change we could think about: unifying .layers and .X
Maybe .X should just be a property returning the first layer? or the layer called
X?ivirshup commentedon Jun 28, 2019
I would understand the change from
v0.6.xtov0.7to involve breaking changes. I don't like the idea of going tov0.90since it breaks from semantic versioning. Also, who knows, we may wantv0.8-v0.20. For example, I'd say the possibility of having.Xbe one of.layerssounds like a greatv0.8target to me, since it would require us to allow layers to be backed, and that'll take some time.I would have to know that this was a dramatic change that broke a lot of stuff before thinking any out of the ordinary versioning semantics were used. The change to always 2d doesn't break many tests here or for scanpy. Additionally
scvelomostly runs with it.I do think we should do a
v0.6.22release of AnnData andv1.4.4of scanpy, so there's a version with workingscipy/statsmodelsdependencies without this change. This would also give us space to transition users to{obs,var}_vector, since that will return a 1d array now, and once "always 2d" is in effect.flying-sheep commentedon Jun 28, 2019
Well, if the fallout isn’t that bad, I agree, we can just call it 0.7
That being said, skipping from
0.6.xto0.90is completely compatible with semantic versioning. Why do you think it wasn’t? (And instead of 0.8, the next version would just be called0.91)falexwolf commentedon Jun 29, 2019
@ivirshup: Agreed with everything! Terrific! Agreed in particular with
0.6.22and1.4.4before moving to1.5and0.7. In0.6.22, where the flattening is still present, can you add a warning future versions will not flatten.Xanymore when it's called?ivirshup commentedon Jun 30, 2019
@flying-sheep, I suppose
v0.90would be compatible with establishing the order of versions, but I think of "incrementing the version" to imply incrementing on a fixed scale. I think my reaction to seeing a version change fromv0.6.22tov0.7.0would be "there are breaking changes in this release", whilev0.6.22tov0.90.0would be "what does this mean? What happened tov0.7-v0.89"?ivirshup commentedon Jul 4, 2019
I've added that warning, what else has to be done before we can release
0.6.22?falexwolf commentedon Jul 4, 2019
Nothing, I think. I'm happy to make the release if you don't want to do it. 🙂
ivirshup commentedon Jul 5, 2019
Just realized there are probably a couple bugs to fix prior to that:
_get_obs_array(Fixed by Allow asking for a key of obs when use_raw=True in deprecated _get_{obs,var}_array #176)This doesn't actually happen, something else inobs_vectorprobably shouldn't throw a warning telling you to useobs_vector😜sc.pl.scatterwas causing this I think.sc.pp.scalemake a copy if it's called on a view? It currently does not if called on dense data, but does on sparse data. I think it should always make a copy if its on a view.RawfromanndataWhat do we export? #174falexwolf commentedon Jul 5, 2019
Great that you're addressing these!
Agreed!
ivirshup commentedon Jul 6, 2019
I think we're good for
0.6.22. Scanpy will need a pass to remove warnings being thrown forv1.4.4though. Would you mind making this release @falexwolf?falexwolf commentedon Jul 6, 2019
Made release
0.6.22for the current state of master: https://github.com/theislab/anndata/commit/34e8616fd92b893bdd8e4b6d4036830270961d19/, https://github.com/theislab/anndata/releases, https://pypi.org/project/anndata/#history. 🙂Fix access to raw.X by .raw.{obs,var}_vector
Fix access to raw.X by .raw.{obs,var}_vector
flying-sheep commentedon Jul 10, 2019
It would be great if you could start publishing wheels too, it’s almost no additional work:
python3 setup.py sdist bdist_wheel twine upload dist/anndata-0.7{.tar.gz,-py3-none-any.whl}I always have to go back and retroactively make wheels.
5 remaining items
ivirshup commentedon Sep 6, 2019
Just push a big update which cleans up the reading and writing code a lot, as well as improving performance. It does make some changes to the on disk structure, but you should be able to read older files. Added features mean you can now have data frames and sparse matrices stored in any of the
obsm,varm,layersetc.It would be great if people could try out current master and let me know if they find any bugs!
flying-sheep commentedon Nov 6, 2019
OK, so should we get this out before the X-layers merge (#244) and the modes (#237) land?
ivirshup commentedon Nov 7, 2019
Yes! I need to take another look at fixing scverse/scanpy#832 before this can go though. I'm going to check if there's any chance this could get sorted upstream first.
flying-sheep commentedon Dec 22, 2019
Hmm, we should deprecate
rename_categories, as it’s no longer necessary with the new categorical storage. I’ll do this before releasing the rc.LuckyMD commentedon Dec 22, 2019
What is the alternative to
rename_categories? I'm using it quite a lot. It works both on the categoricals for theobsorvarcolumn, but also on anyrank_genes_groups()results that are generated, no?flying-sheep commentedon Dec 23, 2019
For
.obs/.varit’s superfluous, just do:For the
.unsstuff, we need to find another way, this is a scanpy convention and doesn’t belong into AnnData. Either move it to scanpy or store it in a way that allows to do.uns[...].rename_categories(...)LuckyMD commentedon Dec 23, 2019
The nice thing about
rename_categoriesas it is at the moment is that it renames the.unsand.obs/.varstuff in a single command.flying-sheep commentedon Dec 23, 2019
We just (pre-)released AnnData 0.7rc1 with it deprecated. We should move the code to scanpy as a documented utility I think.
flying-sheep commentedon Dec 30, 2019
Alex reverted stuff on master because there’s no alternatives, so my idea of our path forwards is now:
utils.rename_categories(or so) andupdate_anndata(or so)update_anndata) andscanpy.utils.rename_categories.falexwolf commentedon Dec 30, 2019
Could we try to have a discussion instead of you making absolute statements?
flying-sheep commentedon Dec 30, 2019
Sorry for not outlining this clearly enough, I was busy celebrating Christmas and my birthday!
OK, so we have two changes that need to happen (at least in the long, if not short run). We should only have the deprecations in the final anndata 0.7 release if we manage to get the correct behavior into anndata and scanpy quickly enough.
rename_categories, we should allow storing arrays with a categorical dtype in .uns, right? You said in Slack that this is a difficult change. Can you elaborate why?update_anndata.I’d like 2 to happen before the next release because obsp/varp exists already and we need to keep people from relying on the old behavior.
flying-sheep commentedon Jan 22, 2020
OK, seems like we got it. Now to all the exciting changes enabled by this!