Skip to content

Commit

Permalink
envs
Browse files Browse the repository at this point in the history
  • Loading branch information
ikappaki committed Nov 30, 2024
1 parent 5c40a50 commit e2dfe3f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install hatch
pipx install hatch
hatch env create test
hatch env find
- name: Test
run: |
hatch env run -e test basilisp test -- -v
hatch run test:basilisp test -- -v
- name: Check Kernel
run: |
hatch env run -e test jupyter kernelspec list | grep basilisp
hatch run test:jupyter kernelspec list | grep "jupyter/kernels/basilisp"
6 changes: 3 additions & 3 deletions API.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Table of contents
- [`basilisp-kernel.nrepl-server`](#basilisp-kernel.nrepl-server)
- [`server-shut`](#basilisp-kernel.nrepl-server/server-shut) - Convenience function to shutdown the <code>server</code>.
- [`server-shut`](#basilisp-kernel.nrepl-server/server-shut) - Convenience function to shutdown the <code>SERVER</code>.
- [`server-start`](#basilisp-kernel.nrepl-server/server-start) - Starts the nrepl-server in async mode according to <code>OPTS</code>, using a asyncio task to schedule any pending client work every 100ms.

-----
Expand All @@ -18,7 +18,7 @@
```
Function.

Convenience function to shutdown the `server`.
Convenience function to shutdown the `SERVER`.
<p><sub><a href="https://github.com/ikappaki/basilisp-kernel/blob/master/basilisp_kernel/nrepl_server.lpy#L85-L88">Source</a></sub></p>

## <a name="basilisp-kernel.nrepl-server/server-start">`server-start`</a><a name="basilisp-kernel.nrepl-server/server-start"></a>
Expand All @@ -43,7 +43,7 @@ Starts the nrepl-server in async mode according to `OPTS`, using a
`:port` The port number the server should listen to. It defaults to
0, which indicates a random available port number.

It return a map with the following keys
It return the `server`, which is a map with the following keys

`:host` The host interface to which the server is bound.

Expand Down
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,17 @@ To shutdown the server
=> :shut
```


## Getting started with development

The Basilisp Example Notebook repository, [basilex-notebook](https://github.com/ikappaki/basilex-notebook), is an excellent starting point for exploring Notebooks with the Basilisp Kernel. This Python-based project includes Jupyter, the Basilisp Kernel, and a development notebook to help you experiment. Simply clone the repository and activate the environment to begin!
The Basilisp Example Notebook repository, [basilex-notebook](https://github.com/ikappaki/basilex-notebook), is an excellent starting point for exploring Notebooks with the Basilisp Kernel. This Python-based project includes Jupyter, the Basilisp Kernel, a dummy Basilisp library and a development notebook to help you experiment. Simply clone the repository and activate the environment to begin!

```shell
git clone https://github.com/ikappaki/basilex-notebook.git
cd basilex-notebook
poetry install
poetry shell
jupyter notebook
```

Additionally, you can develop your Basilisp Clojure code in an external library and interactively load it into the Notebook using the nREPL server, directly from your favorite Clojure-enabled editor. Clone the `basilex-notebook-lib` reposistory to get you started.

Expand Down
4 changes: 2 additions & 2 deletions basilisp_kernel/nrepl_server.lpy
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
`:port` The port number the server should listen to. It defaults to
0, which indicates a random available port number.

It return a map with the following keys
It return the `server`, which is a map with the following keys

`:host` The host interface to which the server is bound.

Expand Down Expand Up @@ -83,6 +83,6 @@
:_task task))))))))

(defn ^:inline server-shut
"Convenience function to shutdown the `server`."
"Convenience function to shutdown the `SERVER`."
[server]
((:shutdown! server)))

0 comments on commit e2dfe3f

Please sign in to comment.