You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe I'm reinventing the wheel here, but if I add this to the top of aviary/aviary.py
+import os
+import sys
+
+if __name__ == '__main__':
+ # Should only be here when not pip installed.
+ __version__ = 'dev'
+ # Put aviary first on the path to avoid Python choosing the wrong aviary
+ # import along the lines of
+ # https://stackoverflow.com/questions/54333865/python-no-module-named-error-package-is-not-a-package
+ sys.path = [os.path.dirname(os.path.realpath(__file__))+'/../'] + sys.path
+else:
+ from .__init__ import __version__
Then I can run it directly rather than having to run pip install -e . like so
So the point of using pip install -e . is that the -e treats the current directory as the install directory. So you can make changes on the fly and they are automatically installed, which is very helpful for debugging. A normal aviary installation would just run pip install . or the pip package name or the conda install. I see the benefit of this, but I'm not in a rush to add it. So if you want to make a PR and can guarantee that it won't negatively impact the rest of the code base then I'm fine with it being added.
If you want to target a specific rule then there is the -w flag. You just add -w to your aviary command then a list of rules that you want to target and it will spin up an aviary run targeting each one specifically in order
Hey,
Maybe I'm reinventing the wheel here, but if I add this to the top of aviary/aviary.py
Then I can run it directly rather than having to run
pip install -e .
like soUseful for debugging.
Happy to make a PR ofc.
Relatedly, is there a way to specify a target for the snakemake? When debugging or otherwise that would be useful so extraneous rules aren't run.
TIA.
The text was updated successfully, but these errors were encountered: