This commit is contained in:
Thomas Robitaille 2017-11-30 09:51:28 +00:00
Родитель 2113235a66
Коммит b90fb5e583
16 изменённых файлов: 48 добавлений и 48 удалений

Просмотреть файл

@ -19,4 +19,4 @@ install:
- source ci-helpers/travis/setup_conda.sh
script:
- py.test pywwt_web
- py.test pywwt

Просмотреть файл

@ -1,15 +1,15 @@
.. image:: https://travis-ci.org/astrofrog/pywwt-web.svg?branch=tests
:target: https://travis-ci.org/astrofrog/pywwt-web
.. image:: https://travis-ci.org/WorldWideTelescope/pywwt.svg?branch=tests
:target: https://travis-ci.org/WorldWideTelescope/pywwt
.. image:: https://ci.appveyor.com/api/projects/status/hqacnus6g197uo2d/branch/master?svg=true
:target: https://ci.appveyor.com/project/astrofrog/pywwt-web
:target: https://ci.appveyor.com/project/WorldWideTelescope/pywwt
WorldWideTelescope from Python/Jupyter
======================================
**Note: This package is currently under heavy development**.
The pywwt-web package aims to make it easy to use
The pywwt package aims to make it easy to use
WorldWideTelescope from Python, including from the Jupyter notebook. Only a very
small subset of functionality is implemented for now, and we will be adding
functionality over the coming weeks.
@ -23,7 +23,7 @@ conda
If you normally use conda and
just want to try out the latest developer version, you can do this with::
conda install -c conda-forge -c astrofrog/label/dev pywwt-web
conda install -c conda-forge -c astrofrog/label/dev pywwt
This will install a version built in the last 24 hours so may not strictly be
the absolute latest version.
@ -35,8 +35,8 @@ If you don't use conda and/or want to use the very latest version, you can clone
this repository and install the package manually (note that this requires
`npm <https://www.npmjs.com>`_ to be installed)::
git clone https://github.com/astrofrog/pywwt-web.git
cd pywwt-web
git clone https://github.com/WorldWideTelescope/pywwt.git
cd pywwt
pip install -e .
If you want to use the Jupyter widget, you will also need to run::
@ -56,7 +56,7 @@ The Jupyter widget can be used as follows in the Jupyter notebook:
.. code-block:: python
In [1]: from pywwt_web.jupyter_widget import WWTJupyterWidget
In [1]: from pywwt.jupyter_widget import WWTJupyterWidget
In [2]: wwt = WWTJupyterWidget()
...: wwt
@ -72,7 +72,7 @@ To use the Qt widget, start up an IPython session and do:
.. code-block:: python
In [1]: from pywwt_web.qt_widget import WWTQtWidget
In [1]: from pywwt.qt_widget import WWTQtWidget
In [2]: %gui qt
@ -88,7 +88,7 @@ Once a Jupyter or Qt widget has been created, the programmatic user interface is
.. code-block:: python
In [4]: wwt.constellation_figures = True
and methods that can be called:
.. code-block:: python
@ -107,7 +107,7 @@ Reporting issues
----------------
If you run into any issues, please open an issue `here
<https://github.com/astrofrog/pywwt-web/issues>`_
<https://github.com/WorldWideTelescope/pywwt/issues>`_
Acknowledgments
---------------

Просмотреть файл

@ -30,4 +30,4 @@ install:
build: false
test_script:
- "%CMD_IN_ENV% py.test pywwt_web"
- "%CMD_IN_ENV% py.test pywwt"

Просмотреть файл

@ -1,5 +1,5 @@
Documentation
=============
This is the documentation for pywwt_web
This is the documentation for pywwt

Просмотреть файл

