-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* get deps up-to-date, add graphql-ws * install subscriptions * did someone say subscriptions? * blacken * sure, let's call it a version * subscribe to something useful
- Loading branch information
Showing
16 changed files
with
480 additions
and
529 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# CHANGELOG | ||
|
||
## Unreleased | ||
|
||
### 0.2.0 | ||
- Subscriptions (in server and GraphiQL) | ||
|
||
### 0.1.0 | ||
- Basic Capability with contents manager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: jupyter-graphql-dev | ||
|
||
commands: | ||
lab: | ||
unix: jupyter lab --no-browser --debug | ||
setup: | ||
unix: pip install -e . --ignore-installed --no-deps | ||
black: | ||
unix: black src/py setup.py | ||
atom: | ||
unix: atom . | ||
static: | ||
unix: python -m jupyter_graphql.fetch_static | ||
|
||
env_specs: | ||
default: | ||
platforms: | ||
- linux-64 | ||
- osx-64 | ||
- win-64 | ||
inherit_from: | ||
- jupyter-graphql-dev | ||
packages: | ||
- black | ||
- flake8 | ||
- beautysh | ||
jupyter-graphql-dev: | ||
packages: | ||
- gql | ||
- graphene | ||
- iso8601 | ||
- jupyterlab >=0.35,<0.36 | ||
- python >=3.6,<3.7 | ||
- requests | ||
- werkzeug | ||
- pip: | ||
- graphql-ws | ||
- graphene-tornado | ||
channels: | ||
- conda-forge | ||
- defaults |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,44 @@ | ||
from urllib.request import urlretrieve | ||
from urllib.parse import urlparse | ||
import sys | ||
|
||
from . import STATIC | ||
|
||
# Download the file from `url` and save it locally under `file_name`: | ||
|
||
ASSETS = [ | ||
JSDELIVR_ASSETS = [ | ||
"https://cdn.jsdelivr.net/npm/[email protected]/graphiql.css", | ||
"https://cdn.jsdelivr.net/npm/[email protected]/fetch.min.js", | ||
"https://cdn.jsdelivr.net/npm/[email protected]/umd/react.production.min.js", | ||
"https://cdn.jsdelivr.net/npm/[email protected]/umd/react-dom.production.min.js", | ||
"https://cdn.jsdelivr.net/npm/[email protected]/graphiql.min.js", | ||
# "https://cdn.jsdelivr.net/npm/[email protected]/browser/client.js", | ||
# "https://cdn.jsdelivr.net/npm/[email protected]/dist/fetcher.js", | ||
] | ||
|
||
UNPKG_ASSETS = [ | ||
"https://unpkg.com/[email protected]/browser/client.js", | ||
"https://unpkg.com/[email protected]/browser/client.js", | ||
] | ||
|
||
|
||
def fetch_static(): | ||
for url in ASSETS: | ||
out = (STATIC / urlparse(url).path[1:]).resolve() | ||
if not out.exists(): | ||
def fetch_assets(assets, prefix=None, force=False): | ||
for url in assets: | ||
out = STATIC | ||
if prefix: | ||
out = STATIC / prefix | ||
out = (out / urlparse(url).path[1:]).resolve() | ||
if force or not out.exists(): | ||
out.parent.mkdir(parents=True, exist_ok=True) | ||
out.write_text("") | ||
print("fetching", url, "to", out) | ||
print(f"fetching\n\t- {url}\n\t> {out.relative_to(STATIC)}") | ||
urlretrieve(url, out) | ||
|
||
|
||
def fetch_static(force=False): | ||
fetch_assets(JSDELIVR_ASSETS, force=force) | ||
fetch_assets(UNPKG_ASSETS, "npm", force=force) | ||
|
||
|
||
if __name__ == "__main__": | ||
fetch_static() | ||
fetch_static(force="--force" in sys.argv) |
Oops, something went wrong.