Skip to content

Commit

Permalink
Bump to v2
Browse files Browse the repository at this point in the history
* Bump to v2

* Enforce jupyterlab version

* Add nodejs in the installation script

* Switch to github workflow for publication
  • Loading branch information
fcollonval committed Dec 30, 2020
1 parent 6384332 commit 3ea2154
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 53 deletions.
4 changes: 1 addition & 3 deletions .binder/environment.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
channels:
- conda-forge

dependencies:
- python>=3.6
- pytest
- jupyterlab
- jupyterlab>=2.0.0,<3.0.0
- cookiecutter
- nodejs
- git
- yarn
40 changes: 40 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Publish Package

on:
release:
types: [published]


jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install node
uses: actions/setup-node@v1
with:
node-version: '14.x'
registry-url: 'https://registry.npmjs.org'
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install jupyterlab setuptools twine wheel
- name: Publish the Python package
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
- name: Publish the NPM package
run: |
echo $PRE_RELEASE
if [[ $PRE_RELEASE == "true" ]]; then export TAG="next"; else export TAG="latest"; fi
npm publish --tag ${TAG} --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
PRE_RELEASE: ${{ github.event.release.prerelease }}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2011, Hadrien Mary
Copyright (c) 2011-2020, Hadrien Mary, Frederic Collonval
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
[![Build Status](https://travis-ci.com/hadim/jupyter-archive.svg?branch=master)](https://travis-ci.com/hadim/jupyter-archive)
[![Version](https://img.shields.io/npm/v/@hadim/jupyter-archive.svg)](https://www.npmjs.com/package/@hadim/jupyter-archive)
[![PyPI](https://img.shields.io/pypi/v/jupyter-archive)](https://pypi.org/project/jupyter-archive/)
[![Conda (channel only)](https://img.shields.io/conda/vn/conda-forge/jupyter-archive)](https://anaconda.org/conda-forge/jupyter-archive)

A Jupyter/Jupyterlab extension to make, download and extract archive files.
A Jupyterlab extension to make, download and extract archive files.

Features:

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

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

## Prerequisites

- JupyterLab
- JupyterLab >=2.0.0,<3.0.0

## Installation

Expand All @@ -35,12 +36,13 @@ jupyter lab build
Using `conda`:

```bash
conda install jupyter-archive
conda install -c conda-forge nodejs jupyter-archive
jupyter lab build
```

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

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`.
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`.

## Development

Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ channels:
dependencies:
- python>=3.6
- pytest
- jupyterlab
- jupyterlab>=2.0.0,<3.0.0
- cookiecutter
- nodejs
- git
Expand Down
2 changes: 1 addition & 1 deletion jupyter_archive/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) Project Jupyter.
# Distributed under the terms of the Modified BSD License.

__version__ = '0.7.1-dev'
__version__ = '2.0.0'
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@hadim/jupyter-archive",
"version": "0.7.1-dev",
"description": "A Jupyter/Jupyterlab extension to make, download and extract archive files.",
"version": "2.0.0",
"description": "A Jupyterlab extension to make, download and extract archive files.",
"keywords": [
"jupyter",
"jupyterlab",
Expand Down
38 changes: 0 additions & 38 deletions rever.xsh

This file was deleted.

7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import pathlib
from os.path import join as pjoin
from setuptools import find_packages, setup

Expand Down Expand Up @@ -46,10 +47,11 @@
setup(
name=name.replace("_", "-"),
version=version,
author="Hadrien Mary",
author_email="hadrien.mary@gmail.com",
author="Hadrien Mary, Frederic Collonval",
author_email="hadrien.mary@gmail.com, fcollonval@gmail.com",
url="https://github.com/hadim/jupyter-archive/",
description="A Jupyter/Jupyterlab extension to make, download and extract archive files.",
long_description=(pathlib.Path(HERE) / "README.md").read_text(),
long_description_content_type="text/markdown",
cmdclass=cmdclass,
packages=find_packages(),
Expand All @@ -65,4 +67,5 @@
include_package_data=True,
install_requires=["notebook"],
extras_require={"test": ["jupyterlab", "pytest"]},
python_requires=">=3.5,<4"
)

0 comments on commit 3ea2154

Please sign in to comment.