Skip to content

Commit

Permalink
Update js packages to please CI (#1110)
Browse files Browse the repository at this point in the history
  • Loading branch information
hainm authored Jun 20, 2024
1 parent c24a899 commit e37b14d
Show file tree
Hide file tree
Showing 14 changed files with 199 additions and 2,043 deletions.
13 changes: 6 additions & 7 deletions .github/nglview-gha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ channels:
- conda-forge

dependencies:
- python>=3.6
- pip
- jupyter-packaging
- qcelemental
- traitlets
Expand All @@ -15,15 +13,12 @@ dependencies:
- notebook
- mock
- coverage
- nose
- pytest
- pytest-cov
- coveralls
- pandas
- ase
- biopython
- pymatgen
- simpletraj
- matplotlib
- moviepy
- imageio
Expand All @@ -32,5 +27,9 @@ dependencies:
- rdkit
- mdanalysis
- mdtraj
- parmed
- ambertools
- ambertools # have both pytraj and parmed
- pip
- pip:
- simpletraj


2 changes: 1 addition & 1 deletion .github/workflows/build-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Install node
uses: actions/setup-node@v1
with:
node-version: '16.x'
node-version: '20.x'
- name: Install Python
uses: actions/setup-python@v2
with:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.9]
python-version: [3.9, 3.11, 3.12]

steps:
- name: Checkout nglview repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Cache conda
uses: actions/cache@v3
uses: actions/cache@v4
env:
CACHE_NUMBER: 2 # Increase this value to reset cache if .github/nglview-gha.yml has not changed
with:
Expand All @@ -32,7 +32,7 @@ jobs:
${{ matrix.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('.github/nglview-gha.yml') }}

