Skip to main content

abstract_ide

Project description

Abstract IDE

PyPI version License: MIT Python Version

Abstract IDE is a modular, extensible Python-based Integrated Development Environment (IDE) toolset designed for developers working with web projects, particularly React/TypeScript applications. It provides a graphical user interface (GUI) built with PyQt for code analysis, import graphing, content searching, build automation, and more. The tool leverages background workers for non-blocking operations and integrates with external utilities for tasks like code searching, API testing, and file management.

This project is part of a larger ecosystem of "abstract" modules (e.g., abstract_paths, abstract_apis) and is ideal for analyzing large codebases, debugging builds, and automating repetitive development tasks.

Table of Contents

Features

Abstract IDE offers a tabbed GUI interface with the following core functionalities:

  • Runner Tab: Execute TypeScript compilation (tsc) and React builds (yarn build) locally or via SSH. Displays errors and warnings with clickable links to open files in VS Code. Supports ANSI stripping, severity filtering, and alternate file extension resolution (e.g., .ts.tsx).

  • Functions Map Tab: Scans the project for import/export graphs, displaying functions as interactive buttons. Filter by name, view exporters/importers, and open files directly. Supports "all" or "reachable" scopes with customizable entry points (e.g., index.tsx, main.tsx).

Functions Map Tab

  • Find Content Tab: Advanced code search across directories. Supports recursive searches, string matching (partial or exact), file extensions, path filters, and line-specific queries. Results are clickable for editing in VS Code.

Find Content Tab

  • API Client Tab: A console for testing APIs with dynamic endpoints, headers, and parameters. Fetches remote endpoints from /api/endpoints and supports GET/POST methods.

API Client Tab

  • ClipIt Tab: Drag-and-drop file browser with clipboard integration for quick file operations.

ClipIt Tab

  • Window Manager Tab: Manages multiple windows and layouts within the IDE.

  • Directory Map Tab: Generates a visual tree map of the project directory, with filters for extensions, types, and patterns.

Directory Map Tab

  • Collect Files Tab: Collects and lists files based on criteria like extensions and paths, with options to open all in VS Code.

Collect Files Tab

  • Extract Python Imports Tab: Scans Python files for imports and module paths, displaying them in a readable format.

Extract Python Imports Tab

Additional tools (integrated via workers):

  • Code execution in a REPL-like environment with pre-installed libraries (e.g., NumPy, SciPy, PyTorch).
  • Web browsing, searching, and snippet extraction.
  • X (Twitter) post searching (keyword, semantic, user, threads).
  • Image/PDF viewing and searching.
  • Render components for inline citations.

The IDE uses multi-threading (QThread) for background tasks to keep the UI responsive.

Installation

Prerequisites

  • Python 3.8+
  • Git (for cloning the repository)

From PyPI

pip install abstract-ide

From Source

  1. Clone the repository:

    git clone https://github.com/yourusername/abstract-ide.git
    cd abstract-ide
    
  2. Install dependencies:

    pip install -r requirements.txt
    

    (Or use the list from abstract_ide.egg-info/requires.txt.)

  3. Run the IDE:

    python -m abstract_ide
    

Usage

Launch the application:

python -m abstract_ide

Basic Workflow

  1. Set Project Path: In the Runner tab, enter the project directory (e.g., /path/to/react-app).
  2. Run Build: Click "Run" to compile and build. Errors/warnings appear in lists—click to view snippets or open in editor.
  3. Map Functions: Switch to Functions Map tab, select scope ("all" or "reachable"), and scan. Filter functions and inspect imports/exports.
  4. Search Code: In Find Content tab, specify directory, strings (comma-separated), extensions, and flags. Results are listed for quick navigation.
  5. Test APIs: In API Client tab, select base URL, fetch endpoints, add headers/params, and send requests.
  6. Advanced: Use workers for background tasks like web searches or PDF analysis via function calls (see Tools).

Keyboard Shortcuts

  • Double-click list items: Open in VS Code.
  • Filter radios: Toggle error/warning views dynamically.

Example: Analyzing a React Project

  • Load /var/www/html/clownworld/bolshevid (as in the sample import graph).
  • Scan functions: View exports like getIps, fetchMedia, and their importers/exporters.
  • Search for "useState": Find all occurrences in .tsx files recursively.

Configuration

  • Import Graph: Generated via create_import_maps() and stored as import-graph.json and graph.dot in /data/import_tools/.
  • Custom Entries: Override entry points (e.g., index.tsx) in the Functions Map tab.
  • Extensions: Configurable via UI inputs (e.g., comma-separated lists).
  • SSH Builds: Specify user@host for remote execution.

Customize via environment variables:

  • BASE_DIRECTORY: Default project root (e.g., /var/www/html/clownworld/bolshevid).

Dependencies

From abstract_ide.egg-info/requires.txt:

  • abstract_apis
  • PyQt5 (or PyQt6)
  • abstract_webtools
  • abstract_utilities
  • abstract_gui
  • pydot
  • abstract_clipit
  • flask
  • abstract_paths

Install via pip install -r requirements.txt.

Project Structure

