Skip to content

Commit

Permalink
Prep for 3.1.4 release (#1127)
Browse files Browse the repository at this point in the history
  • Loading branch information
hainm authored Nov 22, 2024
1 parent 30a1ff5 commit d20c319
Show file tree
Hide file tree
Showing 43 changed files with 443 additions and 2,286 deletions.
4 changes: 0 additions & 4 deletions .github/nglview-gha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,3 @@ dependencies:
- mdtraj
- ambertools # have both pytraj and parmed
- pip
- pip:
- simpletraj


2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.9, 3.11, 3.12]
python-version: ["3.10", "3.11", "3.12"]

steps:
- name: Checkout nglview repository
Expand Down
21 changes: 17 additions & 4 deletions devtools/release.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
#!/usr/bin/env python

"""
Steps:
- cd nglview/static
- git rm -rf ./*
- cd nglview/staticlab
- git rm -rf ./*
- cd js
- npm install
- cd ../nglview
- git add static staticlab
"""

import subprocess
import sys
from pathlib import Path
import time

HERE = Path(__file__).parents[1].resolve().absolute()
sys.path.insert(0, str(HERE))
Expand All @@ -18,13 +33,11 @@
print("front_end_version", front_end_version)

if front_end_version != latest_tag:
print(f"Version mismatch between front_end_version {front_end_version} and latest_tag {latest_tag}")
sys.exit(1)
print(f"WARNING: Version mismatch between front_end_version {front_end_version} and latest_tag {latest_tag}")
time.sleep(5)

print("\nMake sure to publish npm package")
output = subprocess.check_output(["npm", "search", "nglview-js-widgets"]).decode()
print(output)

subprocess.check_call('cd nglview/labextension && git clean -fdx .', shell=True)
subprocess.check_call('cd js && npm install && npm run copy:labextension', shell=True)
subprocess.check_call('python setup.py sdist', shell=True)
12 changes: 0 additions & 12 deletions devtools/update_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,6 @@

version = sys.argv[1]
HERE = Path(__file__).parents[1].resolve().absolute()
sys.path.insert(0, str(HERE))

import versioneer
dirty_version = versioneer.get_version()
clean_version = dirty_version.split('+')[0]

print(f"Current nglview version = {dirty_version}")
print(f"Front end version = {version}")

if parse_version(clean_version) != parse_version(version):
print("WARNING: Current nglview version should be equal to front end version")

pkg_file = HERE / "js/package.json"

content = []
Expand Down
2 changes: 1 addition & 1 deletion js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nglview-js-widgets",
"version": "3.1.0",
"version": "3.1.4",
"description": "nglview-js-widgets",
"keywords": [
"ipython",
Expand Down
18 changes: 9 additions & 9 deletions nglview/__init__.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
import warnings

# for doc
from . import adaptor, datafiles, show, widget
from ._version import get_versions
from .adaptor import *
from .base_adaptor import *
# TODO: do not use import *
# interface
from .config import BACKENDS
from .data_source import DatasourceRegistry
from .show import *
# utils
from .utils import js_utils, widget_utils
from .widget import NGLWidget, write_html

__version__ = get_versions()['version']
del get_versions
import pkg_resources

try:
__version__ = pkg_resources.get_distribution("nglview").version
except pkg_resources.DistributionNotFound:
__version__ = "unknown"

del pkg_resources

with warnings.catch_warnings():
warnings.simplefilter("ignore")

# Register nbextension


# FIXME: do we still need this?
def _jupyter_nbextension_paths():
return [{
'section': 'notebook',
Expand Down
2 changes: 1 addition & 1 deletion nglview/_frontend.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__frontend_version__ = '3.1.0'
__frontend_version__ = '3.1.4'
Loading

0 comments on commit d20c319

Please sign in to comment.