- name: Set up conda environment
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
auto-activate-base: false
Expand All @@ -52,4 +52,4 @@ jobs:
run: |
python setup.py sdist
pip install dist/*gz
python -c "import nglview as nv; print(nv.__version__)"
python -c "import nglview as nv; print(nv.__version__)"
5 changes: 0 additions & 5 deletions js/.eslintignore

This file was deleted.

21 changes: 0 additions & 21 deletions js/.eslintrc

This file was deleted.

6 changes: 6 additions & 0 deletions js/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
files: ["**/*.ts"],
languageOptions: {
parser: require('@typescript-eslint/parser'), // Specifies the ESLint parser
}
};
12 changes: 6 additions & 6 deletions js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
"clean:labextension": "rimraf myextension/labextension",
"clean:all": "yarn run clean:lib && yarn run clean:labextension",
"eslint": "eslint . --ext .ts,.tsx --fix",
"eslint:check": "eslint . --ext .ts,.tsx",
"eslint": "eslint '**/*.ts' --fix",
"eslint:check": "eslint '**/*.ts'",
"install:extension": "jupyter labextension develop --overwrite .",
"prepare": "yarn run clean && yarn run build:prod",
"watch": "run-p watch:src watch:labextension",
Expand All @@ -70,11 +70,11 @@
"@types/mocha": "^2.2.48",
"@types/node": "^16.0.0",
"@types/requirejs": "^2.1.31",
"@typescript-eslint/eslint-plugin": "^4.8.1",
"@typescript-eslint/parser": "^4.8.1",
"@typescript-eslint/eslint-plugin": "^7.13.1",
"@typescript-eslint/parser": "^7.13.1",
"babel-register": "^6.11.6",
"css-loader": "^0.23.1",
"eslint": "^7.14.0",
"eslint": "^8.5.6",
"file-loader": "^1.1.6",
"json-loader": "^0.5.4",
"mkdirp": "^1.0.3",
Expand All @@ -83,7 +83,7 @@
"prettier": "^2.1.1",
"rimraf": "^3.0.2",
"style-loader": "^0.13.1",
"typescript": "~4.1.3",
"typescript": "~5.4.5",
"webpack": "^3.12.0"
},
"sideEffects": [
Expand Down
2 changes: 1 addition & 1 deletion nglview/static/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ if (window.require) {
module.exports = {
load_ipython_extension: function () { }
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXh0ZW5zaW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2V4dGVuc2lvbi5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSw2RUFBNkU7QUFDN0UsNEVBQTRFO0FBQzVFLGdEQUFnRDtBQUVoRCxzQkFBc0I7QUFDdEIsSUFBSSxNQUFNLENBQUMsT0FBTyxFQUFFO0lBQ2hCLE1BQU0sQ0FBQyxPQUFPLENBQUMsTUFBTSxDQUFDO1FBQ2xCLEdBQUcsRUFBRTtZQUNELEdBQUcsRUFBRztnQkFDRixvQkFBb0IsRUFBRSx1Q0FBdUM7YUFDaEU7U0FDSjtLQUNKLENBQUMsQ0FBQztDQUNOO0FBRUQsNkNBQTZDO0FBQzdDLE1BQU0sQ0FBQyxPQUFPLEdBQUc7SUFDYixzQkFBc0IsRUFBRSxjQUFZLENBQUM7Q0FDeEMsQ0FBQyJ9
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXh0ZW5zaW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2V4dGVuc2lvbi5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSw2RUFBNkU7QUFDN0UsNEVBQTRFO0FBQzVFLGdEQUFnRDtBQUVoRCxzQkFBc0I7QUFDdEIsSUFBSSxNQUFNLENBQUMsT0FBTyxFQUFFLENBQUM7SUFDakIsTUFBTSxDQUFDLE9BQU8sQ0FBQyxNQUFNLENBQUM7UUFDbEIsR0FBRyxFQUFFO1lBQ0QsR0FBRyxFQUFHO2dCQUNGLG9CQUFvQixFQUFFLHVDQUF1QzthQUNoRTtTQUNKO0tBQ0osQ0FBQyxDQUFDO0FBQ1AsQ0FBQztBQUVELDZDQUE2QztBQUM3QyxNQUFNLENBQUMsT0FBTyxHQUFHO0lBQ2Isc0JBQXNCLEVBQUUsY0FBWSxDQUFDO0NBQ3hDLENBQUMifQ==

/***/ })
/******/ ])});;
311 changes: 160 additions & 151 deletions nglview/static/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion nglview/static/index.js.map

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions nglview/staticlab/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
"clean:labextension": "rimraf myextension/labextension",
"clean:all": "yarn run clean:lib && yarn run clean:labextension",
"eslint": "eslint . --ext .ts,.tsx --fix",
"eslint:check": "eslint . --ext .ts,.tsx",
"eslint": "eslint '**/*.ts' --fix",
"eslint:check": "eslint '**/*.ts'",
"install:extension": "jupyter labextension develop --overwrite .",
"prepare": "yarn run clean && yarn run build:prod",
"watch": "run-p watch:src watch:labextension",
Expand All @@ -70,11 +70,11 @@
"@types/mocha": "^2.2.48",
"@types/node": "^16.0.0",
"@types/requirejs": "^2.1.31",
"@typescript-eslint/eslint-plugin": "^4.8.1",
"@typescript-eslint/parser": "^4.8.1",
"@typescript-eslint/eslint-plugin": "^7.13.1",
"@typescript-eslint/parser": "^7.13.1",
"babel-register": "^6.11.6",
"css-loader": "^0.23.1",
"eslint": "^7.14.0",
"eslint": "^8.5.6",
"file-loader": "^1.1.6",
"json-loader": "^0.5.4",
"mkdirp": "^1.0.3",
Expand All @@ -83,7 +83,7 @@
"prettier": "^2.1.1",
"rimraf": "^3.0.2",
"style-loader": "^0.13.1",
"typescript": "~4.1.3",
"typescript": "~5.4.5",
"webpack": "^3.12.0"
},
"sideEffects": [
Expand All @@ -101,7 +101,7 @@
}
},
"_build": {
"load": "static/remoteEntry.21d0885d0060a84340da.js",
"load": "static/remoteEntry.4aa080b2a45dbecd0a13.js",
"extension": "./extension",
"style": "./style"
}
Expand Down
6 changes: 3 additions & 3 deletions nglview/staticlab/static/third-party-licenses.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
{
"name": "css-loader",
"versionInfo": "6.9.0",
"versionInfo": "6.11.0",
"licenseId": "MIT",
"extractedText": "Copyright JS Foundation and other contributors\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
},
Expand All @@ -20,9 +20,9 @@
},
{
"name": "jquery-ui",
"versionInfo": "1.13.2",
"versionInfo": "1.13.3",
"licenseId": "MIT",
"extractedText": "Copyright jQuery Foundation and other contributors, https://jquery.org/\n\nThis software consists of voluntary contributions made by many\nindividuals. For exact contribution history, see the revision history\navailable at https://github.com/jquery/jquery-ui\n\nThe following license applies to all parts of this software except as\ndocumented below:\n\n====\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n====\n\nCopyright and related rights for sample code are waived via CC0. Sample\ncode is defined as all source code contained within the demos directory.\n\nCC0: http://creativecommons.org/publicdomain/zero/1.0/\n\n====\n\nAll files located in the node_modules and external directories are\nexternally maintained libraries used by this software which have their\nown licenses; we recommend you read them, as their terms may differ from\nthe terms above.\n"
"extractedText": "Copyright OpenJS Foundation and other contributors, https://openjsf.org/\n\nThis software consists of voluntary contributions made by many\nindividuals. For exact contribution history, see the revision history\navailable at https://github.com/jquery/jquery-ui\n\nThe following license applies to all parts of this software except as\ndocumented below:\n\n====\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n====\n\nCopyright and related rights for sample code are waived via CC0. Sample\ncode is defined as all source code contained within the demos directory.\n\nCC0: http://creativecommons.org/publicdomain/zero/1.0/\n\n====\n\nAll files located in the node_modules and external directories are\nexternally maintained libraries used by this software which have their\nown licenses; we recommend you read them, as their terms may differ from\nthe terms above.\n"
},
{
"name": "ngl",
Expand Down
14 changes: 3 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@
create_cmdclass,
)

import versioneer
from versioneer import get_cmdclass

sdist = get_cmdclass()['sdist']
build_py = get_cmdclass()['build_py']

here = os.path.dirname(os.path.abspath(__file__))
node_root = os.path.join(here, 'js')
is_repo = os.path.exists(os.path.join(here, '.git'))
Expand Down Expand Up @@ -151,14 +145,12 @@ def run(self):
data_files_spec=data_files_spec
)
cmdclass['jsdeps'] = NPM
cmdclass['version'] = get_cmdclass()['version']
cmdclass['build_py'] = js_prerelease(build_py)
cmdclass['sdist'] = js_prerelease(sdist, strict=True)
cmdclass['egg_info'] = js_prerelease(egg_info)

setup_args = {
'name': 'nglview',
'version': versioneer.get_version(),
"use_scm_version": True,
"setup_requires": ['setuptools_scm'],
'description': 'IPython widget to interactively view molecular structures and trajectories.',
'include_package_data': True,
'license': "MIT",
Expand Down Expand Up @@ -196,7 +188,7 @@ def run(self):
"htmd": ["htmd"],
"qcelemental": ["qcelemental"],
},
'packages': set(find_packages() +
'packages': set(find_packages() +
['nglview',
'nglview.static',
'nglview.staticlab',
Expand Down
Loading

0 comments on commit e37b14d

Please sign in to comment.