Skip to content

Commit

Permalink
Merge pull request #78 from kevin-bates/list-version
Browse files Browse the repository at this point in the history
List server version in initial log and server-info file
  • Loading branch information
rolweber authored Aug 21, 2019
2 parents 009ffde + d3b7272 commit 69daee7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion jupyter_server/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@

# Next beta/alpha/rc release: The version number for beta is X.Y.ZbN **without dots**.

version_info = (0, 1, 1, '')
version_info = (0, 2, 0, '.dev0')
__version__ = '.'.join(map(str, version_info[:3])) + ''.join(version_info[3:])
4 changes: 3 additions & 1 deletion jupyter_server/serverapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -1493,7 +1493,8 @@ def notebook_info(self, kernel_count=True):
info += kernel_msg % n_kernels
info += "\n"
# Format the info so that the URL fits on a single line in 80 char display
info += _("The Jupyter Server is running at:\n%s") % self.display_url
info += _("Jupyter Server {version} is running at:\n{url}".
format(version=ServerApp.version, url=self.display_url))
return info

def server_info(self):
Expand All @@ -1507,6 +1508,7 @@ def server_info(self):
'root_dir': os.path.abspath(self.root_dir),
'password': bool(self.password),
'pid': os.getpid(),
'version': ServerApp.version,
}

def write_server_info_file(self):
Expand Down
1 change: 1 addition & 0 deletions jupyter_server/tests/test_serverapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def get_servers():
nt.assert_equal(len(servers), 1)
nt.assert_equal(servers[0]['port'], svapp.port)
nt.assert_equal(servers[0]['url'], svapp.connection_url)
nt.assert_equal(servers[0]['version'], svapp.version)
svapp.remove_server_info_file()
nt.assert_equal(get_servers(), [])

Expand Down

0 comments on commit 69daee7

Please sign in to comment.