@ -7,5 +7,5 @@ Package Install
- [node](http://nodejs.org/)
```bash
npm install --save pywwt_web
npm install --save pywwt
```

Просмотреть файл

@ -7,7 +7,7 @@ if (window.require) {
window.require.config({
map: {
"*" : {
"pywwt_web": "nbextensions/pywwt_web/index",
"pywwt": "nbextensions/pywwt/index",
}
}
});

Просмотреть файл

@ -5,7 +5,7 @@
// Some static assets may be required by the custom widget javascript. The base
// url for the notebook is not known at build time and is therefore computed
// dynamically.
__webpack_public_path__ = document.querySelector('body').getAttribute('data-base-url') + 'nbextensions/pywwt_web/';
__webpack_public_path__ = document.querySelector('body').getAttribute('data-base-url') + 'nbextensions/pywwt/';
// Export widget models and views, and the npm package version number.
module.exports = require('./wwt.js');

Просмотреть файл

@ -6,11 +6,11 @@ var base = require('@jupyter-widgets/base');
* The widget manager provider.
*/
module.exports = {
id: 'pywwt_web',
id: 'pywwt',
requires: [base.IJupyterWidgetRegistry],
activate: function(app, widgets) {
widgets.registerWidget({
name: 'pywwt_web',
name: 'pywwt',
version: wwt.version,
exports: wwt
});

Просмотреть файл

@ -5,8 +5,8 @@ var WWTModel = widgets.DOMWidgetModel.extend({
defaults: _.extend(widgets.DOMWidgetModel.prototype.defaults(), {
_model_name : 'WWTModel',
_view_name : 'WWTView',
_model_module : 'pywwt_web',
_view_module : 'pywwt_web',
_model_module : 'pywwt',
_view_module : 'pywwt',
_model_module_version : '0.1.0',
_view_module_version : '0.1.0',
})
@ -21,7 +21,7 @@ var WWTView = widgets.DOMWidgetView.extend({
// page. We use the same HTML file as for the Qt client.
var div = document.createElement("div");
nbextensions = requirejs.s.contexts._.config.paths.nbextensions;
div.innerHTML = "<iframe width='100%' height='480' style='border: none;' src='" + nbextensions + "/pywwt_web/wwt.html'></iframe>"
div.innerHTML = "<iframe width='100%' height='480' style='border: none;' src='" + nbextensions + "/pywwt/wwt.html'></iframe>"
this.el.appendChild(div);
WWTView.__super__.initialize.apply(this, arguments);

Просмотреть файл

@ -1,12 +1,12 @@
{
"name": "pywwt_web",
"name": "pywwt",
"version": "0.1.0",
"description": "WorldWideTelescope Jupyter widget",
"author": "Thomas P. Robitaille",
"main": "lib/index.js",
"repository": {
"type": "git",
"url": "https://github.com/astrofrog/pywwt_web.git"
"url": "https://github.com/astrofrog/pywwt.git"
},
"keywords": [
"jupyter",

Просмотреть файл

@ -20,7 +20,7 @@ module.exports = [
entry: './lib/extension.js',
output: {
filename: 'extension.js',
path: path.resolve(__dirname, '..', 'pywwt_web', 'static'),
path: path.resolve(__dirname, '..', 'pywwt', 'static'),
libraryTarget: 'amd'
}
},
@ -33,7 +33,7 @@ module.exports = [
entry: './lib/index.js',
output: {
filename: 'index.js',
path: path.resolve(__dirname, '..', 'pywwt_web', 'static'),
path: path.resolve(__dirname, '..', 'pywwt', 'static'),
libraryTarget: 'amd'
},
devtool: 'source-map',
@ -42,7 +42,7 @@ module.exports = [
},
externals: ['@jupyter-widgets/base']
},
{// Embeddable pywwt_web bundle
{// Embeddable pywwt bundle
//
// This bundle is generally almost identical to the notebook bundle
// containing the custom widget views and models.
@ -61,7 +61,7 @@ module.exports = [
filename: 'index.js',
path: path.resolve(__dirname, 'dist'),
libraryTarget: 'amd',
publicPath: 'https://unpkg.com/pywwt_web@' + version + '/dist/'
publicPath: 'https://unpkg.com/pywwt@' + version + '/dist/'
},
devtool: 'source-map',
module: {

Просмотреть файл

@ -5,6 +5,6 @@ def _jupyter_nbextension_paths():
return [{
'section': 'notebook',
'src': 'static',
'dest': 'pywwt_web',
'require': 'pywwt_web/extension'
'dest': 'pywwt',
'require': 'pywwt/extension'
}]

Просмотреть файл

@ -19,8 +19,8 @@ class WWTJupyterWidget(widgets.DOMWidget, BaseWWTWidget):
_view_name = Unicode('WWTView').tag(sync=True)
_model_name = Unicode('WWTModel').tag(sync=True)
_view_module = Unicode('pywwt_web').tag(sync=True)
_model_module = Unicode('pywwt_web').tag(sync=True)
_view_module = Unicode('pywwt').tag(sync=True)
_model_module = Unicode('pywwt').tag(sync=True)
_view_module_version = Unicode('^0.1.0').tag(sync=True)
_model_module_version = Unicode('^0.1.0').tag(sync=True)

Просмотреть файл

@ -1,3 +1,3 @@
import logging
logger = logging.getLogger('pywwt_web')
logger = logging.getLogger('pywwt')

Просмотреть файл

@ -37,7 +37,7 @@ select = E101,W191,W291,W292,W293,W391,E111,E112,E113,E901,E902
exclude = extern,sphinx,*parsetab.py
[metadata]
package_name = pywwt_web
package_name = pywwt
description = Python interface for the web version of WorldWide Telescope
long_description =
author = Thomas P. Robitaille and Justin Oderah
@ -45,6 +45,6 @@ author_email = thomas.robitaille@gmail.com
license = BSD 3-Clause
url =
edit_on_github = True
github_project = astrofrog/pywwt_web
github_project = astrofrog/pywwt
install_requires = astropy
version = 0.1.dev0

Просмотреть файл

@ -66,8 +66,8 @@ class NPM(Command):
node_modules = os.path.join(node_root, 'node_modules')
targets = [
os.path.join(here, 'pywwt_web', 'static', 'extension.js'),
os.path.join(here, 'pywwt_web', 'static', 'index.js')
os.path.join(here, 'pywwt', 'static', 'extension.js'),
os.path.join(here, 'pywwt', 'static', 'index.js')
]
def initialize_options(self):
@ -121,22 +121,22 @@ class NPM(Command):
update_package_data(self.distribution)
version_ns = {}
with open(os.path.join(here, 'pywwt_web', '_version.py')) as f:
with open(os.path.join(here, 'pywwt', '_version.py')) as f:
exec(f.read(), {}, version_ns)
setup_args = {
'name': 'pywwt_web',
'name': 'pywwt',
'version': version_ns['__version__'],
'description': 'WorldWideTelescope Jupyter widget',
'long_description': LONG_DESCRIPTION,
'include_package_data': True,
'data_files': [
('share/jupyter/nbextensions/pywwt_web', [
'pywwt_web/static/extension.js',
'pywwt_web/static/index.js',
'pywwt_web/static/index.js.map',
'pywwt_web/static/wwt.html',
'pywwt_web/static/wwt_json_api.js'
('share/jupyter/nbextensions/pywwt', [
'pywwt/static/extension.js',
'pywwt/static/index.js',
'pywwt/static/index.js.map',
'pywwt/static/wwt.html',
'pywwt/static/wwt_json_api.js'
]),
],
'install_requires': [
@ -157,7 +157,7 @@ setup_args = {
'author': 'Thomas P. Robitaille',
'author_email': 'thomas.robitaille@gmail.com',
'url': 'https://github.com/astrofrog/pywwt_web',
'url': 'https://github.com/astrofrog/pywwt',
'keywords': [
'ipython',
'jupyter',