Metadata-Version: 2.4
Name: vadalog-extension
Version: 3.0.4
Summary: JupyterLab extension for Vadalog language support with syntax highlighting, linting, and execution control
Project-URL: Homepage, http://www.prometheux.co.uk
Project-URL: Repository, https://github.com/prometheuxresearch/vadalog-parallel
Project-URL: Documentation, http://www.prometheux.co.uk
Author-email: Prometheux Limited <info@prometheux.co.uk>
License: BSD 3-Clause License
        
        Copyright (c) 2025, Prometheux Limited
        All rights reserved.
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its
           contributors may be used to endorse or promote products derived from
           this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        
License-File: LICENSE
Keywords: Jupyter,JupyterLab,JupyterLab4,Knowledge Graph,Logic Programming,Vadalog
Classifier: Framework :: Jupyter
Classifier: Framework :: Jupyter :: JupyterLab
Classifier: Framework :: Jupyter :: JupyterLab :: 4
Classifier: Framework :: Jupyter :: JupyterLab :: Extensions
Classifier: Framework :: Jupyter :: JupyterLab :: Extensions :: Prebuilt
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# Vadalog Extension for JupyterLab

[![JupyterLab 4](https://img.shields.io/badge/JupyterLab-4.5.0-orange.svg)](https://jupyterlab.readthedocs.io/)
[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)

A JupyterLab extension that provides comprehensive support for the [Vadalog](http://www.prometheux.co.uk) knowledge graph system, including syntax highlighting, code linting, and execution control.

## Features

✨ **Syntax Highlighting** - Beautiful CodeMirror 6-based syntax highlighting for Vadalog code  
🔍 **Code Linting** - Real-time error detection and code analysis  
⏱️ **Execution Timer** - Displays accurate execution time from the backend  
🛑 **Stop Button Integration** - Intercepts the standard Jupyter stop button to gracefully halt Vadalog execution  
📊 **Beautiful Output Tables** - Modern styled result tables with JetBrains Mono font  
🎨 **Modern UI** - Clean, professional interface integrated seamlessly with JupyterLab 4

## Requirements

- JupyterLab >= 4.5.0
- Python >= 3.8
- Vadalog kernel (included in the [vadalog-parallel](https://github.com/prometheuxresearch/vadalog-parallel) repository)

## Installation

### From PyPI

```bash
pip install vadalog-extension
```

### From Source

```bash
git clone https://github.com/prometheuxresearch/vadalog-parallel.git
cd vadalog-parallel/jupyter-lab-extensions/vadalog-extension
pip install -e .
```

## Usage

1. Start JupyterLab:
   ```bash
   jupyter lab
   ```

2. Create a new notebook and select the **Vadalog** kernel

3. Write your Vadalog code:
   ```vadalog
   % Define facts
   @input("person").
   person("Alice").
   person("Bob").
   
   % Define rules
   @output("greeting").
   greeting(X, "Hello " + X) :- person(X).
   ```

4. Run the cell - enjoy syntax highlighting, execution timing, and beautiful output!

## Development

### Setup Development Environment

```bash
# Clone the repository
git clone https://github.com/prometheuxresearch/vadalog-parallel.git
cd vadalog-parallel

# Create virtual environment
python3 -m venv venv
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Install extension in development mode
cd jupyter-lab-extensions/vadalog-extension
pip install -e .
```

### Watch Mode for Development

```bash
# Terminal 1 - TypeScript watch
cd jupyter-lab-extensions/vadalog-extension
jlpm watch

# Terminal 2 - JupyterLab
jupyter lab
```

Changes to TypeScript files will be automatically rebuilt!

## Architecture

This extension is built using:

- **TypeScript** - Main extension logic
- **CodeMirror 6** - Syntax highlighting engine
- **React 18** - UI components (shared with JupyterLab)
- **Lumino** - Widget framework
- **Hatchling** - Modern Python build system

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

BSD 3-Clause License - see [LICENSE](LICENSE) file for details.

## About Vadalog

Vadalog is a powerful knowledge graph system developed by [Prometheux Limited](http://www.prometheux.co.uk). It combines the expressiveness of Datalog with advanced reasoning capabilities for complex data analysis and knowledge representation.

## Support

For issues, questions, or contributions, please visit:
- **Homepage**: http://www.prometheux.co.uk
- **Repository**: https://github.com/prometheuxresearch/vadalog-parallel

---

**Made with ❤️ by Prometheux Limited**
