Skip to content

Commit

Permalink
New UI (nixos modules based) (#376)
Browse files Browse the repository at this point in the history
* Initial options support (just a proof so far)

* revert template changes for now

* Fix options.md to be generated in time

* Initial work on python kernel

* Skip (for now) some of the github actions jobs

* Fix task name

* Add more python kernel options

* Write everything up to build jupyterlab-new flake output

* also include options.json file

* move general options under jupyterlab namespace

* Adding bash kernel options

* is this yaml file better

* yaml fix (i think)

* adding a c kernel

* add kernel.elm module

* add kernel.nix module

* add kernel.postgres module

* add kernel.zsh module

* add kernel.go module

* add kernel.haskell module

* add kernel.javascript module

* add kernel.julia module

* kernel.ocaml init

* New UI (Add Blog page to docs site) (#398)

* updated codeowners (#397)

* add new blog page to docs site.

* New UI (Update Examples) (#401)

* fix general jupyterlab runtime packages

* fix bash kernel module required packages.

* fix haskell module

* updated example kernels to use new module system

* fix javascript module

* fix julia module

* fix python stable kernel

* fix nix run for jupyter lab with kernels

* fix jupyterlab example with all kernels.

* cleanup examples so filter list is in one spot.

* fix example names to us folder so it's kernel.minimal instead of kernel.example. make sure there is no overlap in the future.

* New UI (Add R module) (#403)

* fix general jupyterlab runtime packages

* fix bash kernel module required packages.

* fix haskell module

* updated example kernels to use new module system

* fix javascript module

* fix julia module

* fix python stable kernel

* fix nix run for jupyter lab with kernels

* fix jupyterlab example with all kernels.

* cleanup examples so filter list is in one spot.

* fix example names to us folder so it's kernel.minimal instead of kernel.example. make sure there is no overlap in the future.

* add r module

Signed-off-by: Rok Garbas <[email protected]>
Co-authored-by: Rok Garbas <[email protected]>

* New UI (Add Rust module) (#404)

* fix general jupyterlab runtime packages

* fix bash kernel module required packages.

* fix haskell module

* updated example kernels to use new module system

* fix javascript module

* fix julia module

* fix python stable kernel

* fix nix run for jupyter lab with kernels

* fix jupyterlab example with all kernels.

* cleanup examples so filter list is in one spot.

* fix example names to us folder so it's kernel.minimal instead of kernel.example. make sure there is no overlap in the future.

* add rust module

Signed-off-by: Rok Garbas <[email protected]>
Co-authored-by: Rok Garbas <[email protected]>

* New UI (Add Scala module) (#406)

* fix general jupyterlab runtime packages

* fix bash kernel module required packages.

* fix haskell module

* updated example kernels to use new module system

* fix javascript module

* fix julia module

* fix python stable kernel

* fix nix run for jupyter lab with kernels

* fix jupyterlab example with all kernels.

* cleanup examples so filter list is in one spot.

* fix example names to us folder so it's kernel.minimal instead of kernel.example. make sure there is no overlap in the future.

* add scala module.

Signed-off-by: Rok Garbas <[email protected]>
Co-authored-by: Rok Garbas <[email protected]>

* New UI (Add TypeScript module) (#407)

* fix general jupyterlab runtime packages

* fix bash kernel module required packages.

* fix haskell module

* updated example kernels to use new module system

* fix javascript module

* fix julia module

* fix python stable kernel

* fix nix run for jupyter lab with kernels

* fix jupyterlab example with all kernels.

* cleanup examples so filter list is in one spot.

* fix example names to us folder so it's kernel.minimal instead of kernel.example. make sure there is no overlap in the future.

* Add typescript module.

Signed-off-by: Rok Garbas <[email protected]>
Co-authored-by: Rok Garbas <[email protected]>

* New UI (Finish OCaml module) (#408)

* fix general jupyterlab runtime packages

* fix bash kernel module required packages.

* fix haskell module

* updated example kernels to use new module system

* fix javascript module

* fix julia module

* fix python stable kernel

* fix nix run for jupyter lab with kernels

* fix jupyterlab example with all kernels.

* cleanup examples so filter list is in one spot.

* fix example names to us folder so it's kernel.minimal instead of kernel.example. make sure there is no overlap in the future.

* finish ocaml module

* Fix ocaml option documentation styling.

* Update flake.nix

Signed-off-by: Rok Garbas <[email protected]>

Signed-off-by: Rok Garbas <[email protected]>
Co-authored-by: Rok Garbas <[email protected]>

* New UI (Community tab and Matrix links) (#400)

* added community tab and matrix links

* styling

Co-authored-by: Rok Garbas <[email protected]>

* New UI (Create module options page from JSON) (#389)

* remove markdown options from build

* load options config from json

* move options javascript to module file

* switching from modules to script because modules were causing problems

* nest child options under parent in json object

* nest child options under parent in DOM inside divs

* make options collapsible

* make collapsible options animated and update styles

* add icons, make options closer together, add hover

* fix light/dark mode background color

* add kernel icon to the left of each option at the 'kernel.<kernelName>' level

* update expand/collapse icon on options page

* added expand/collapse all button if option has children.

* made math for calculating logo sizes better.

* fixed font colors by using mkdocs material css variables.

* fixed and documented the function that nests the json object.

* putting in TODOs for future improvements.

* added documentation for function that converts options json to markdown.

* little note about why the json to markdown function is recursive.

* added documentation for the function that added the options content to the DOM and the function that nests sub-options.

* updated and added documentation to the functions that add the ability to click on a heading and have the content expand/collapse.

* updated and added documentation to the function that adds expand/collapse all buttons.

* updated and documented the function that adds the kernel icons to the option headings.

* little optimizations in the option JS code

* turned the options script into a module.

* remove old options script

* switched out javascript client code for python build time code. still need to add DOM restructuring and CSS.

* switch to markdown-it-py for conversion to html b/c it complies with CommonMark spec.

* added python function to nest options in dom.

* styling the options so it degrades gracefully if JS is disabled

* moved options JS file back out of modules

* not using JS modules any more. breaks with mkdocs

* moved nesting children in dom to python. no more FOUC

* fixed some accessibility issues and logo sizes/positions

* making nice tree view lines for nested options

* redo layout, styling, and javascript for simplicity and maintainability

* clean up and document options code.

* setup page so it works without JS and initialize page if JS is enabled.

* switched to using jQuery for animation. much smoother and cleaner.

* break up options into sections under headers.

Co-authored-by: Rok Garbas <[email protected]>

* uncomment ci.yml 

Signed-off-by: Rok Garbas <[email protected]>

* fix workflow.

* fix example kernel names and associated tests

* more ci workflow fixes.

* redid poetry module. exposed requiredRuntimePackages. fixed several tests.

* fix elm required packages

* fix error: attribute 'nixpkgs' missing from config when building docs

* temp. remove julia and haskell from CI till they can be fixed.

* trying to fix workflow.

* trying to fix workflow again.

* trying to fix workflow again x2.

* fix nesting of json children.

* hide edit page button for Options.

* remove '(New)' from Options tab.

* fixed haskell kernel module.

* add haskell and julia tests back in

* adding info to julia test for debugging.

* Revert "adding info to julia test for debugging."

This reverts commit bed0772.

* bandaid for Julia CI.

* organized the docs folder.

* fix template and its test.

* trying to fix github API rate limit exceeded.

* Revert "trying to fix github API rate limit exceeded."

This reverts commit 66678a2.

* Fix examples and defaults by using literalExpression and defaultText.

* update json encoder so it handles lists of objects

* updated the kernel module options.

* fixed groups and main description for poetry modules

* add requiredRuntimePackages to kernelArgs in kernel module.

* fix haskel module.

* fix rust module

* fix go module.

* cleaned up all the modules defaults, examples, and descriptions so it looks nice.

* fixed requiredRuntimePackages

* updated flake template welcome text.

* switch occurences of jupyterWith to jupyenv except in the template and CI (need to wait for repo name change first).

* moving template kernels nix file to top level. don't need folder any more.

* add temp options content html file so 'mkdocs serve' works properly

* add an admonition for using the julia kernel for when things go wrong.

* updated how-to

* removed the tutorials and moved some of the content to how to. updated the how to. fixed broken links.

* moved options higher in the sidebar list.

* move styling and js out of home.html and into their own files.

* added dart sass

* added sass to style the home page instead of JS and CSS

* replace home page logos with svg versions. fix planet orbit alignments.

* switched to index by 0

* fix options kernel logos

* fix options styling to use classes. nest logos in div so they can be positioned nicely.

* clean up options css.

* add ignoreCollisions to all poetry based kernels.

* fixed example python science kernel

* fixed example python science kernel tests

* really fix the python science example kernel.

* add anchors next to the option buttons. make the page option the option and scroll to it on page load.

* switched occurances of jupyterwith to jupyenv. left the flake template url path until the repo is renamed

* replace unicode angle brackets with ascii versions

* fix expand/collapse all buttons.

* making anchor links work better.

---------

Signed-off-by: Rok Garbas <[email protected]>
Co-authored-by: Dan Baker <[email protected]>
Co-authored-by: Daniel Baker <[email protected]>
  • Loading branch information
3 people authored Jan 31, 2023
1 parent 4bd15e0 commit 826e08a
Show file tree
Hide file tree
Showing 139 changed files with 4,539 additions and 777 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ jobs:
run: |
nix flake check --show-trace -L
build-kernel:
name: Build ${{ matrix.kernel }} kernel
needs: build
Expand Down Expand Up @@ -77,6 +76,7 @@ jobs:
- name: Test notebook for ${{ matrix.kernel }} kernel
run: |
echo 'If Julia fails, see if IJulia was updated recently.'
result/bin/python kernels/$( echo "${{ matrix.kernel }}" | sed -e "s|-|/|g" )/test.py
build-all-kernels:
Expand Down Expand Up @@ -135,7 +135,7 @@ jobs:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_TWEAG_JUPYTER_NIX_AUTH_TOKEN }}
SECRET_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Build all kernels
- name: Build docs
run: |
nix build -L .#docs
mkdir ./public
Expand All @@ -154,7 +154,7 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: 'Published from GitHub Actions'
enable-pull-request-comment: true
overwrites-pull-request-comment: true
overwrites-pull-request-comment: false
enable-commit-comment: false
enable-commit-status: true
if: github.repository_owner == 'tweag'
Expand Down Expand Up @@ -191,6 +191,6 @@ jobs:
- name: Test
run: |
pushd ./repo/kernels/example/python/minimal
sed -i -e "s|example-python-minimal|custom-python|" test.py
sed -i -e "s|python-minimal-example|python-minimal|" test.py
popd
./example/result/bin/python ./repo/kernels/example/python/minimal/test.py
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The following snippet will create a new project directory, initialize the projec
```shell
mkdir my-project
cd my-project
nix flake init --template github:tweag/jupyterWith
nix flake init --template github:tweag/jupyenv
nix run
```

Expand All @@ -54,16 +54,14 @@ After some time, you should see the following in your terminal. Your default web

## Documentation

See the [website](https://jupyterwith.tweag.io/) for further instructions about the environment, kernels, and extensions.
See the [website](https://jupyenv.io/) for further instructions about the environment, kernels, and extensions.

## Contributing

PRs are welcome!

This project provides a development shell which you can enter with `nix develop`. Please run `pre-commit run -all` before submitting your pull request for review. This will run a nix formatter for consistency.

See the [Developers](docs/developers.md) document for information about how jupyterWith is architected.

If you are new to contributing to open source, [this guide](https://opensource.guide/how-to-contribute/) helps explain why, what, and how to successfully get involved.

## License
Expand Down
7 changes: 7 additions & 0 deletions config.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{pkgs, ...}: {
jupyterlab.runtimePackages = with pkgs; [ruby];

kernel.python.example = {
enable = true;
};
}
27 changes: 27 additions & 0 deletions dart-sass/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
lib,
stdenv,
fetchzip,
buildDartPackage,
}: let
source = builtins.fromJSON (builtins.readFile ./source.json);
in
buildDartPackage rec {
pname = "dart-sass";
inherit (source) version;

src = fetchzip {
inherit (source) url;
sha256 = source.hash;
};

specFile = "${src}/pubspec.yaml";
lockFile = ./pub2nix.lock;

meta = with lib; {
description = "The reference implementation of Sass, written in Dart.";
homepage = "https://sass-lang.com/dart-sass";
maintainers = [maintainers.tadfisher maintainers.djacu];
license = licenses.mit;
};
}
Loading

0 comments on commit 826e08a

Please sign in to comment.