Giter VIP home page Giter VIP logo

traitlets's Introduction

image

image

image

image

image

image

IPython: Productive Interactive Computing

Overview

Welcome to IPython. Our full documentation is available on ipython.readthedocs.io and contains information on how to install, use, and contribute to the project. IPython (Interactive Python) is a command shell for interactive computing in multiple programming languages, originally developed for the Python programming language, that offers introspection, rich media, shell syntax, tab completion, and history.

IPython versions and Python Support

Starting after IPython 8.16, we will progressively transition to Spec-0000.

Starting with IPython 7.10, IPython follows NEP 29

IPython 7.17+ requires Python version 3.7 and above.

IPython 7.10+ requires Python version 3.6 and above.

IPython 7.0 requires Python version 3.5 and above.

IPython 6.x requires Python version 3.3 and above.

IPython 5.x LTS is the compatible release for Python 2.7. If you require Python 2 support, you must use IPython 5.x LTS. Please update your project configurations and requirements as necessary.

The Notebook, Qt console and a number of other pieces are now parts of Jupyter. See the Jupyter installation docs if you want to use these.

Main features of IPython

Comprehensive object introspection.

Input history, persistent across sessions.

Caching of output results during a session with automatically generated references.

Extensible tab completion, with support by default for completion of python variables and keywords, filenames and function keywords.

Extensible system of ‘magic’ commands for controlling the environment and performing many tasks related to IPython or the operating system.

A rich configuration system with easy switching between different setups (simpler than changing $PYTHONSTARTUP environment variables every time).

Session logging and reloading.

Extensible syntax processing for special purpose situations.

Access to the system shell with user-extensible alias system.

Easily embeddable in other Python programs and GUIs.

Integrated access to the pdb debugger and the Python profiler.

Development and Instant running

You can find the latest version of the development documentation on readthedocs.

You can run IPython from this directory without even installing it system-wide by typing at the terminal:

$ python -m IPython

Or see the development installation docs for the latest revision on read the docs.

Documentation and installation instructions for older version of IPython can be found on the IPython website

IPython requires Python version 3 or above

Starting with version 6.0, IPython does not support Python 2.7, 3.0, 3.1, or 3.2.

For a version compatible with Python 2.7, please install the 5.x LTS Long Term Support version.

If you are encountering this error message you are likely trying to install or use IPython from source. You need to checkout the remote 5.x branch. If you are using git the following should work:

$ git fetch origin
$ git checkout 5.x

If you encounter this error message with a regular install of IPython, then you likely need to update your package manager, for example if you are using pip check the version of pip with:

$ pip --version

You will need to update pip to the version 9.0.1 or greater. If you are not using pip, please inquiry with the maintainers of the package for your package manager.

For more information see one of our blog posts:

https://blog.jupyter.org/release-of-ipython-5-0-8ce60b8d2e8e

As well as the following Pull-Request for discussion:

#9900

This error does also occur if you are invoking setup.py directly – which you should not – or are using easy_install If this is the case, use pip install . instead of setup.py install , and pip install -e . instead of setup.py develop If you are depending on IPython as a dependency you may also want to have a conditional dependency on IPython depending on the Python version:

install_req = ['ipython']
if sys.version_info[0] < 3 and 'bdist_wheel' not in sys.argv:
    install_req.remove('ipython')
    install_req.append('ipython<6')

setup(
    ...
    install_requires=install_req
)

Alternatives to IPython

IPython may not be to your taste; if that's the case there might be similar project that you might want to use:

Ignoring commits with git blame.ignoreRevsFile

As of git 2.23, it is possible to make formatting changes without breaking git blame. See the git documentation for more details.

To use this feature you must:

  • Install git >= 2.23
  • Configure your local git repo by running:
    • POSIX: tools\configure-git-blame-ignore-revs.sh
    • Windows: tools\configure-git-blame-ignore-revs.bat

traitlets's People

Contributors

ankostis avatar azjps avatar bfroehle avatar blink1073 avatar burnpanck avatar carreau avatar cclauss avatar davclark avatar dependabot[bot] avatar ellisonbg avatar fperez avatar francisco-dlp avatar ivanov avatar jasongrout avatar jdfreder avatar lucasg avatar maartenbreddels avatar martinrenou avatar metaperl avatar minrk avatar oliver-sanders avatar pbugnion avatar pre-commit-ci[bot] avatar rmorshea avatar ssanderson avatar sylvaincorlay avatar takluyver avatar vidartf avatar willingc avatar zaharid avatar

Stargazers

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

Watchers

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

traitlets's Issues

Dict.validate_elements bug

File "D:\Python27\python-2.7.10\lib\site-packages\traitlets\traitlets.py", line 2400, in validate
value = self.validate_elements(obj, value)
File "D:\Python27\python-2.7.10\lib\site-packages\traitlets\traitlets.py", line 2421, in validate_elements
self.element_error(obj, v, self._trait)
File "D:\Python27\python-2.7.10\lib\site-packages\traitlets\traitlets.py", line 2393, in element_error
% (self.name, class_of(obj), validator.info(), repr_type(element))
AttributeError: 'NoneType' object has no attribute 'info'

    def validate_elements(self, obj, value):
        if self._traits is not None:
            for key in self._traits:
                if key not in value:
                    raise TraitError("Missing required '%s' key for the '%s' trait of %s instance"
                                     % (key, self.name, class_of(obj)))
        if self._traits is None and (self._trait is None or
                                     isinstance(self._trait, Any)):
            return value
        validated = {}
        for key in value:
            v = value[key]
            try:
                if self._traits is not None and key in self._traits:
                    v = self._traits[key]._validate(obj, v)
                else:
                    v = self._trait._validate(obj, v)
            except TraitError:
                # ---> If self._traits is not None and self._traits is None,
                # when self._traits[key] _validate raise a TraitError will cause the traceback.
                # And self.element_error should pass the key as arg, to print clear message
                # which key's trait raise an error.
                self.element_error(obj, v, self._trait)
            else:
                validated[key] = v
        return self.klass(validated)

Deprecate get_default_value method?

