Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
HettieC opened this issue Sep 11, 2024 · 4 comments
Open

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

HettieC opened this issue Sep 11, 2024 · 4 comments

Comments

@HettieC
Copy link

HettieC commented Sep 11, 2024

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
Copy link
Member

exaexa commented Sep 11, 2024

Hi,

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

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
Copy link
Author

HettieC commented Sep 11, 2024

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

@exaexa
Copy link
Member

exaexa commented Sep 11, 2024

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

I'll see ASAP.

@HettieC
Copy link
Author

HettieC commented Sep 11, 2024

Thanks!

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

No branches or pull requests

2 participants