Closed spoonsso closed 5 years ago
Almost done with this. Would you mind if we started using a linter? It makes it easier to keep track of file dependencies. I like flake8, but we can use any one you want.
Sounds good. I've never used a linter but am excited to learn.
On Wed, Jun 19, 2019, 3:31 PM Diego Aldarondo notifications@github.com wrote:
Almost done with this. Would you mind if we started using a linter? It makes it easier to keep track of file dependencies. I like flake8, but we can use any one you want.
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/spoonsso/DANNCE/issues/3?email_source=notifications&email_token=AAW2P47UER3NTTX6BQLZPMLP3KCQBA5CNFSM4HYNM5WKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYDBMIA#issuecomment-503715360, or mute the thread https://github.com/notifications/unsubscribe-auth/AAW2P44LMVAPEWYNQUFN6HLP3KCQBANCNFSM4HYNM5WA .
Can you set it up, or tell me how?
On Wed, Jun 19, 2019, 6:18 PM Tim Dunn dunn.tw@gmail.com wrote:
Sounds good. I've never used a linter but am excited to learn.
On Wed, Jun 19, 2019, 3:31 PM Diego Aldarondo notifications@github.com wrote:
Almost done with this. Would you mind if we started using a linter? It makes it easier to keep track of file dependencies. I like flake8, but we can use any one you want.
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/spoonsso/DANNCE/issues/3?email_source=notifications&email_token=AAW2P47UER3NTTX6BQLZPMLP3KCQBA5CNFSM4HYNM5WKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYDBMIA#issuecomment-503715360, or mute the thread https://github.com/notifications/unsubscribe-auth/AAW2P44LMVAPEWYNQUFN6HLP3KCQBANCNFSM4HYNM5WA .
Yeah, it's usually done through your editor. I like Atom because its real pretty and supports a lot of extensions, including linters. It should also be supported in other common editors, like sublime, pycharm, spyder, etc. but I've never set a linter up for those.
Here's a snippet I use to setup the Atom editor and linter, as well as a python autocompleter (it can be tricky to get the autocomplete to work sometimes). I used it for Ubuntu 18.04, but I think it should also work for 16.04. I think the only requirements is pip.
# Set up Atom editor
sudo wget -O atom-amd64.deb https://atom.io/download/deb
sudo apt install gdebi-core
sudo gdebi atom-amd64.deb
rm atom-amd64.deb
# Install the flake8 linter and python autocomplete Atom packages
pip install flake8
apm install linter
apm install linter-flake8
pip install flake8-docstrings
apm install autocomplete-python
After that just navigate through the editor to packages and make sure that the python path for flake8 is pointing to your system python (you can also set it up to point to whichever python is active in your environment, but I find this to be simpler). Here is the linter-flake8 page with instructions on how to do that if you want to, as well as more detailed setup instructions than the ones I gave.
Looks great! Thanks
Rather than use sys.path.append(), import modules with proper init.py
https://github.com/spoonsso/DANNCE/blob/c687217f5d196ddf4968db0f2a337db11931d595/predict_COMfinder.py#L8-L10