Git Product home page Git Product logo

easydev's Introduction

Hi there

  • ๐Ÿ”ญ Iโ€™m currently actively working on Sequana and also maintaining BioServices, Damona, Fitter, colormap, spectrum, Bioconvert and easydev.
  • I'm currently leading the bioinformatics and data management activities of the Biomics NGS platform (biomics.pasteur.fr) building pipelines and tools for production.
  • ๐Ÿ‘ฏ Iโ€™m looking to collaborate on BioConvert, BioServices and Damona and of course Sequana. Would you be interested to take the lead on Spectrum, fitter, colormap, please let me know.

easydev's People

Contributors

cokelaer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

easydev's Issues

the __version__ does not match the installed version

easydev '0.9.36' has been installed but version is stuck to '0.9.34'

Python 3.6.3 (default, Jan  9 2018, 19:10:54) 
[GCC 5.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import easydev
>>> easydev.__path__
['/tmp/bioconvert/lib64/python3.6/site-packages/easydev']
>>> easydev.__version__
'0.9.34'
>>> 

(bioconvert) bneron@musky:~$pip show easydev
Name: easydev
Version: 0.9.36

multicore

The multicore uses a Pool method. One major issue is that it does not allows keyboard interruption. It seems to be inherent to how the join() method of the multiprocessing (Python) module handles KeyboardInterrupt exception.

After some searches, the solution is to initialise the Pool with a init_worker

 def init_worker():
     import signal
     signal.signal(signal.SIGINT, signal.SIG_IGN)

Logging class deletes existing logging configuration

I just found Bioservices a few weeks ago and I think it is a great project. Thanks for all your work.

I started using bioservices.eutils in a project and noticed that as soon as I instantiate EUtils I no longer get any debug messages from any loggers in my project. It looks like the Logging class from easydev is deleting the logging configuration my script established.

I think lines 72 and 73 in logging_tools.py are the problem. It would be helpful if this behavior were optional.

colorlog has no attribute logging.

It seems when you import the latest bioservices, I get the following error.

AttributeError                            Traceback (most recent call last)
/var/folders/51/0w_3wxsx13s1kzbm_btb5bbw0000gn/T/ipykernel_79890/3845901339.py in <module>
----> 1 biomodels = BioModels()

~/.venv/lib/python3.9/site-packages/bioservices/biomodels.py in __init__(self, verbose)
     99 
    100         """
--> 101         super(BioModels, self).__init__(name="BioModels", url=BioModels._url, 
    102                                         verbose=verbose)
    103     def _check_format(self, frmt, supported=['json', 'xml', 'html']):

~/.venv/lib/python3.9/site-packages/bioservices/services.py in __init__(self, name, url, verbose, cache, requests_per_sec, proxies, cert, url_defined_later)
    455     def __init__(self, name, url=None, verbose=True, cache=False,
    456         requests_per_sec=3, proxies=[], cert=None, url_defined_later=False):
--> 457         super(REST, self).__init__(name, url, verbose=verbose,
    458             requests_per_sec=requests_per_sec,
    459             url_defined_later=url_defined_later)

~/.venv/lib/python3.9/site-packages/bioservices/services.py in __init__(self, name, url, verbose, requests_per_sec, url_defined_later)
    340     def __init__(self, name, url=None, verbose=True, requests_per_sec=3,
    341                  url_defined_later=False):
--> 342         super(RESTbase, self).__init__(name, url, verbose=verbose,
    343             requests_per_sec=requests_per_sec,
    344             url_defined_later=url_defined_later)

~/.venv/lib/python3.9/site-packages/bioservices/services.py in __init__(self, name, url, verbose, requests_per_sec, url_defined_later)
    120         self.requests_per_sec = requests_per_sec
    121         self.name = name
--> 122         self.logging = Logging("bioservices:%s" % self.name, verbose)
    123 
    124         self._url = url

~/.venv/lib/python3.9/site-packages/easydev/logging_tools.py in __init__(self, name, level, text_color)
     51              style='%'
     52         )
---> 53         self._set_name(name)
     54 
     55         logger = colorlog.getLogger(self._name)

~/.venv/lib/python3.9/site-packages/easydev/logging_tools.py in _set_name(self, name)
     63         logger = colorlog.getLogger(self._name)
     64         if level == 0:
---> 65             self._set_level("WARNING")
     66         else:
     67             self._set_level(level)

~/.venv/lib/python3.9/site-packages/easydev/logging_tools.py in _set_level(self, level)
     86         if level == 50:
     87             level = "CRITICAL"
---> 88         logging_level = getattr(colorlog.logging.logging, level)
     89         colorlog.getLogger(self.name).setLevel(level)
     90 

AttributeError: module 'colorlog' has no attribute 'logging'

mock in test_appdirs.py

Would you please consider to make mock usage optional in favour of unittest.mock as in test_browse.py?

add a install_github function

Here is a possible API

install_github(repo)
install_github([repo, repo2])
install_github(repo, repo2)
install_github(path=where_to_put, auth_token="abc")

multigit

  • add missing options: directories, exclude-directories,
  • provide executable
  • independent tool ?

Inconsistent licensing

Project license is identified as BSD-3-Clause in both https://github.com/cokelaer/easydev/blob/master/COPYING and https://github.com/cokelaer/easydev/blob/master/setup.py, but the license headers in most source code files still explicitly mention GPL-3.0, e.g. https://github.com/cokelaer/easydev/blob/master/easydev/__init__.py#L10. Can you please clarify whether those GPL-3.0 licensing statements are still valid, or whether they should be fixed to reflect the actual license?

pypi archive contains the python cache files from the sdist call

Because in the manifest.in there is line recursive-include easydev/share * it will include the pycache folder too.

Linters found it when I packaged it from openSUSE:

[    8s] python2-easydev.noarch: W: python-bytecode-wrong-magic-value /usr/lib/python2.7/site-packages/easydev/share/__pycache__/__init__.cpython-35.pyc expected 62211 (2.7), found 3350 (3.5)
[    8s] python3-easydev.noarch: W: python-bytecode-wrong-magic-value /usr/lib/python3.7/site-packages/easydev/share/__pycache__/__init__.cpython-35.pyc expected 3390 or 3391 or 3392 or 3393 or 3394 (3.7), found 3350 (3.5)

autocompletion in IPython is broken under windows

This happen in version 0.9.10 when colorama was used to provide colors in the text printing.
Under unix and max it seems to work well. In the console module, we do
import colorama
colorama.init()

And that's when it broke. So, we will probably remove colorama and find another solution. Sphinx or snakemake seems to do a good job.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.