From PR #31 - the get_default_value method on traits now just returns self.default_value in all the traits we define. Dynamically created defaults (e.g. for Instance traitlets) are built via a different mechanism, so that we can avoid creating them until they're needed.

If there are no other traitlets defining or using get_default_value, we can deprecate it and just use self.default_value instead. Widgets doesn't appear to. Are there any other users of widgets we know about?

CC @minrk @SylvainCorlay

DOC: migration for on_trait_change docs

IIUC, in this code from here:

from traitlets import HasTraits, Int, Unicode

class Foo(HasTraits):

    bar = Int()
    baz = Unicode()

def handle_change(change):
    print("{name} changed from {old} to {new}".format(**change))

foo = Foo()
foo.observe(bar_changed, names='bar')

bar_changed should have been handle_change, right? But then to have the print working it should either be ..{names} in the print formatting statement or the observe parameter should be name='bar'?

Edit: No, the print still works, guess I don't understand it yet. But the function in the docs should be handle_change still.

Edit2: I get it now, the name key is always in the change kw dic that comes into the handler. But names defines the list of traits the handler is responsible for and will automatically update name depending on which one is changing.

logging with a configurable in ipython

I am trying to use traitlets.Configurable and have found that it works great as a base class. But I am unable to get my configurable to log properly when used from IPython. The application logger works just fine when standalone, but there is no output, not even for error, when I instantiate and use it from ipython. (I just updated to the latest canopy 1.6, so I am fairly up to date with everything, but definitely not bleeding edge.)

Always call super in init

HasTraits.__init__ does not call super. It must call super if you want to use HasTraits in multiple inheritance.

HasTraits also silently swallows positional arguments. Why does it do that?

Finally, it would be nice if HasTraits.__init__ did not automatically set its keyword arguments onto the object. The problem with this is it means that HasTraits must be the final class in the mro, which is hard to guarantee. Is this behaviour really necessary?

TraitError: Unexpected error in TraitType: default value not set properly

Using file upload widget from

https://github.com/ipython/ipython/blob/master/examples/Interactive%20Widgets/File%20Upload%20Widget.ipynb

'2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)]'
IPython.version=3.1.0
traitlets.version_info=4, 0, 0, 'dev'

---------------------------------------------------------------------------
TraitError                                Traceback (most recent call last)
C:\Python\Python27\lib\site-packages\IPython\core\formatters.pyc in __call__(self, obj)
    898             method = _safe_get_formatter_method(obj, self.print_method)
    899             if method is not None:
--> 900                 method()
    901                 return True
    902 

C:\Python\Python27\lib\site-packages\IPython\html\widgets\widget.pyc in _ipython_display_(self, **kwargs)
    419         """Called when `IPython.display.display` is called on the widget."""
    420         # Show view.
--> 421         if self._view_name is not None:
    422             self._send({"method": "display"})
    423             self._handle_displayed(**kwargs)

C:\Python\Python27\lib\site-packages\traitlets\traitlets.pyc in __get__(self, obj, cls)
    437                 # HasTraits should call set_default_value to populate
    438                 # this.  So this should never be reached.
--> 439                 raise TraitError('Unexpected error in TraitType: '
    440                                  'default value not set properly')
    441             else:

TraitError: Unexpected error in TraitType: default value not set properly

Many traits have inappropriate defaults for general usage.

Several of the built-in traitlets provide default values that I think are inappropriate for general usage.

The general theme is that most traits provide a "falsey" value, but there are many use-cases where a falsey value is not a sane default. In what sense, for example, is an empty string an appropriate default for _all_ Unicode instances, or an empty list appropriate as a default for _all_ List instances?

This issue is exacerbated by the fact that it's quite hard to override the built-in default handling behavior, especially for non-scalar types. Providing more conservative versions of traitlets requires relying pretty intimately on implementation details of the base traits. My best attempt at doing so is here, with the most relevant bits being here and here.

The main source of difficulty is that the subclasses of Container and Instance have inconsistent logic for converting the parameters to their constructors into *args and **kwargs for their default value factories (some have default_value=Undefined in their __init__ signatures, others have default_value=None; Tuple just does a metadata.pop('default_value')), and none of them provide a sensible path for causing make_dynamic_default to raise an error if a user hasn't supplied a specific default.

