Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

New BaseIPythonApplication #454

Closed
wants to merge 103 commits into from

5 participants

@ellisonbg
Owner

All IPython applications should subclass this new Application subclass.

IPython/core/newapplication.py
((44 lines not shown))
+class BaseIPythonApplication(Application):
+
+ name = Unicode(u'ipython')
+ description = Unicode(u'IPython: an enhanced interactive Python shell.')
+ version = Unicode(release.version)
+
+ # The name of the default config file. Track separately from the actual
+ # name because some logic happens only if we aren't using the default.
+ default_config_file_name = Unicode(u'ipython_config.py')
+
+ # The directory that contains IPython's builtin profiles.
+ builtin_profile_dir = Unicode(
+ os.path.join(get_ipython_package_dir(), u'config', u'profile')
+ )
+
+ config_file_paths = Tuple(Unicode, Unicode, Unicode)
@minrk Owner
minrk added a note

Why is config_file_paths a Tuple, and not a List? The resulting requirement that the length be 3 seems artificial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
IPython/config/application.py
@@ -210,11 +219,11 @@ class Application(SingletonConfigurable):
if '-h' in argv or '--help' in argv:
self.print_description()
self.print_help()
- sys.exit(1)
@minrk Owner
minrk added a note

Shouldn't --help and --version exit cleanly? exit(1) should mean there was an error.

@ellisonbg Owner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@minrk
Owner

The Application can load any config file by name. The BaseApplication disables this, by hardwiring loading the application default or profile. BaseIPythonApplication must support loading config files by explicit path as well (this is easily accomplished by having the current behavior be the default, but not discarding the file argument of Application.load_config_file)

@minrk
Owner

config files should have a priority lower than command-line specified options, however often the command-line must be parsed to locate those files. That means that currently, one has to do something like the following to ensure proper priority:

app = MyApp()
app.parse_command_line()
cfg = app.config
app.load_config_file(app.located_cfg_file)
# restore cl priority
app.update_config(cfg)
@minrk
Owner

