COBREXA / AbstractFBCModels.jl

General interface for flux-based constrained metabolic models
Apache License 2.0
0 stars 1 forks source link

Need to always type name of package to use accessors #23

Open HettieC opened 2 months ago

HettieC commented 2 months ago

Hello again

Presumably it was an intentional decision, but it's inconvenient having to always use, for example, AbstractFBCModels.genes() when using model accessors, instead of just genes(). Obviously you can import AbstractFBCModels as A and then only need A.genes() but that is still unwieldy...

Would be nice if functions could be exported in the package so that they can be used in COBREXA in the same way as in v1.

exaexa commented 2 months ago

Hi,

because there are many packages that talk about say genes we decided not to automatically spoil everyone's global namespace with short identifiers. :sweat_smile:

There are 2 solutions, you can do either:

import AbstractFBCModels: genes, reactions, stoichiometry

which gives you genes() etc, but you still need to name them

As the other solution we might do an extra module that re-exports everything, such as

using AbstractFBCModels.Everything

which just spoils the namespace.

OTOH current AbstractFBCs don't really export anything so maybe we might rely on users on the using vs import...

@stelmo any strong opinion here? I guess we could probably just export stuff.

HettieC commented 2 months ago

The option to export everything would be nice, then it's up to the user if they make a big mess or not :smile:

exaexa commented 2 months ago

yap, there should always be that option, right :]

I'll see ASAP.

HettieC commented 2 months ago

Thanks!