Skip to content

Commit 3ea2154

Browse files
authored
Bump to v2
* Bump to v2 * Enforce jupyterlab version * Add nodejs in the installation script * Switch to github workflow for publication
1 parent 6384332 commit 3ea2154

File tree

9 files changed

+58
-53
lines changed

9 files changed

+58
-53
lines changed

.binder/environment.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
channels:
22
- conda-forge
3-
43
dependencies:
54
- python>=3.6
65
- pytest
7-
- jupyterlab
6+
- jupyterlab>=2.0.0,<3.0.0
87
- cookiecutter
98
- nodejs
109
- git
11-
- yarn

.github/workflows/publish.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Publish Package
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Install node
14+
uses: actions/setup-node@v1
15+
with:
16+
node-version: '14.x'
17+
registry-url: 'https://registry.npmjs.org'
18+
- name: Install Python
19+
uses: actions/setup-python@v2
20+
with:
21+
python-version: '3.x'
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install jupyterlab setuptools twine wheel
26+
- name: Publish the Python package
27+
env:
28+
TWINE_USERNAME: __token__
29+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
30+
run: |
31+
python setup.py sdist bdist_wheel
32+
twine upload dist/*
33+
- name: Publish the NPM package
34+
run: |
35+
echo $PRE_RELEASE
36+
if [[ $PRE_RELEASE == "true" ]]; then export TAG="next"; else export TAG="latest"; fi
37+
npm publish --tag ${TAG} --access public
38+
env:
39+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
40+
PRE_RELEASE: ${{ github.event.release.prerelease }}

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2011, Hadrien Mary
1+
Copyright (c) 2011-2020, Hadrien Mary, Frederic Collonval
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
[![Build Status](https://travis-ci.com/hadim/jupyter-archive.svg?branch=master)](https://travis-ci.com/hadim/jupyter-archive)
55
[![Version](https://img.shields.io/npm/v/@hadim/jupyter-archive.svg)](https://www.npmjs.com/package/@hadim/jupyter-archive)
66
[![PyPI](https://img.shields.io/pypi/v/jupyter-archive)](https://pypi.org/project/jupyter-archive/)
7+
[![Conda (channel only)](https://img.shields.io/conda/vn/conda-forge/jupyter-archive)](https://anaconda.org/conda-forge/jupyter-archive)
78

8-
A Jupyter/Jupyterlab extension to make, download and extract archive files.
9+
A Jupyterlab extension to make, download and extract archive files.
910

1011
Features:
1112

@@ -17,11 +18,11 @@ Features:
1718
- Decompress an archive directly in file browser.
1819
- Notebok client extension not available. [Contributions are welcome](https://github.com/hadim/jupyter-archive/issues/21).
1920

20-
![jupyter-archive in action](./archive.gif "jupyter-archive in action.")
21+
![jupyter-archive in action](https://raw.githubusercontent.com/hadim/jupyter-archive/master/archive.gif)
2122

2223
## Prerequisites
2324

24-
- JupyterLab
25+
- JupyterLab >=2.0.0,<3.0.0
2526

2627
## Installation
2728

@@ -35,12 +36,13 @@ jupyter lab build
3536
Using `conda`:
3637

3738
```bash
38-
conda install jupyter-archive
39+
conda install -c conda-forge nodejs jupyter-archive
40+
jupyter lab build
3941
```
4042

4143
This will install both the server extension and the Jupyterlab extension needed by the plugin.
4244

43-
You can also install the labextension via Jupyterlab's extension manager GUI. Keep in mind that if you use the GUI, you'll still need to install the `jupyterlab-archive` server extension via `pip` or `conda`.
45+
You can also install the labextension via Jupyterlab's extension manager GUI. Keep in mind that if you use the GUI, you'll still need to install the `jupyter-archive` server extension via `pip` or `conda`.
4446

4547
## Development
4648

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ channels:
44
dependencies:
55
- python>=3.6
66
- pytest
7-
- jupyterlab
7+
- jupyterlab>=2.0.0,<3.0.0
88
- cookiecutter
99
- nodejs
1010
- git

jupyter_archive/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Copyright (c) Project Jupyter.
22
# Distributed under the terms of the Modified BSD License.
33

4-
__version__ = '0.7.1-dev'
4+
__version__ = '2.0.0'

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@hadim/jupyter-archive",
3-
"version": "0.7.1-dev",
4-
"description": "A Jupyter/Jupyterlab extension to make, download and extract archive files.",
3+
"version": "2.0.0",
4+
"description": "A Jupyterlab extension to make, download and extract archive files.",
55
"keywords": [
66
"jupyter",
77
"jupyterlab",

rever.xsh

Lines changed: 0 additions & 38 deletions
This file was deleted.

setup.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import pathlib
12
from os.path import join as pjoin
23
from setuptools import find_packages, setup
34

@@ -46,10 +47,11 @@
4647
setup(
4748
name=name.replace("_", "-"),
4849
version=version,
49-
author="Hadrien Mary",
50-
author_email="[email protected]",
50+
author="Hadrien Mary, Frederic Collonval",
51+
5152
url="https://github.com/hadim/jupyter-archive/",
5253
description="A Jupyter/Jupyterlab extension to make, download and extract archive files.",
54+
long_description=(pathlib.Path(HERE) / "README.md").read_text(),
5355
long_description_content_type="text/markdown",
5456
cmdclass=cmdclass,
5557
packages=find_packages(),
@@ -65,4 +67,5 @@
6567
include_package_data=True,
6668
install_requires=["notebook"],
6769
extras_require={"test": ["jupyterlab", "pytest"]},
70+
python_requires=">=3.5,<4"
6871
)

0 commit comments

Comments
 (0)