Should we display the default values for configurables? It should be easy (in fact, I've already done it locally) to make the Configurable output:

Foo.i : Int [ default: 1 ]
    helpdocs...
@minrk
Owner

Profiles are now directories, if anyone wants to review that code (ProfileDir adapted from ClusterDir, now in core.newapplication)

@minrk
Owner

I'm working on updating the base IPython App to use the new base class, and I see that the wthread/qthread options are listed as deprectaed. Do we want to take this opportunity to remove them, as there will be already be very little command-line compatibility with the old code?

@minrk
Owner

Another note: The current config has no avenue for positional arguments, so there's no way to do 'ipython foo.py'. Do we want to allow this?

@fperez
Owner
@minrk
Owner

Okay, I think that's going to make a mess of things.

Currently, since everything is so explicit, it's unambiguous to determine what people want. However, if we want to allow arbitrary extra arguments, it's more difficult to determine if what they did was invalid.

For instance, in an app that has subcommands, we would have:
ipython notebook, and if you do something like ipython notebok, you currently get an 'invalid subcommand' error.
But if we allow ipython foo.py, then I don't see a way to have anything other than ipython notebok replying with anything other than file 'notebok' not found. Essentially, we can't check arguments in the loader anymore, since everything becomes a valid extra argument.

Is there a possibility that these args will ever be anything but files? If not, then that helps a lot.

@minrk
Owner

I've implemented extra_flags in the Application/KVLoader - the Loader just saves every argument it doesn't recognize in extra_args, so it's up to the Application to decide what's valid.

@fperez
Owner
@minrk
Owner

I've got terminal IPython working with the new App class:
#485

@minrk
Owner

Another thing to consider: Do we want warnings on unknown config values? Currently such things are ignored silently, so there's no feedback when you do something like: ipython profiel=mineother than your profile not being selected.

We can do this at two levels:

  1. Check top-level only, so we validate Configurable classes, but not traits
  2. Check each trait name

(1.) would cover the vast majority of cases, because a misspelled alias will be loaded as a top-level value, but doing things like ipython InteractiveShell.autocal=1 would still be ignored unless we check traits as well.

A disadvantage of having these warnings would be if people are using the same config file for multiple apps (e.g. QtConsole). Then it's likely that they will have configuration that only affects one or the other, which would produce these warnings.

@minrk
Owner

I'm working on rewriting the Qt code to use newapp. There is a huge overlap in arguments/configuration between the terminal app I've already done and launching a Kernel. Should I split off a generic InteractiveShellApp class for both to inherit from, or should I make the KernelApp in IPython.zmq inherit from the terminal IPythonApp?

@minrk
Owner

I've got the Kernels started using Applications now, so it's really only the QtConsoleApp that remains.

@minrk
Owner

QtConsoleApp is now working in my qtconfig branch. I need to do a bit of cleanup and get the inline matplotlib backend hooked up to the configuration before I do the PR, but it works, and configuration does propagate down to the Kernel.

@minrk
Owner

Do we have a model for module-level configuration? I simply created a SingletonConfigurable object for this in the inline matplotlib backend, but we should formalize an approach for this sort of thing, because it is relevant to #96 as well.

@ellisonbg
Owner

I think having a module level SingletonConfigurable is a fine approach. We have choosen a very particular model of config that basically uses classes as the core entity that is configured. I think this is a good model and thus, it makes sense to use a top-level class to hold module level config stuff. The only question is whether or not we want to standardize the name of the singleton. Maybe use the name module_config for the instance?

@minrk
Owner

I've just been using the instance() method to get it, and not bothering with a named object, but module_config is a fine name.

Should we standardize the configurable's name as well? Perhaps CamelFileNameConfig (I think that's what I used for the inlinebackend, but I'll check).

@ellisonbg
Owner
@ellisonbg
Owner
@minrk
Owner

Since this sort of thing (tracking a single canonical instance that may or may not be initialized from anywhere) is exactly why an instance() method exists, I think it makes sense.

The inline backend is the only one so far, so I just passed the shell.config in the code where the backend is set up in pylabtools.

It would probably be nice to have an official way to get the current application's config object. Currently the following will work:

cfg = BaseIPythonApplication.instance().config

or similarly with InteractiveShell in place of BaseIPythonApplication for the current shell instance, though those will be the same except in cases where an InteractiveShell is being used outside an IPython app (or an IPApp without a Shell).

We could have a central Config object, possibly stored as IPython.config.current, that gets updated by the Applications and/or shells on configuration.

@fperez
Owner
@ellisonbg
Owner
@minrk
Owner

@fperez Are you saying that we don't want a configurable for the inline backend? That's a module with module-level config. the wx inputhook would be the same. An alternative would be for these modules to query the shell instance for values, but I would argue against that (for the backend at least, less strongly for wx hook).

I am fine with not having a global config storage, but do we want a slightly cleaner way of getting the current active application than the parent class instance call above, or is that fine?

@ellisonbg
Owner
@minrk
Owner

Another thing for which we want access to the parent application is inheriting the logger. Do we want to rely on calling app = BaseIPythonApplication.instance() to get the logger object, or entrust the Application with calling obj = Object(config=self.config, log=self.log) for all objects that might want to log anything? In-between is giving the objects themselves references to the current app (obj = Object(app=self, config=config)).

@ellisonbg
Owner
@minrk
Owner

okay, then nothing needs to change.

Should I merge all of the separate App PRs into newapp now, so there's a single branch with everything up to date? There aren't any unresolved criticisms in any of those PRs at the moment.

Then I can post the merge of the Session objects as well, as that depends on merging parallel and qtapp.

@fperez
Owner
@minrk
Owner

the separate app PRs have been merged, so this now contains all IPython apps launched via newconfig

PR #517 merges the parallel and zmq Session objects, and should probably be the last large change prior to 0.11.

@ellisonbg
Owner

Starting to review. First, Application should have a method to generate the default config file with inline documentation automatically. This method should then be used to generate the default config file for each application that is stored in IPython.config.

@ellisonbg
Owner

The help strings are a bit difficult to read, particularly in the Aliases. We should probably have a quick IRC chat about this.

@ellisonbg
Owner

File by file review

IPython.config.configurable

  • L53: conigurable -> configurable.
  • L155: finish docstring.
  • class_get_trait_help should take the help string justify it for 76 cols and then indent 4 spaces. This will make sure the help strings are unifomly formatted to 80 col text and will also make it easier to write help strings.
  • The flag and alias help strings should also be formatted in this manner.

IPython.config.loader

  • Update the docstring of KeyValueConfigLoader.load_config (argv) to describe how extra arguments are handled. Also in the flags docstring emphasize that the keys are expected to begin with "--".
  • In KeyValueConfigLoader, init should set extra_args = [] and clear should be overriden to do the same.

IPython.config.application

  • Try to begin inline "#" comments with a captital letter and end with a period.
  • Can the logic on L126 be replaced by a _flags_changed method?
  • flag|alias|keyvalue_description should be formatted evenly for 80 text. Currently, lines have very mixed lengths.
  • Limit docstrings and inline comments as much as possible to 80 cols.
  • L172, L199, L215: docstring should begin with capital letter and end with period.
  • Newline at end of file.
  • Test for subcommand logic?

IPython.core.newapplication

  • Remove the old application.py file and rename this to application.py.
  • How are we handling to moving of default config files to profile directories? Currently, it looks like they are copied by default, but I thought we were not going to do that?
  • L130 incorrectly says default config files are in IPython.config.profile. This should be fixed to point to IPython.config.profile.default. Also, technically, these are default config files not default profiles. Should we move this to IPython.config.default? I suppose if we enable the dynamic generation of these files, we don't even have to store them, but could generate them on the fly by application name.

IPython.core.shellapp

  • I vote to remove the following aliases: pi1,pi2,po,si,so,so2,xmode and possibly others.
  • How do users create/list/manage profiles? I thought we were going to have a "profile" subcommand for that.

IPython.frontend.terminal.ipapp

  • I don't know if we still need classic and quick. I am +1 on removing them.
  • The nosep flag should probably do in shellapp as other frontends might want that.
  • Also remove the sl and editor aliases.
  • L212: does this also include the classes from base Application classes? It should right?
  • Do we still need load_default_config?
  • Newline at EOF.

IPython.frontend.qt.console.ipythonqt

  • Rename to ipythonqtapp. Possibly split the main window code out into its own file.
  • Update docstring to reflect that this is not a fll blown console style app.
  • L202: remove editor, pi, po, si, so, so2 aliases. Hmm, do we want to keep editor maybe?
  • I think we should get rid of the ipython-qtconsole script because we are using the subcommand approach.
  • Do we need to think about a better way of passing command line flags and config onto the kernel? Or are you happy with the current approach?

IPython.zmq.kernelapp

  • Newline at EOF.

IPython.parallel.apps

baseapp
.......

  • Update the module docstring.

win32support
............

  • Expand a bit on the docstring, as the second sentence ends 1/2 through.
  • Newline at OEF.

launcher
........

  • I know this is annoying, but can we update the docstrings to remove refs to deferreds and twisted stuff. It looks like these are the original docstrings and things have changed quite a bit.
  • On L519 there is a TODO about getting the SSH launcher working. Is it still broken?
  • Newline at EOF.

ipclusterapp
............

  • It looks like the logic for creating profiles is here, but we may want to consider if we want this in the base ipython application.
  • L365: we import from twisted (daemonize stuff)! Let's copy the daeomonize code to IPython.utils and get rid of this import.

Misc Comments

  • Add yourself liberally to the Authors section of files that you touch.
  • To what extent are all of the apps tested in terms of their command line options, config files, profile handling, etc.
  • Is the plain pykernel working and do we want to keep it?
  • It looks like the helpstrings of many InteractiveShell attributes were not moved over from the old code (separate_in|out|out2, prompt_in1, etc.).
@minrk minrk referenced this pull request from a commit
@minrk minrk code updates per review of PR #454 044a7dc
@minrk
Owner

Most of your suggestions, I just took and implemented. The ones remaining to do tomorrow, and those with comments:

Most of your suggestions I just

IPython.config.application

  • Test for subcommand logic?

I will write some

IPython.core.newapplication

  • Remove the old application.py file and rename this to application.py.

I'll do this this morning

  • How are we handling to moving of default config files to profile directories? Currently, it looks like they are copied by default, but I thought we were not going to do that?
  • L130 incorrectly says default config files are in IPython.config.profile. This should be fixed to point to IPython.config.profile.default. Also, technically, these are default config files not default profiles. Should we move this to IPython.config.default? I suppose if we enable the dynamic generation of these files, we don't even have to store them, but could generate them on the fly by application name.

default files will be autogenerated, so profile/default will be removed

IPython.core.shellapp

  • How do users create/list/manage profiles? I thought we were going to have a "profile" subcommand for that.

ipcluster create/list will be moved to the toplevel of IPython as ipython profile, and be more generic.

IPython.frontend.terminal.ipapp

  • I don't know if we still need classic and quick. I am +1 on removing them.

Definitely keep classic - people use it, I'm ambivalent about quick

  • L212: does this also include the classes from base Application classes? It should right?

No - Application has no classes.

  • Do we still need load_default_config?

Fernando knows more about embed cased

IPython.frontend.qt.console.ipythonqt

  • Rename to ipythonqtapp. Possibly split the main window code out into its own file.

Will do in the morning

  • L202: remove editor, pi, po, si, so, so2 aliases. Hmm, do we want to keep editor maybe?

kept editor

  • I think we should get rid of the ipython-qtconsole script because we are using the subcommand approach.

Easily done, I don't mind this change

  • Do we need to think about a better way of passing command line flags and config onto the kernel? Or are you happy with the current approach?

starting ipython-qtconsole with kernel flags should look no different to the terminal IPython with
the same flags. The current design supports this, but isn't the nicest code.

Misc Comments

  • To what extent are all of the apps tested in terms of their command line options, config files, profile handling, etc.

fairly thoroughly - I am using this branch every day, and I never use master anymore.

  • Is the plain pykernel working and do we want to keep it?

I'm not sure - it certainly hasn't been kept up to date, and has various bugs.
I can imagine keeping a non-IPython kernel around being useful, though.

  • It looks like the helpstrings of many InteractiveShell attributes were not moved over from the old code (separate_in|out|out2, prompt_in1, etc.).

I'll root around for any that dropped off somewhere.

Extra TODO

  • all apps load ipython_config followed by <appname>_config
@ellisonbg
Owner
@minrk
Owner

okay - default config files are automatically generated, and not staged unless explicitly requested by ipython profile create.

ellisonbg and others added some commits
@ellisonbg ellisonbg Draft of new main BaseIPythonApplication. d754418
@ellisonbg ellisonbg Updates to config/application. 8ef4ec5
@ellisonbg ellisonbg Fixing minor bug in config.application. f89956d
@ellisonbg ellisonbg Fixing bugs in BaseIPythonApplication.
* app_name -> name.
* config_file_paths is properly typed.
a3caa0b
@minrk minrk allow utils.text.indent to [optionally] flatten existing indentation. 1b5d4b7
@minrk minrk include default value in help output
also include choices in help output for Enums
1e62cdf
@minrk minrk exit cleanly on help/version 71caec7
@minrk minrk add `--help-all` flag, and don't print all configurables by default 311d79c
@minrk minrk update configurable test_help to match new format 361af6d
@minrk minrk raise test log_level, to prevent output during tests 1748753
@minrk minrk add subcommand support 5753a65
@minrk minrk make config_file_paths List instead of Unicode 700d663
@minrk minrk print usage on invalid command-line arguments 6427730
@minrk minrk make subcommands optional b40bf51
@minrk minrk add initialize() to BaseIPythonApplication
initialize loads config, and ensures command-line opts override those specified in config files.
dd11d73
@minrk minrk reorganize default config files to match profiles as directories
Old files are left in place, until applications make the transition to newapp.
94d9737
@minrk minrk Application profiles are now directories
ProfileDir is adapted from old ClusterDir
3a0676e
@minrk minrk fix _profile_changes/d typo in newapplication e416c1a
@minrk minrk prevent flags from clobbering entire config sections
previously failing test included
9bacc77
@minrk minrk allow extra_args in applications c4b5fb1
@minrk minrk strip whitespace from configurable help e6715a0
@minrk minrk allow empty strings in kv_pattern
doing ipython foo="" would fail as invalid.
dd553fc
@minrk minrk Terminal IPython working with newapp c9ef4c7
@minrk minrk update config files to match new namespace. 5578040
@minrk minrk remove old default config files cacef55
@minrk minrk add clear_instance() to SingletonConfigurable
useful for delegating subapps, which would previously
conflict if both apps were launched with instance()
6253af4
@minrk minrk use App.instance() in Application.initialize_subapp
This way later calls to App.instance() will return the running
application, whereas calling App() would create an isolated
Application object.
d622ed9
@minrk minrk update docs with new cl-arguments 9e6944d
@minrk minrk minor helpstring cleanup per review. 783bdda
@minrk minrk Split generic part of terminal frontend/terminal/ipapp into core/shel…
…lapp

Now there's a class for IPKernel to inherit from in the qt code
9bf0859
@minrk minrk use App.instance() in launch_new_instance
This way later calls to App.instance() will return the running
application, whereas calling App() would create an isolated
Application object.
6d4471d
@minrk minrk zmq kernels now started via newapp c5a3579
@minrk minrk QtConsole now uses newapp e4196fb
@minrk minrk qt font family/size configurable 8a102b8
@minrk minrk add InlineBackendConfig
The inline backend now has preliminary config support for rc and figure format.
4c5383b
@minrk minrk cleanup channel names to match function not socket
closes gh-178
5e622ef
@minrk minrk use Monospace as default font on Linux b77bc75
@minrk minrk update docs/default config for qtconsole 4097157
@minrk minrk expand default_editor message to include configurable
Also set the default editor to notepad on Windows.
3ffb5e7
@minrk minrk update QtConfig section of ipython_config to match actual defaults b9aeee7
@minrk minrk IPKernelApp now based on InteractiveShellApp 61fead1
@minrk minrk all ipcluster scripts in some degree of working order with new config ebe5cf5
@minrk minrk use App.instance() in kernel launchers
This way later calls to App.instance() will return the running
application, whereas calling App() would create an isolated
Application object.
ca91d03
@minrk minrk use logging instead of `print >>` in pykernel c20e80e
@minrk minrk add qtconsole as subapp of terminal ipapp
Now 'ipython qtconsole' will behave the same as 'ipython-qtconsole'
9dcf7cd
@minrk minrk add confirm_exit option to qtconsole to suppress exit dialog 9ab214e
@minrk minrk update pylabtools test to use new print_figure 27e5f25
@minrk minrk ipcluster implemented with new subcommands e3d7fc2
@minrk minrk restore auto_create behavior 39c98c7
@minrk minrk cleanup parallel traits
* eliminate use of CUnicode
* eliminate use of Str
* all remaining CStr will become CBytes
5f4abd1
@minrk minrk re-enable log forwarding and iplogger 2e5a116
@minrk minrk parallel docs, tests, default config updated to newconfig 080d3c7
@minrk minrk use BaseIPythonApp.load_config, not Application.load_config 475b2c3
@minrk minrk update parallel apps to use ProfileDir 54eceb8
@minrk minrk rename clusterdir to more descriptive baseapp
since the 'clusterdir' part is now in the base newapplication, and not cluster-specific.
876bf20
@minrk minrk remove uneccesary Config objects from flags. d551635
@minrk minrk update default config files with new app namespace b5eb8e4
@minrk minrk cleanup Hub/Scheduler to prevent '%s'%<nonascii> errors 26fbd20
@minrk minrk use HMAC digest to sign messages instead of cleartext key
also some cleanup of Session code

security doc updated as well.

Buffers do not get digested, so large (non-copying) messages should not
cause performance to suffer too greatly.
59bfd5d
@minrk minrk fix %px magic output for single target
parallelmagic._maybe_display expects result.stdout to be a list,
but did not handle the single-result case where it is the stdout string
itself, thus printing the first character rather than the whole string.

test included
b550778
@minrk minrk use Context.instance() for default in SessionFactory 80c7e64
@minrk minrk use App.instance() in launch_new_instance (parallel apps)
This way later calls to App.instance() will return the running
application, whereas calling App() would create an isolated
Application object.
2491bfa
@minrk minrk don't pass profile_dir as kwarg in ipclusterapp
also fix PBS->SGE typo from copy/paste
f33ae76
@minrk minrk fix SGE jobarray regex ce97508
@takluyver takluyver Replace Itpl with str.format in parallel launcher.
Signed-off-by: MinRK <benjaminrk@gmail.com>
e783b52
@minrk minrk add EvalFormatter for batch system (PBS) launcher templates
parallel docs now reflect use of Formatter instead of Itpl.
551fa49
@minrk minrk fix double-encoding of png data
commit 046aeba added b64 encoding of png data at the shell level, so the display formatter should *not* do this encoding itself.

also fix typo in InlineBackendConfig._figure_format_changed() method name.
bbc9e72
@minrk minrk merge IPython.parallel.streamsession into IPython.zmq.session
JSON+datetime-related utils in IPython.parallel.util have also been moved
to IPython.utils.jsonutil.
68691d2
@minrk minrk reorganize Factory classes to follow relocation of Session object 0a6d540
@minrk minrk handle datetime objects in Session
also validate packer/unpacker
bdc1136
@minrk minrk use 'timestamp' datatype for timestamps in sqlitedb ecf8fee
@minrk minrk don't clobber existing dicts in extract_dates/squash_dates deb5e7c
@minrk minrk properly handle nothing to recv in StreamKernel.abort a016cea
@minrk minrk get default logger from Application.instance() 710a3b3
@minrk minrk allow configuration of packer/unpacker in client 0c25086
@minrk minrk prevent few remaining db requests from crashing Hub
all db queries should be wrapped in try/except log.error
cf11d28
@minrk minrk finish plumbing config to Session objects
This means that the qtconsole now has full access to HMAC message
digests and non-JSON serialization (pickle, msgpack, etc.).
82222c3
@minrk minrk add LoggingConfigurable base class 4c910d2
@minrk minrk update Session object per review
docstrings fleshed out, minor code cleanup.
7459658
@minrk minrk update recently changed modules with Authors in docstring 9950e71
@minrk minrk scrub twisted/deferred references from launchers
also extract daemonize function from twisted.scripts._twistd_unix
3c996c3
@minrk minrk wrap helpstring output to 80 cols 7733e3c
@minrk minrk code updates per review of PR #454 087a201
@minrk minrk rename ipythonqt to qtconsoleapp
the ipython-qtconsole script has been removed in favor of 'ipython qtconsole', but the ipython-qtconsole *GUI* script remains, when installed with setuptools.
2bdfb69
@minrk minrk rename core.newapplication -> core.application 0869c34
@minrk minrk move ipcluster create|list to `ipython profile create|list`
* give ProfileDir its own file (core.profiledir)
* add core.profileapp for new subcommand

parallel docs updated to match
4512e66
@minrk minrk default config files are automatically generated
and are not staged by default.
cbcdfbc
@minrk minrk `ipython profile` prints profile help
also fix typo introduced into ipcluster
a80225e
@minrk minrk update zmq dependency to 2.1.4 71e6a4a
@takluyver takluyver Don't try to install IPython.config.default (no longer there). 10dfc1c
@minrk minrk catch up tests to recent changes
* po/pi1/2 aliases have been removed
* default print of config help is on its own line
2c9bbc2
@minrk minrk load_subconfig supports profiles
closes gh-523
c335e49
@ellisonbg ellisonbg Fixing --log-level problem in WinHPC job setup. fe05b94
@minrk minrk raise PIDFileError on empty PID file, not ValueError in baseapp b3c5b0c
@minrk minrk move coding declaration above docstring in test_view
it is ignored if it is not first, causing SyntaxErrors
f7c3a49
@jenshnielsen jenshnielsen dir changed from cluster_iptest to profile_iptest 5a3efb2
@minrk minrk move rekey to jsonutil from parallel.util
also make rekey accept basestring, not just str.

closes gh-532
fdbd582
@minrk minrk don't print full old-config message for each old config file
message is now only printed once, and wrapped to 80 columns
02e639e
@minrk minrk rename '--cluster' flag to '--parallel' in ProfileApp
Now, to instruct the profile to include parallel scripts, you would do:

$> ipython profile create foo --parallel
instead of
$> ipython profile create foo --cluster

docs updated accordingly.
e6accb8
@minrk minrk fix setting log_level by name in Application
_log_level_changed was defined more than once
b6c5bfb
@takluyver takluyver Do not flatten unicode on unpacking bf600d5
@minrk minrk update config docs with recent changes
* various classes have changed, profiles are dirs not files, etc.
* also add documentation of new command-line format
158cc42
@minrk minrk don't display profile in banner if default 2b56c84
@minrk minrk closed this pull request from a commit
@minrk minrk Merge branch 'newapp'
closes gh-503
closes gh-454
closes gh-79
closes gh-456
closes gh-451
fbd5ae9
@minrk minrk closed this in fbd5ae9
@ellisonbg ellisonbg referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@ellisonbg ellisonbg referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@mattvonrocketstein mattvonrocketstein referenced this pull request from a commit in mattvonrocketstein/ipython
@minrk minrk code updates per review of PR #454 3427167
@mattvonrocketstein mattvonrocketstein referenced this pull request from a commit in mattvonrocketstein/ipython
@minrk minrk Merge branch 'newapp'
closes gh-503
closes gh-454
closes gh-79
closes gh-456
closes gh-451
94a0a91
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 20, 2011
  1. @ellisonbg @minrk

    Draft of new main BaseIPythonApplication.

    ellisonbg authored minrk committed
  2. @ellisonbg @minrk

    Updates to config/application.

    ellisonbg authored minrk committed
  3. @ellisonbg @minrk

    Fixing minor bug in config.application.

    ellisonbg authored minrk committed
  4. @ellisonbg @minrk

    Fixing bugs in BaseIPythonApplication.

    ellisonbg authored minrk committed
    * app_name -> name.
    * config_file_paths is properly typed.
  5. @minrk
  6. @minrk

    include default value in help output

    minrk authored
    also include choices in help output for Enums
  7. @minrk

    exit cleanly on help/version

    minrk authored
  8. @minrk
  9. @minrk
  10. @minrk
  11. @minrk

    add subcommand support

    minrk authored
  12. @minrk
  13. @minrk
  14. @minrk

    make subcommands optional

    minrk authored
  15. @minrk

    add initialize() to BaseIPythonApplication

    minrk authored
    initialize loads config, and ensures command-line opts override those specified in config files.
  16. @minrk

    reorganize default config files to match profiles as directories

    minrk authored
    Old files are left in place, until applications make the transition to newapp.
  17. @minrk

    Application profiles are now directories

    minrk authored
    ProfileDir is adapted from old ClusterDir
  18. @minrk
  19. @minrk

    prevent flags from clobbering entire config sections

    minrk authored
    previously failing test included
  20. @minrk

    allow extra_args in applications

    minrk authored
  21. @minrk
  22. @minrk

    allow empty strings in kv_pattern

    minrk authored
    doing ipython foo="" would fail as invalid.
  23. @minrk
  24. @minrk
  25. @minrk

    remove old default config files

    minrk authored
  26. @minrk

    add clear_instance() to SingletonConfigurable

    minrk authored
    useful for delegating subapps, which would previously
    conflict if both apps were launched with instance()
  27. @minrk

    use App.instance() in Application.initialize_subapp

    minrk authored
    This way later calls to App.instance() will return the running
    application, whereas calling App() would create an isolated
    Application object.
  28. @minrk
  29. @minrk
  30. @minrk

    Split generic part of terminal frontend/terminal/ipapp into core/shel…

    minrk authored
    …lapp
    
    Now there's a class for IPKernel to inherit from in the qt code
  31. @minrk

    use App.instance() in launch_new_instance

    minrk authored
    This way later calls to App.instance() will return the running
    application, whereas calling App() would create an isolated
    Application object.
  32. @minrk
  33. @minrk

    QtConsole now uses newapp

    minrk authored
  34. @minrk
  35. @minrk

    add InlineBackendConfig

    minrk authored
    The inline backend now has preliminary config support for rc and figure format.
  36. @minrk
  37. @minrk
  38. @minrk
  39. @minrk

    expand default_editor message to include configurable

    minrk authored
    Also set the default editor to notepad on Windows.
  40. @minrk
  41. @minrk
  42. @minrk
  43. @minrk

    use App.instance() in kernel launchers

    minrk authored
    This way later calls to App.instance() will return the running
    application, whereas calling App() would create an isolated
    Application object.
  44. @minrk
  45. @minrk

    add qtconsole as subapp of terminal ipapp

    minrk authored
    Now 'ipython qtconsole' will behave the same as 'ipython-qtconsole'
  46. @minrk
  47. @minrk
  48. @minrk
  49. @minrk

    restore auto_create behavior

    minrk authored
  50. @minrk

    cleanup parallel traits

    minrk authored
    * eliminate use of CUnicode
    * eliminate use of Str
    * all remaining CStr will become CBytes
  51. @minrk
  52. @minrk
  53. @minrk
  54. @minrk
  55. @minrk

    rename clusterdir to more descriptive baseapp

    minrk authored
    since the 'clusterdir' part is now in the base newapplication, and not cluster-specific.
  56. @minrk
  57. @minrk
  58. @minrk
  59. @minrk

    use HMAC digest to sign messages instead of cleartext key

    minrk authored
    also some cleanup of Session code
    
    security doc updated as well.
    
    Buffers do not get digested, so large (non-copying) messages should not
    cause performance to suffer too greatly.
  60. @minrk

    fix %px magic output for single target

    minrk authored
    parallelmagic._maybe_display expects result.stdout to be a list,
    but did not handle the single-result case where it is the stdout string
    itself, thus printing the first character rather than the whole string.
    
    test included
  61. @minrk
  62. @minrk

    use App.instance() in launch_new_instance (parallel apps)

    minrk authored
    This way later calls to App.instance() will return the running
    application, whereas calling App() would create an isolated
    Application object.
  63. @minrk

    don't pass profile_dir as kwarg in ipclusterapp

    minrk authored
    also fix PBS->SGE typo from copy/paste
  64. @minrk

    fix SGE jobarray regex

    minrk authored
  65. @takluyver @minrk

    Replace Itpl with str.format in parallel launcher.

    takluyver authored minrk committed
    Signed-off-by: MinRK <benjaminrk@gmail.com>
  66. @minrk

    add EvalFormatter for batch system (PBS) launcher templates

    minrk authored
    parallel docs now reflect use of Formatter instead of Itpl.
  67. @minrk

    fix double-encoding of png data

    minrk authored
    commit 046aeba added b64 encoding of png data at the shell level, so the display formatter should *not* do this encoding itself.
    
    also fix typo in InlineBackendConfig._figure_format_changed() method name.
  68. @minrk

    merge IPython.parallel.streamsession into IPython.zmq.session

    minrk authored
    JSON+datetime-related utils in IPython.parallel.util have also been moved
    to IPython.utils.jsonutil.
  69. @minrk
  70. @minrk

    handle datetime objects in Session

    minrk authored
    also validate packer/unpacker
  71. @minrk
  72. @minrk
  73. @minrk
  74. @minrk
  75. @minrk
  76. @minrk

    prevent few remaining db requests from crashing Hub

    minrk authored
    all db queries should be wrapped in try/except log.error
  77. @minrk

    finish plumbing config to Session objects

    minrk authored
    This means that the qtconsole now has full access to HMAC message
    digests and non-JSON serialization (pickle, msgpack, etc.).
  78. @minrk
  79. @minrk

    update Session object per review

    minrk authored
    docstrings fleshed out, minor code cleanup.
  80. @minrk
  81. @minrk

    scrub twisted/deferred references from launchers

    minrk authored
    also extract daemonize function from twisted.scripts._twistd_unix
  82. @minrk
  83. @minrk

    code updates per review of PR #454

    minrk authored
  84. @minrk

    rename ipythonqt to qtconsoleapp

    minrk authored
    the ipython-qtconsole script has been removed in favor of 'ipython qtconsole', but the ipython-qtconsole *GUI* script remains, when installed with setuptools.
  85. @minrk
  86. @minrk

    move ipcluster create|list to `ipython profile create|list`

    minrk authored
    * give ProfileDir its own file (core.profiledir)
    * add core.profileapp for new subcommand
    
    parallel docs updated to match
  87. @minrk

    default config files are automatically generated

    minrk authored
    and are not staged by default.
  88. @minrk

    `ipython profile` prints profile help

    minrk authored
    also fix typo introduced into ipcluster
  89. @minrk

    update zmq dependency to 2.1.4

    minrk authored
  90. @takluyver @minrk
  91. @minrk

    catch up tests to recent changes

    minrk authored
    * po/pi1/2 aliases have been removed
    * default print of config help is on its own line
  92. @minrk

    load_subconfig supports profiles

    minrk authored
    closes gh-523
  93. @ellisonbg @minrk

    Fixing --log-level problem in WinHPC job setup.

    ellisonbg authored minrk committed
  94. @minrk
  95. @minrk

    move coding declaration above docstring in test_view

    minrk authored
    it is ignored if it is not first, causing SyntaxErrors
  96. @jenshnielsen @minrk

    dir changed from cluster_iptest to profile_iptest

    jenshnielsen authored minrk committed
  97. @minrk

    move rekey to jsonutil from parallel.util

    minrk authored
    also make rekey accept basestring, not just str.
    
    closes gh-532
  98. @minrk

    don't print full old-config message for each old config file

    minrk authored
    message is now only printed once, and wrapped to 80 columns
  99. @minrk

    rename '--cluster' flag to '--parallel' in ProfileApp

    minrk authored
    Now, to instruct the profile to include parallel scripts, you would do:
    
    $> ipython profile create foo --parallel
    instead of
    $> ipython profile create foo --cluster
    
    docs updated accordingly.
  100. @minrk

    fix setting log_level by name in Application

    minrk authored
    _log_level_changed was defined more than once
  101. @takluyver @minrk

    Do not flatten unicode on unpacking

    takluyver authored minrk committed
  102. @minrk

    update config docs with recent changes

    minrk authored
    * various classes have changed, profiles are dirs not files, etc.
    * also add documentation of new command-line format
Commits on Jun 21, 2011
  1. @minrk
Something went wrong with that request. Please try again.