I realize that removing many of the "default defaults" would represent a pretty serious API breakage (though I'd argue it would be a breakage for the better that would be straightforward for downstream consumers to fix, likely surfacing latent bugs in the process). A less aggressive change would be providing more conservative versions of the built-in traits, or at least refactoring the existing traits to provide a clear path for making traits that require users to be explicit about their defaults.

py3compat is still used in traitlets.traitlets, but not imported

#204 removed the import of py3compat from traitlets.traitlets, but that is still used, and Jenkins tests are failing:

Traceback (most recent call last):
  File "/var/lib/jenkins/shiningpanda/jobs/92f5a430/virtualenvs/d41d8cd9/bin/iptest", line 9, in <module>
    load_entry_point('ipython==5.0.0.dev0', 'console_scripts', 'iptest')()
  File "/var/lib/jenkins/shiningpanda/jobs/92f5a430/virtualenvs/d41d8cd9/lib/python3.4/site-packages/pkg_resources/__init__.py", line 542, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/var/lib/jenkins/shiningpanda/jobs/92f5a430/virtualenvs/d41d8cd9/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2542, in load_entry_point
    return ep.load()
  File "/var/lib/jenkins/shiningpanda/jobs/92f5a430/virtualenvs/d41d8cd9/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2202, in load
    return self.resolve()
  File "/var/lib/jenkins/shiningpanda/jobs/92f5a430/virtualenvs/d41d8cd9/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2208, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/var/lib/jenkins/shiningpanda/jobs/92f5a430/virtualenvs/d41d8cd9/lib/python3.4/site-packages/IPython/__init__.py", line 49, in <module>
    from .terminal.embed import embed
  File "/var/lib/jenkins/shiningpanda/jobs/92f5a430/virtualenvs/d41d8cd9/lib/python3.4/site-packages/IPython/terminal/embed.py", line 16, in <module>
    from IPython.core.interactiveshell import DummyMod
  File "/var/lib/jenkins/shiningpanda/jobs/92f5a430/virtualenvs/d41d8cd9/lib/python3.4/site-packages/IPython/core/interactiveshell.py", line 171, in <module>
    class InteractiveShell(SingletonConfigurable):
  File "/var/lib/jenkins/shiningpanda/jobs/92f5a430/virtualenvs/d41d8cd9/lib/python3.4/site-packages/IPython/core/interactiveshell.py", line 232, in InteractiveShell
    help="Set the color scheme (NoColor, Linux, or LightBG)."
  File "/var/lib/jenkins/shiningpanda/jobs/92f5a430/virtualenvs/d41d8cd9/lib/python3.4/site-packages/traitlets/traitlets.py", line 2034, in __init__
    values = [py3compat.cast_unicode_py2(value) for value in values]
  File "/var/lib/jenkins/shiningpanda/jobs/92f5a430/virtualenvs/d41d8cd9/lib/python3.4/site-packages/traitlets/traitlets.py", line 2034, in <listcomp>
    values = [py3compat.cast_unicode_py2(value) for value in values]
NameError: name 'py3compat' is not defined

Ping @Carreau

Replacement for "set_default_value"?

In knitpy, I use set_Default_value to reset (parts of) a traitlet based object to a known state. Unfortunately, this doesn't work anymore with the new standalone version of traitlets (after #26):

    def execution_finished(self):
        self.output.flush()
        reset_needed = ["engine", "mode"
                        "chunk_label", "comment",
                        "include", "echo",  "include", "results"]
        for name in self.trait_names():
            if name in reset_needed:
                self.traits()[name].set_default_value(self)

-> https://github.com/JanSchulz/knitpy/blob/master/knitpy/knitpy.py#L853

What is the suggested way to "reset" a trait?

conf.d-style loading of a bag of files

One of the things discussed with the downstream is a conf.d-style loading of a directory of files, probably put there by a package manager (at least, not put there by an application itself).

It could live here. This would have the benefit of making all ConfigManager downstream implementations able to use this feature. There would also be the question of whether one could silently add this.

If it lived here, it looks like it would have to be reflected in:

  • a FileConfigLoader subclass
  • a BaseJSONConfigManager

Question Why do both of these even exist?

For example, in the notebook, this would entail loading and merging the following files:

  • `[sys.prefix | /usr/local | ~)/jupyter/
    • jupyter_notebook_config.json.d/
      1. some_thing.json
      2. some_other_thing.json
    • jupyter_notebook_config.json

When writing in both those files, when a config is written, it can only write to the "non-.d" location. Further, it shouldn't write out the whole shooting match (of all the .d/* files), but only the novel, unique data introduced by the user. so:

conda install nbpresent
jupyter nbextension disble --py some_other_extension

shouldn't store the nbpresent data in the config. This suggests we may need some kind of "taint checking" to know whether a value should be persisted or not.

IOError: could not get source code

packaging ipython with pyinstaller:

Traceback (most recent call last):
  File "<string>", line 208, in <module>
  File "site-packages\IPython\core\display.py", line 152, in display
  File "site-packages\traitlets\config\configurable.py", line 404, in instance
  File "site-packages\traitlets\traitlets.py", line 910, in __new__
  File "site-packages\traitlets\traitlets.py", line 934, in setup_instance
  File "site-packages\traitlets\traitlets.py", line 925, in setup_instance
  File "site-packages\traitlets\traitlets.py", line 1563, in instance_init
  File "site-packages\traitlets\traitlets.py", line 492, in instance_init
  File "site-packages\traitlets\traitlets.py", line 483, in _dynamic_default_cal
lable
  File "site-packages\traitlets\traitlets.py", line 109, in _deprecated_method
  File "inspect.py", line 690, in getsourcelines
  File "inspect.py", line 538, in findsource
IOError: could not get source code



alabaster (0.7.6)
argh (0.26.1)
ashiba (0.0)
astroid (1.3.8)
Babel (2.1.1)
backports-abc (0.4)
backports.ssl-match-hostname (3.4.0.
beautifulsoup4 (4.4.1)
binstar (0.11.0)
blessings (1.6)
bokeh (0.10.0)
bpython (0.14.2)
bqplot (0.4.2)
certifi (2015.9.6.2)
chest (0.2.3)
cloud (2.8.5)
cloudpickle (0.1.1)
clyent (0.3.4)
colorama (0.3.3)
comtypes (1.1.2)
conda (3.19.3)
conda-build (1.18.0)
conda-env (2.4.5)
CoolProp (5.1.2)
curses (2.2)
curtsies (0.1.21)
cycler (0.10.0)
Cython (0.23.4)
dask (0.8.0)
decorator (4.0.6)
DerApproximator (0.52)
dill (0.2.4)
docopt (0.6.2)
docutils (0.12)
dolo (0.5.dev0)
enum (0.4.4)
enum34 (1.1.2)
et-xmlfile (1.0.1)
Flask (0.10.1)
FuncDesigner (0.5404)
funcsigs (0.4)
functools32 (3.2.3.post2)
futures (3.0.3)
gevent (1.0.1)
gevent-websocket (0.9.3)
greenlet (0.4.9)
HeapDict (1.0.0)
html5lib (0.999)
ipdb (0.8.1)
ipycache (0.1.4)
ipykernel (4.2.2)
ipython (4.0.1)
ipython-genutils (0.1.0)
ipywidgets (4.1.1)
itsdangerous (0.24)
jdcal (1.0)
jedi (0.9.0)
Jinja2 (2.8)
JSAnimation (0.1)
jsonpickle (0.9.2)
jsonschema (2.5.1)
jupyter (1.0.0)
jupyter-client (4.1.1)
jupyter-console (4.0.3)
jupyter-core (4.0.6)
jupyter-kernel-gateway (0.4.0.dev0)
llvmlite (0.8.0)
locket (0.2.0)
logilab-common (1.1.0)
lxml (3.4.4)
MarkupSafe (0.23)
matplotlib (1.5.1)
mccabe (0.3.1)
menuinst (1.3.2)
mistune (0.7.1)
mpmath (0.19)
nbconvert (4.1.0)
nbformat (4.0.1)
networkx (1.10)
nose (1.3.7)
notebook (4.1.0)
numba (0.23.1)
numexpr (2.4.4)
numpy (1.10.4)
numpydoc (0.5)
oauthlib (1.0.3)
oletools (0.44)
openopt (0.5404)
openpyxl (2.3.0)
pandas (0.17.0)
partd (0.3.2)
path.py (8.1.2)
pathtools (0.1.2)
patsy (0.4.0)
pickleshare (0.6)
Pillow (3.0.0)
Pint (0.6)
pip (8.0.3)
pipwin (0.2.4)
plumbum (1.6.1.post0)
ply (3.8)
poster (0.8.1)
prompt-toolkit (0.57)
pss (1.40)
psutil (3.4.2)
ptpython (0.28)
ptvsd (2.2.0)
py-trello (0.4.3)
pycosat (0.6.1)
Pygments (2.0.2)
pygraphviz (1.3rc2)
PyInstaller (3.1)
pylint (1.4.4)
Pympler (0.4.2)
pymssql (2.1.1)
pyodbc (3.0.10)
Pyomo (4.2.10784)
pyomo.extras (2.0)
pyparsing (2.0.3)
PyPDF2 (1.24)
PyPrind (2.9.3)
pypyodbc (1.3.3)
PyQt4 (4.11.4)
pyreadline (2.1)
Pyro (3.16)
PySide (1.2.4)
Python-contrib-nbextensions (alpha)
python-dateutil (2.4.2)
pythonnet (2.1.0.dev1)
pythreejs (0.1.17)
pytz (2015.7)
PyUtilib (5.2.3601)
pywin32 (220)
PyYAML (3.11)
pyzmq (14.7.0)
qgrid (0.2.0)
qtconsole (4.1.0)
reportlab (3.1.44)
requests (2.9.1)
requests-oauthlib (0.6.0)
robobrowser (0.5.3)
rodeo (0.4.4)
scandir (1.1)
scikit-learn (0.16.1)
scipy (0.16.1)
seaborn (0.7.0)
setuptools (19.2)
simplegeneric (0.8.1)
singledispatch (3.4.0.3)
six (1.10.0)
snowballstemmer (1.2.0)
Sphinx (1.3.1)
sphinx-rtd-theme (0.1.8)
spyder (2.3.7)
SQLAlchemy (1.0.9)
statsmodels (0.6.1)
suds-jurko (0.6)
sympy (0.7.6.1)
tabulate (0.7.5)
toolz (0.7.4)
tornado (4.3)
traitlets (4.0.0)
ujson (1.33)
uncertainties (2.4.7.1)
watchdog (0.8.3)
wcwidth (0.1.5)
Werkzeug (0.10.4)
wheel (0.29.0)
xlrd (0.9.4)
xray (0.6.1)

Seqfault in on_trait_change

With the release of Traitlets 4.1 I am seeing some random seqfaults when restarting the Jupyter notebook and as part of the Matplotlib docs build which seems to point to the Traitlets tear down steps.

Im not sure this is related to Traitlets 4.1 but it does seem to correlate. Perhaps we are doing something wrong in Matplotlib which is causing this.

Locally:

Fatal Python error: PyImport_GetModuleDict: no module dictionary!

Thread 0x0000700001113000 (most recent call first):
  File "/usr/local/lib/python3.5/site-packages/ipykernel/parentpoller.py", line 37 in run
  File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/threading.py", line 914 in _bootstrap_inner
  File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/threading.py", line 882 in _bootstrap

Thread 0x0000700000607000 (most recent call first):
  File "/usr/local/lib/python3.5/site-packages/ipykernel/heartbeat.py", line 61 in run
  File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/threading.py", line 914 in _bootstrap_inner
  File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/threading.py", line 882 in _bootstrap

Current thread 0x00007fff7844b000 (most recent call first):
  File "/usr/local/lib/python3.5/site-packages/traitlets/traitlets.py", line 1136 in on_trait_change
  File "/usr/local/lib/python3.5/site-packages/IPython/core/extensions.py", line 64 in __del__

and in the Matplotlib docs build which uses the IPython Sphinx extension:

Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/home/travis/build/matplotlib/matplotlib/venv/lib/python3.5/site-packages/IPython/core/history.py", line 547, in end_session
    len(self.input_hist_parsed)-1, self.session_number))
sqlite3.OperationalError: disk I/O error
Fatal Python error: PyImport_GetModuleDict: no module dictionary!
Current thread 0x00007ff58684b700 (most recent call first):
  File "/home/travis/build/matplotlib/matplotlib/venv/lib/python3.5/site-packages/traitlets/traitlets.py", line 1136 in on_trait_change
  File "/home/travis/build/matplotlib/matplotlib/venv/lib/python3.5/site-packages/IPython/core/extensions.py", line 64 in __del__
Aborted (core dumped)

The sql error is old and fixed already in IPython master see ipython/ipython#8850

Handling Unknown Arguments

I was wondering if there is a way for me to configure the command line args parsing to raise an error when an unknown argument is specified. For example, say I have a traitlet class called Foo with properties quo and bar. If I start my and specify an invalid argument such as --Faux.bar or --Foo.qaux I would like an error to be thrown.

Notification Dict Construction and Routing

One of the things I've been thinking about recently is how notification dicts ought to be made, and then routed to their appropriate event handlers. At the moment _notify_trait receives several arguments from a TraitType, constructs a change dict, and then distributes it to notify_change. In the future, it seems like making _notify_trait responsible for constructing these notification dicts will make it difficult to generalize this process for events other than changes. It makes more sense to me that TraitTypes would be responsible for constructing dicts such that _notify_trait would know how to route them.

Initializing the metadata of a trait

This issue continues discussion of the metadata point from #48. We'd like to separate the metadata from the constructor arguments in a TraitType's constructor: Having the two semantically very different kwarg sets interleaved makes it very difficult to understand the constructor and predict what is going to happen.

x = Int(allow_none=True, sync=True)           # deprecated

# option A1 - pass metadata in as a separate dict
x = Int(allow_none=True, metadata={'sync': True})
x = Int(allow_none=True, metadata=dict(sync=True))

# option A2 - shorter argument name to save typing and line length
x = Int(allow_none=True, md={'sync': True})
x = Int(allow_none=True, md=dict(sync=True))

# option B1 - set metadata in a function chained onto the constructor.  .metadata() should return self
x = Int(allow_none=True).metadata(sync=True)

# option B2 - shorter name
x = Int(allow_none=True).md(sync=True)

# option B3 - short name from atom, which is a good verb for this
x = Int(allow_none=True).tag(sync=True)

To be clear, we'd deprecate setting metadata in the constructor immediately, and remove the ability in traitlets 5.0.

setup.py minor issues related to test

The "setup.py" lacks the requirement/dependency to "mock", only "nose2" is specified. In addition, may be "test_requires" keyword should be specified.

`observe` should allow any iterable containers.

Not just list, and tuple, thinks like set... should work.

More generally you should fix parse_notifier_name.

And technically it should allow any container that implement __contains__ I guess. And parse_notifier_name should not blindly return nothing (ie None) if the type of argument is not one of the accepted argument. It shoudl raise a meaningful error.

Why does TraitType.get accept cls?

I sometimes call trait.get(obj) directly, but I have to pass something for the argument cls, which is ultimately unused. What's the long term plan for this argument?

Passing config using environment variables

Hello,

I'm using Travis-CI for Continuous Integration in many projects.
I'm planning to use traitlets as a way to configure some tools (passing API_KEY, ...)

To be able to test my projects, I need to pass some settings using environnement variables (only for Continuous Integration) because it's necessary to "hide" (from Git repository) some config data (API_KEY, password...)

see http://docs.travis-ci.com/user/environment-variables/

Is it something which is possible with traitlets ?
Is it something which could be considered in traitlets ?

Kind regards

Handle traitlet messages during cell execution

We have the need to be able to stay in a loop waiting for a widget value to change while executing cell code. Here is a little version of the desire:

from ipywidgets import widgets
from IPython.display import display
i = widgets.IntText()
display(i)
i.value = 78
while i.value == 78:
    pass

We would like to be able to change the value in the displayed IntText and have the loop stop when the detected value changes. I understand that jupyter is not designed to do this, but we would like to replicate a pre-existing API in the notebook.

Is it possible, while the cell is executing, to call a kernel function that will process queued comm messages? This might not be a long term solution, but is necessary for the existing architecture.

make SingletonConfigurable a subclass of LoggingConfigurable

Most subclass of SingletonConfigurable are Applications that redefine a log trait.

Exception is InteractiveShell in IPython which define the old way a self.logger. And LaTeXTool in IPython that does not use log.

Once this is done we can do that in load config (roughly):

if name in traits:
   ...
elif isinstance(self, LoggingConfigurable):
       from difflib import get_close_matches
       m = get_close_matches(name, traits)
       if m:
           self.log("{} not in config, do you mean one of: {}".format(name, m))  

TraitType init_instance should be able to depend on object initialization arguments

I am trying to replace my traitlet-like system with the traitlets project. I have a number of "Cluster" objects that have a size member, which is provided to the constructor. They contain numpy array traits that should be sized according to this size:

    class ClusterSizedNDArray(NDArray):

        def __init__(self, **metadata):
            super().__init__(cluster_sized=True,
                             shape=(),
                             dtype=np.float64,
                             **metadata)

        def shape(self, obj):
            return (obj.size,) + self.metadata['shape']


    class Cluster(HasTraits):

        signals = ClusterSizedNDArray()

        def __new__(cls, *args, **kw):
            new_meth = super().__new__
            size = kw.pop('size')
            obj = new_meth(cls, **kw)
            # Initialize size before traits are populated that have that size.
            obj.size = size
            return obj

Unfortunately, this doesn't work because obj.size is still not set on the object until after HasTraits.__new__ has been called. What would be a nice way to make this work? Is this something that traitlets can handle or should I implement my own similar system?

Perhaps I should inherit from another class that just sets the size, so that the mro is Cluster, HasTraits, SizeSettingBaseClass?

Roadmap for release

As suggest by @minrk on the gitter channel, I am opening this to discuss what remains to be done so that we can make a release of traitlets. (There are a few minor PRs open which should probably be merged very soon.)


It seems that we have checked most of the items listed in #48 for the API changes that we wanted to make. The one remaining thing is the use of a @default decorator instead of the magic function for the default value generation. @rmorshea has a working implementation in #76. I don't think that this issue is blocking to make a release. (Although I don't see a problem getting this in now.)


Regarding the default value of the type argument in observe, we opted for change in #83 but I am still not sure if it would not be better to default to All. However, we will not be able to change this in a backward compatible fashion after the next release.


We still depend on ipython_genutils. Is it ok to make a release and keep this?


Should we make a beta? Should it be 5.0.0 or 4.1.0 ?

alias warnings after switching to nose2

After switching to nose2, I'm getting a series of warnings while testing the KVArgParseConfigLoader:

test_basic (traitlets.config.tests.test_loader.TestArgParseKVCL) ... ['--a=10', '--b=20', '--Foo.Bar.value=10', '--Foo.Bam.value=list(range(10))', "--D.C.value='hi there'"]
WARNING:devnull:Unrecognized alias: '--a=10', it will probably have no effect.
WARNING:devnull:Unrecognized alias: '--b=20', it will probably have no effect.

There are others, but they're all of the same form.

Documentation For Specifying Container Arguments

I have searched the docs, examples, and tests for an example of specifying a container type as a command line argument. Since I found nothing, I am assuming it is not supported at the moment. In particular I am trying to get a set of values as an argument. I tried the following:

myapp --containerarg={'A', 'B', 'C'}
myapp --containerarg=Set({'A', 'B', 'C'})
myapp --containerarg=['A', 'B', 'C']
myapp --containerarg='A' --containerarg='B' --containerarg='C'

Deprecate/remove help_classes, config_classes?

At some point, we added functionality to describe different lists of classes in the --help-all output and the config file. I think this might have been when frontend config could be passed to kernels, but we didn't want to show those options in help output.

We're not using this functionality now, as far as I can see, and it's a little bit of extra confusing indirection to follow. I'd suggest we get rid of it again and just use classes.

Release issues

Couple little nits:

  • github release is 4.0, pypi is 4.0.0
  • pypi package doesn't contain COPYING.md and README.md

DeprecationWarning in traitlets

executing this in Jupyter notebook,

class MyWidget(widgets.DOMWidget):
    _view_name = Unicode('MyView', sync=True)
    value = Unicode(input_form+javascript, sync=True)

gives warning:

home/aman/mylatex/lib/python2.7/site-packages/ipykernel/main.py:2: DeprecationWarning: metadata {'sync': True} was set from the constructor. Metadata should be set using the .tag() method, e.g., Int().tag(key1='value1', key2='value2')
from ipykernel import kernelapp as app
/home/aman/mylatex/lib/python2.7/site-packages/ipykernel/main.py:3: DeprecationWarning: metadata {'sync': True} was set from the constructor. Metadata should be set using the .tag() method, e.g., Int().tag(key1='value1', key2='value2')
app.launch_new_instance()

Can't figure out how to solve this.

dict changing size in iteration

@SylvainCorlay, it looks like this might be from some of the recent traitlet changes?

jupyter/jupyter_notebook/jupyter_notebook/widgets/widget_int.pyc in __init__(self, *pargs, **kwargs)
     35     def __init__(self, *pargs, **kwargs):
     36         """Constructor"""
---> 37         super(_BoundedInt, self).__init__(*pargs, **kwargs)
     38 
     39     def _value_validate(self, value, trait):

jupyter/jupyter_notebook/jupyter_notebook/widgets/widget_int.pyc in __init__(self, value, **kwargs)
     23         if value is not None:
     24             kwargs['value'] = value
---> 25         super(_Int, self).__init__(**kwargs)
     26 
     27 

jupyter/jupyter_notebook/jupyter_notebook/widgets/widget.pyc in __init__(self, *pargs, **kwargs)
    505 
    506     def __init__(self, *pargs, **kwargs):
--> 507         super(DOMWidget, self).__init__(*pargs, **kwargs)
    508 
    509         def _validate_border(name, old, new):

jupyter/jupyter_notebook/jupyter_notebook/widgets/widget.pyc in __init__(self, **kwargs)
    170         """Public constructor"""
    171         self._model_id = kwargs.pop('model_id', None)
--> 172         super(Widget, self).__init__(**kwargs)
    173 
    174         Widget._call_widget_constructed(self)

jupyter/traitlets/traitlets/config/configurable.pyc in __init__(self, **kwargs)
     72 
     73         # load kwarg traits, other than config
---> 74         super(Configurable, self).__init__(**kwargs)
     75 
     76         # load config

jupyter/traitlets/traitlets/traitlets.pyc in __init__(self, *args, **kw)
    582         with self.hold_trait_notifications():
    583             for key, value in iteritems(kw):
--> 584                 setattr(self, key, value)
    585 
    586     @contextlib.contextmanager

contextlib.pyc in __exit__(self, type, value, traceback)
     22         if type is None:
     23             try:
---> 24                 self.gen.next()
     25             except StopIteration:
     26                 return

jupyter/traitlets/traitlets/traitlets.pyc in hold_trait_notifications(self)
    614                 self._cross_validation_lock = True
    615                 yield
--> 616                 for name in cache:
    617                     if hasattr(self, '_%s_validate' % name):
    618                         cross_validate = getattr(self, '_%s_validate' % name)

RuntimeError: dictionary changed size during iteration

IPython tests fail with traitlets master

Looks like PR #175 broke something:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/takluyver/.local/lib/python3.4/site-packages/IPython/testing/iptest.py", line 435, in run_iptest
    globalipapp.start_ipython()
  File "/home/takluyver/.local/lib/python3.4/site-packages/IPython/testing/globalipapp.py", line 103, in start_ipython
    shell = TerminalInteractiveShell.instance(config=config,
  File "/home/takluyver/.local/lib/python3.4/site-packages/traitlets/config/configurable.py", line 405, in instance
    inst = cls(*args, **kwargs)
  File "/home/takluyver/.local/lib/python3.4/site-packages/IPython/core/interactiveshell.py", line 506, in __init__
    self.init_magics()
  File "/home/takluyver/.local/lib/python3.4/site-packages/IPython/terminal/interactiveshell.py", line 797, in init_magics
    super(TerminalInteractiveShell, self).init_magics()
  File "/home/takluyver/.local/lib/python3.4/site-packages/IPython/core/interactiveshell.py", line 2018, in init_magics
    user_magics=m.UserMagics(self))
  File "/home/takluyver/.local/lib/python3.4/site-packages/IPython/core/magic.py", line 547, in __init__
    super(Magics, self).__init__(**kwargs)
  File "/home/takluyver/.local/lib/python3.4/site-packages/traitlets/config/configurable.py", line 74, in __init__
    super(Configurable, self).__init__(**kwargs)
  File "/home/takluyver/.local/lib/python3.4/site-packages/traitlets/traitlets.py", line 952, in __init__
    super(HasTraits, self).__init__(*super_args, **super_kwargs)
TypeError: object.__init__() takes no parameters

TypeError: 'LazyConfigValue' object is not iterable

I am trying to install IPython on my MacBook with OS X 10.8.5.

I've tried using pip to install IPython with all its dependencies, and have encountered the appended error when trying to start IPython.

I've also tried a quarantined install in a virtualenv, and have found the same error so I know that its not a problem with conflicting versions.

Any thoughts/suggestions on how to fix this problem?

Error:

Traceback (most recent call last):
File "/Users/frank/_notebook/bin/ipython", line 11, in
sys.exit(start_ipython())
File "/Users/frank/_notebook/lib/python2.7/site-packages/IPython/init.py", line 118, in start_ipython
return launch_new_instance(argv=argv, *_kwargs)
File "/Users/frank/_notebook/lib/python2.7/site-packages/traitlets/config/application.py", line 591, in launch_instance
app.initialize(argv)
File "", line 2, in initialize
File "/Users/frank/_notebook/lib/python2.7/site-packages/traitlets/config/application.py", line 75, in catch_config_error
return method(app, *args, *_kwargs)
File "/Users/frank/_notebook/lib/python2.7/site-packages/IPython/terminal/ipapp.py", line 305, in initialize
super(TerminalIPythonApp, self).initialize(argv)
File "", line 2, in initialize
File "/Users/frank/_notebook/lib/python2.7/site-packages/traitlets/config/application.py", line 75, in catch_config_error
return method(app, _args, *_kwargs)
File "/Users/frank/_notebook/lib/python2.7/site-packages/IPython/core/application.py", line 394, in initialize
self.load_config_file()
File "/Users/frank/_notebook/lib/python2.7/site-packages/IPython/core/application.py", line 258, in load_config_file
path=self.config_file_paths
File "", line 2, in load_config_file
File "/Users/frank/_notebook/lib/python2.7/site-packages/traitlets/config/application.py", line 75, in catch_config_error
return method(app, _args, *_kwargs)
File "/Users/frank/_notebook/lib/python2.7/site-packages/traitlets/config/application.py", line 564, in load_config_file
collisions = loaded[0].collisions(loaded[1])
File "/Users/frank/_notebook/lib/python2.7/site-packages/traitlets/config/loader.py", line 212, in collisions
for key in mine:
TypeError: 'LazyConfigValue' object is not iterable

Lists become 'traitlets.Undefined' in config files

If you generate a default config file (or print command line help), it appears that lists get converted to traitlets.Undefined, e.g.:

# c.NbConvertApp.notebooks = traitlets.Undefined

If this line is uncommented, then the config file cannot be loaded because traitlets is undefined. Previously, the config files used to display the actual list.

what happened to EventfulList and friends?

in IPython 3.0, I was importing EventfulList like so:

from IPython.utils.traitlets import EventfulList

In IPython 4.0, traitlets is abstracted, which is awesome by the way, but I can't find traitlets.eventful.

What am I missing?

preserving the order of Traitlets as defined in the class

For our application, it would be extremely useful to retain the order of the traits as defined internally. I.e., we would like to determine the order the traits were defined in the class. Any way of supporting this other than our making our own modified copy of traitlets? (The motivation for this is so that tools that can print out or otherwise save this information in a readable state can retain logical groupings of traits as defined in the class).

autodoc plugin for sphinx

Perhaps related to #131, we should consider an extension to sphinx autodoc that would let you include trait info, such as types and help strings, in autodoc output.

This doesn't have to start in this repo, it can be a standalone extension, but I think it would be useful for things like generating good docs on what's configurable in a project.

Using repr of class name

It appears that when a default config file is generated (or you just generate command line help), that class names are now represented no longer as just dotted strings, but of the python repr, e.g.:

# c.FormgradeApp.authenticator_class = <class 'nbgrader.auth.noauth.NoAuth'>

Given that this is not valid python syntax, were this line to be uncommented, the config file would not be able to be loaded.

Trait introspection

A class with multiple traits usually has an extremely useless call signature of __init__, and is often lacking docstrings. This is understandable, since traits themselves can come with descriptions.

On the other hand, it would be useful to automatically document the traits present in the class in the docstring by e.g. using a decorator, or even fiddle with the __init__ call signature, since that would enable tools like sphinx to produce more complete documentation, and would allow introspection by third party software (unlike the related ipython/ipython#9000).

initialize_subcommand does not print help

IPython kernelspec is deprecated (ipapp.py) :

    subcommands = dict(
...
        kernelspec=('jupyter_client.kernelspecapp.KernelSpecApp',
            "DEPRECATED: Manage Jupyter kernel specifications."
        ),
    )

Initialize subcommand in traitlets though does not print it:

   @catch_config_error
    def initialize_subcommand(self, subc, argv=None):
        """Initialize a subcommand with argv."""
        subapp, help = self.subcommands.get(subc)   # help unused. 

        if isinstance(subapp, string_types):
            subapp = import_item(subapp)

        # clear existing instances
        self.__class__.clear_instance()
        # instantiate
        self.subapp = subapp.instance(config=self.config)
        # and initialize subapp
        self.subapp.initialize(argv)

example

$ ipython kernelspec
No subcommand specified. Must specify one of: ['install-self', 'list', 'install']

Manage Jupyter kernel specifications.

Subcommands
-----------

Subcommands are launched as `jupyter kernelspec cmd [args]`. For information on
using subcommand 'cmd', do: `jupyter kernelspec cmd -h`.

install-self
    [DEPRECATED] Install the IPython kernel spec directory for this Python.
list
    List installed kernel specifications.
install
    Install a kernel specification directory.

It default to the subapp description, which in itself is not deprecated, But its IPython alias is.

Does affect many subapp.

Traitlet API

Since Matplotlib's folks are starting to write traitlet-based APIs, we probably need to think of a roadmap for the future of the library if it is to be more widely adopted by the Scipy community.

There are some improvements that we could easily make without splitting traitlets in two different repos:


1. Deprecate trait attribute declaration with TraitType types instead of TraitType instances

class Foo(HasTraits):
    bar = Int    # deprecated
    baz = Int()  # ok
    alpha = List(trait=Int)     # deprecated
    alpha = List(trait=Int())   # ok

(Implemented in #51 and #55 - merged)


2. Like in Atom, separate the metadata from the keyword arguments in TraitType's constructor.

x = Int(allow_none=True, sync=True)      # deprecated
x = Int(allow_none=True).tag(sync=True)  # ok

(Implemented in #53 - merged)


3. A replacement for the cumbersome on_trait_change in the future, with a more convenient signature and a simpler name.

  • We now use observe/ unobserve method instead of using a remove=True/False argument with on_trait_change.

  • observe takes 1 positional argument (the handler), and two keyword arguments, names and type.

  • The callbacks take a single change dictionary argument, containing

    {
        'owner': the HasTraits instance,
        'old': the old trait attribute value,
        'new': the new trait attribute value,
        'name': the name of the changing attribute,
    }
  • A new @observe decorator to register methods as trait change handlers.

(Implemented in #61 - merged)


4. Deprecate the custom cross-validation magic methods _*bar*_validate to the benefit of a @validate('bar') decorator.

(Implemented in #73 - merged)


5. Since the base trait type now inherits from BaseDescriptor and other descriptors are defined to work well with HasTraits, we could make the following changes:
- rename MetaHasTraits into MetaHasDescriptors and deprecate the old name.
- introduce a base class to HasTraits called HasDescriptors.

(Implemented in #70 - merged)


6. Deprecate the default-value initializer magic methods _*bar*_default to the benefit of a @default('bar') decorator.

(Implemented in #114 - merged)


7. What is the best place for a repository of extra trait types for common types in the scipy stack such as ` numpy arrays, pandas/xray data structures, and their (binary) serialization functions for widgets (or other clients of comms) and ipyparallel?

It would make sense to propose a reference implementation of those, otherwise we will see multiple competing implementation emerge in different projects.

Besides, it is unlikely that such things would be accepted in core Pandas and numpy as of now...

(Scipy Trait Types Incubator Proposal)


8. Would it make sense to have a once version of on_trait_change (now observe)?

(There seems to be mixed opinions on this. Deferred.)


9. A common pattern when observing an object is the following:

foo.observe(do_something) # register to future change notifications.
do_something()            # act on the current value right away.

maybe we could facilitate this by adding a boolean argument to observe, stating whether to also run the callback right-away or not.

This would especially be useful when registering observer with the decorator syntax.


10. One thing that we had in mind in the long-run for widgets is having finer-grained events for containers, such as List and Dict. The ability to create other descriptors than trait types, possibly outside of the traitlets repository could enable experiments in this directions, like an integration of @jdfreder 's eventful dicts and lists.

One idea that could be in the scope of traitlets though is to add an attribute to the change dictionary indicating the type of notification that is being sent.

{
    'owner': the HasTraits instance,
    'old': the old trait attribute value,
    'new': the new trait attribute value,
    'name': the name of the changing attribute,
    'type': the type of notification being sent,
}

The last attribute could be used to define notification types corresponding to operational transforms.

Then, the @observe decorator would then have a 'type' keyword argument, (defaulting to None), to filter by notification type.

class Foo(HasTraits):
    bar = Int()
    baz = EventfulList()

    @observe('bar')  # Filter to only observe trait changes
    def handler_bar(self, change):
        pass

    @observe('baz ', type='element_change')  # Register to element change notifications for `baz`
    def handler_baz(self, change):
        pass

    @observe('bar', 'baz', type=All)  # register to all notification types for `bar` and `baz` 
    def handler_all(self, change):
        pass

The only thing to do to enable this possibility would be to add a type item in the dictionary and have the current implementation of observe filter on the notification type.

(Implemented in #83 - merged)

ironpython - absolute_import

The import from future in config/configurable.py needs to add , absolute_import

It's causing an error when loading from jupyter_client under IronPython (2.7.5). I think this may be the only change needed in this lib, somebody want to add it for me and save me making a one-word pull request?

Don't use root logger

If no "Application" logger is available traitlets.log.get_logger() falls back to grabbing the root logger.

This makes it impossible to selectively silence it's debugging output - for example the (IMO quite useless) "Using default logger" message.

To reproduce:

import IPython
import logging

logging.basicConfig(level=logging.DEBUG)
IPython.embed()

Support for pickle and copy

Has there been any thought about supporting Python pickling and copying? In other words, implementing __setstate__ and __getstate__ on the Instance type?

I did something like this:

class HasTraits:

    def __getstate__(self, **kwargs):
        state = super().__getstate__(**kwargs)

        # Create entries for traits that want to be pickled.
        for name, trait in self.class_traits(pickled=True).items():
            state[name] = trait.getstate(self, **kwargs)

        return state

    def __setstate__(self, state):
        # Set traits that were pickled.
        for name, trait in self.class_traits(pickled=True).items():
            value = state[name]
            trait.setstate(self, value)

        super().__setstate__(state)


class Instance(ClassBasedTraitType):

    def getstate(self, **kwargs):
        return trait.get(self, None)

    def setstate(self, obj, value):
        trait.set(self, value)

after which of course pickle and copy operations save and reload the state of traits automatically.

Tracking Element Changes

I did a bit of thinking on how to track element changes in things like lists and dicts. I came up with spectate. It has a few limitations, and might be a bit hacky, but it allows you to create classes whose instances have tracked methods.

The instances of a WatchedList (as in this example) would tell you when their items are changed:

WatchedList = WatchedType('WatchedList', list, ListSpectator, '__setitem__')
wl = WatchedList([1, 2, 3])

# will notify when
# an item changes
wl[0] = 2
# the spectator will print this
'__setitem__ : {0: 1} -> {0: 2}'
  • alternative approach: #278

import string bug (Py2 only)

Matplotlib is supporting unicode literals rather than string literals and during my traitlets refactor I've come across this issue where traitlets/traitlets/utils/importstring.py will throw an error because the fromlist argument in __import__ doesn't accept unicode:

from __future__ import unicode_literals
from traitlets import Instance, HasTraits

class Artist(HasTraits):
    axes = Instance('matplotlib.axes.Axes')

a = Artist()

Even though __import__ in Py3 accepts unicode, dealing with the unicode literals in Py2 would require that every class (that needs to be imported with an import string) instead read:

class Artist(HasTraits):
    axes = Instance(str('matplotlib.axes.Axes'))

If there isn't a way around this problem it might be worth fixing.

Please consider splitting up traitlets.py

traitlets.py is 2152 lines today. It might be easier to work with if it were broken down into multiple files, one for each section. We can still import all the relevant things in the __init__.py (which should only import the relevant things — not *). We can protect your change history by creating the new files using git copy.

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.