abstract_ide/
├── src/
│   ├── abstract_ide/
│   │   ├── __init__.py
│   │   ├── imports/
│   │   │   ├── __init__.py
│   │   │   ├── imports.py
│   │   │   └── constants.py
│   │   ├── utils/
│   │   │   ├── __init__.py
│   │   │   ├── imports/
│   │   │   │   ├── __init__.py
│   │   │   │   ├── imports/
│   │   │   │   │   ├── __init__.py
│   │   │   │   │   └── imports.py
│   │   │   │   └── utils/
│   │   │   │       ├── __init__.py
│   │   │   │       ├── file_utils.py
│   │   │   │       └── utils.py
│   │   │   ├── managers/
│   │   │   │   ├── __init__.py
│   │   │   │   ├── imports/
│   │   │   │   │   ├── __init__.py
│   │   │   │   │   ├── imports.py
│   │   │   │   │   └── widget_funcs.py
│   │   │   │   └── utils/
│   │   │   │       ├── __init__.py
│   │   │   │       ├── get_modules.py
│   │   │   │       ├── importGraphWorker.py
│   │   │   │       ├── imports.py
│   │   │   │       ├── worker.py
│   │   │   │       └── mainWindow/
│   │   │   │           ├── __init__.py
│   │   │   │           ├── imports.py
│   │   │   │           ├── mainWindow.py
│   │   │   │           └── functions/
│   │   │   │               ├── __init__.py
│   │   │   │               ├── imports.py
│   │   │   │               ├── clickHandlers/
│   │   │   │               │   ├── __init__.py
│   │   │   │               │   ├── clickHandlers.py
│   │   │   │               │   └── imports.py
│   │   │   │               └── init_tabs/
│   │   │   │                   ├── __init__.py
│   │   │   │                   ├── apigui.py
│   │   │   │                   ├── imports.py
│   │   │   │                   ├── finder/
│   │   │   │                   │   ├── __init__.py
│   │   │   │                   │   ├── clickfinder.py
│   │   │   │                   │   ├── finder.py
│   │   │   │                   │   ├── finder_back.py
│   │   │   │                   │   └── get_diffs.py
│   │   │   │                   ├── functions_page/
│   │   │   │                   │   ├── __init__.py
│   │   │   │                   │   └── functions_page.py
│   │   │   │                   ├── initialize_init/
│   │   │   │                   │   ├── __init__.py
│   │   │   │                   │   └── initialize_init.py
│   │   │   │                   └── runner/
│   │   │   │                       ├── __init__.py
│   │   │   │                       └── runner.py
│   │   │   └── widgets/
│   │   │       ├── __init__.py
│   │   │       ├── imports/
│   │   │       │   ├── __init__.py
│   │   │       │   └── imports.py
│   │   │       └── utils/
│   │   │           ├── __init__.py
│   │   │           ├── kwargs_utils.py
│   │   │           ├── utils.py
│   │   │           └── widgets.py
│   └── abstract_ide.egg-info/
│       ├── PKG-INFO
│       ├── SOURCES.txt
│       ├── dependency_links.txt
│       ├── requires.txt
│       └── top_level.txt
├── README.md
├── pyproject.toml
├── setup.cfg
└── setup.py
  • utils/managers: Core GUI logic and workers.
  • utils/imports: Import graphing and utilities.
  • utils/widgets: Reusable Qt widget helpers.

To integrate the provided screenshots into this README:

  1. Save the Screenshots: Download or capture the screenshots and save them in a dedicated folder, e.g., docs/images/. Name them descriptively:

    • directory_map.png
    • find_content.png
    • clipit.png
    • extract_imports.png
    • api_client.png
    • functions_map.png
    • collect_files.png
  2. Update the README: Insert the Markdown image syntax under the relevant feature descriptions, as shown above (e.g., ![Directory Map Tab](docs/images/directory_map.png)). Ensure the path is relative to the README file.

  3. Commit and Push: Add the images to your Git repo and push the changes. This will make them visible on GitHub or other hosts.

If the screenshots need processing (e.g., cropping, annotations), use tools like ImageMagick or online editors before adding.

Contributing

  1. Fork the repository.
  2. Create a feature branch: git checkout -b feature/new-tool.
  3. Commit changes: git commit -am 'Add new tool'.
  4. Push: git push origin feature/new-tool.
  5. Submit a Pull Request.

Report issues via GitHub Issues.

License

MIT License. See LICENSE for details.

Acknowledgments

  • Built with PyQt for cross-platform GUI.
  • Integrates with pydot for graph visualization.
  • Thanks to xAI for inspiration in tool integration.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

abstract_ide-0.0.0.336.tar.gz (137.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

abstract_ide-0.0.0.336-py3-none-any.whl (207.4 kB view details)

Uploaded Python 3

File details

Details for the file abstract_ide-0.0.0.336.tar.gz.

File metadata

  • Download URL: abstract_ide-0.0.0.336.tar.gz
  • Upload date:
  • Size: 137.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for abstract_ide-0.0.0.336.tar.gz
Algorithm Hash digest
SHA256 c312b4a6743e9053acd67ec3a0ac8318ee279adf6e134f96073a8d0328cac0cc
MD5 129e178eb467527d154cae954cc35ed5
BLAKE2b-256 198ca20da048cef4f9213aa82897b0cebaccb4b1f83b83466376dd0ea4dcf40f

See more details on using hashes here.

File details

Details for the file abstract_ide-0.0.0.336-py3-none-any.whl.

File metadata

File hashes

Hashes for abstract_ide-0.0.0.336-py3-none-any.whl
Algorithm Hash digest
SHA256 813d969a99c66131b5e02f773057941433d0dae620b13fc1bfec29c60208feb9
MD5 9036b58de4e490c64227f8f77e86c0a6
BLAKE2b-256 ed0cf2af7b27b6c4d66c1ce74fc316dc53bdf20365abffabc697a3f7855c980e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page