mirror of
https://github.com/kjanat/livegraphs-django.git
synced 2026-02-13 13:55:41 +01:00
fix: configure markdownlint-cli2 properly
- Wrap config in 'config' key for markdownlint-cli2 - Use MD013 rule name instead of 'line-length' alias - Disable MD013 line-length checks - Add allowed languages: sh, python, csv, tree - Fix broken link reference in TODO.md - All markdown linting now passes (37 errors -> 0)
This commit is contained in:
98
.github/copilot-instructions.md
vendored
98
.github/copilot-instructions.md
vendored
@@ -2,44 +2,45 @@
|
||||
|
||||
## General Instructions
|
||||
|
||||
- Use clear and concise language.
|
||||
- Provide code examples where applicable.
|
||||
- Write clean code with Django best practices.
|
||||
- Use comments to explain complex logic.
|
||||
- Use packages and libraries where appropriate and possible to avoid reinventing the wheel.
|
||||
- Update [TODO](TODO.md), [README](README.md) as fits.
|
||||
- Use clear and concise language.
|
||||
- Provide code examples where applicable.
|
||||
- Write clean code with Django best practices.
|
||||
- Use comments to explain complex logic.
|
||||
- Use packages and libraries where appropriate and possible to avoid reinventing the wheel.
|
||||
- Update [TODO](TODO.md), [README](README.md) as fits.
|
||||
|
||||
## uv
|
||||
|
||||
UV is a fast Python package and project manager written in Rust. Use UV to manage dependencies, virtual environments, and run Python scripts with improved performance.
|
||||
UV is a fast Python package and project manager written in Rust. Use UV to manage dependencies, virtual environments,
|
||||
and run Python scripts with improved performance.
|
||||
|
||||
### Running Python Scripts
|
||||
|
||||
- Execute a Python script with uv:
|
||||
- Execute a Python script with uv:
|
||||
|
||||
```bash
|
||||
uv run python ${FILE}.py
|
||||
```
|
||||
|
||||
- Run a script with a specific Python version:
|
||||
- Run a script with a specific Python version:
|
||||
|
||||
```bash
|
||||
uv run python3.8 ${FILE}.py
|
||||
```
|
||||
|
||||
- Run a script with arguments:
|
||||
- Run a script with arguments:
|
||||
|
||||
```bash
|
||||
uv run python ${FILE}.py --arg1 value1 --arg2 value2
|
||||
```
|
||||
|
||||
- Add dependencies to standalone scripts:
|
||||
- Add dependencies to standalone scripts:
|
||||
|
||||
```bash
|
||||
uv add --script <package-name> ${FILE}.py
|
||||
```
|
||||
|
||||
- Remove dependencies from a script:
|
||||
- Remove dependencies from a script:
|
||||
|
||||
```bash
|
||||
uv remove --script <package-name> ${FILE}.py
|
||||
@@ -47,25 +48,25 @@ UV is a fast Python package and project manager written in Rust. Use UV to manag
|
||||
|
||||
### Package Management
|
||||
|
||||
- Install packages:
|
||||
- Install packages:
|
||||
|
||||
```bash
|
||||
uv pip install <package-name>
|
||||
```
|
||||
|
||||
- Install from requirements file:
|
||||
- Install from requirements file:
|
||||
|
||||
```bash
|
||||
uv pip install -r requirements.txt
|
||||
```
|
||||
|
||||
- Add a package to current project:
|
||||
- Add a package to current project:
|
||||
|
||||
```bash
|
||||
uv add <package-name>
|
||||
```
|
||||
|
||||
- Remove a package:
|
||||
- Remove a package:
|
||||
|
||||
```bash
|
||||
uv remove <package-name>
|
||||
@@ -73,20 +74,20 @@ UV is a fast Python package and project manager written in Rust. Use UV to manag
|
||||
|
||||
### Virtual Environment Management
|
||||
|
||||
- Create and activate a virtual environment:
|
||||
- Create and activate a virtual environment:
|
||||
|
||||
```bash
|
||||
uv venv .venv
|
||||
source .venv/bin/activate # Linux/macOS
|
||||
```
|
||||
|
||||
- Install project dependencies into an environment:
|
||||
- Install project dependencies into an environment:
|
||||
|
||||
```bash
|
||||
uv pip sync
|
||||
```
|
||||
|
||||
- Lock dependencies for reproducible environments:
|
||||
- Lock dependencies for reproducible environments:
|
||||
|
||||
```bash
|
||||
uv lock
|
||||
@@ -94,25 +95,25 @@ UV is a fast Python package and project manager written in Rust. Use UV to manag
|
||||
|
||||
### Project Management
|
||||
|
||||
- Create a new Python project:
|
||||
- Create a new Python project:
|
||||
|
||||
```bash
|
||||
uv init <project-name>
|
||||
```
|
||||
|
||||
- Build a project into distribution archives:
|
||||
- Build a project into distribution archives:
|
||||
|
||||
```bash
|
||||
uv build
|
||||
```
|
||||
|
||||
- View dependency tree:
|
||||
- View dependency tree:
|
||||
|
||||
```bash
|
||||
uv tree
|
||||
```
|
||||
|
||||
- Publish package to PyPI:
|
||||
- Publish package to PyPI:
|
||||
|
||||
```bash
|
||||
uv publish
|
||||
@@ -120,25 +121,25 @@ UV is a fast Python package and project manager written in Rust. Use UV to manag
|
||||
|
||||
### Python Version Management
|
||||
|
||||
- Install specific Python version:
|
||||
- Install specific Python version:
|
||||
|
||||
```bash
|
||||
uv python install 3.11
|
||||
```
|
||||
|
||||
- List available Python versions:
|
||||
- List available Python versions:
|
||||
|
||||
```bash
|
||||
uv python list
|
||||
```
|
||||
|
||||
- Find installed Python version:
|
||||
- Find installed Python version:
|
||||
|
||||
```bash
|
||||
uv python find
|
||||
```
|
||||
|
||||
- Pin project to specific Python version:
|
||||
- Pin project to specific Python version:
|
||||
|
||||
```bash
|
||||
uv python pin 3.11
|
||||
@@ -146,14 +147,15 @@ UV is a fast Python package and project manager written in Rust. Use UV to manag
|
||||
|
||||
### Performance Benefits
|
||||
|
||||
- UV offers significantly faster package installations than pip
|
||||
- Built-in caching improves repeated operations
|
||||
- Compatible with existing Python tooling ecosystem
|
||||
- Reliable dependency resolution to avoid conflicts
|
||||
- UV offers significantly faster package installations than pip
|
||||
- Built-in caching improves repeated operations
|
||||
- Compatible with existing Python tooling ecosystem
|
||||
- Reliable dependency resolution to avoid conflicts
|
||||
|
||||
## Project Structure
|
||||
|
||||
This section provides a comprehensive overview of the LiveGraphsDjango project structure and the function of each key file. Please update this section whenever there are noteworthy changes to the structure or to a file's function.
|
||||
This section provides a comprehensive overview of the LiveGraphsDjango project structure and the function of each key
|
||||
file. Please update this section whenever there are noteworthy changes to the structure or to a file's function.
|
||||
|
||||
```tree
|
||||
LiveGraphsDjango/
|
||||
@@ -235,31 +237,31 @@ LiveGraphsDjango/
|
||||
|
||||
### Key Component Relationships
|
||||
|
||||
1. **Multi-Tenant Architecture**:
|
||||
1. **Multi-Tenant Architecture**:
|
||||
|
||||
- Companies are the top-level organizational unit
|
||||
- Users belong to Companies and have different permission levels
|
||||
- DataSources are owned by Companies
|
||||
- Dashboards display analytics based on DataSources
|
||||
- Companies are the top-level organizational unit
|
||||
- Users belong to Companies and have different permission levels
|
||||
- DataSources are owned by Companies
|
||||
- Dashboards display analytics based on DataSources
|
||||
|
||||
2. **Data Integration Flow**:
|
||||
2. **Data Integration Flow**:
|
||||
|
||||
- External APIs are configured via ExternalDataSource models
|
||||
- Data is fetched, parsed, and stored as ChatSessions and ChatMessages
|
||||
- Dashboard views aggregate and visualize this data
|
||||
- External APIs are configured via ExternalDataSource models
|
||||
- Data is fetched, parsed, and stored as ChatSessions and ChatMessages
|
||||
- Dashboard views aggregate and visualize this data
|
||||
|
||||
3. **Export Functionality**:
|
||||
3. **Export Functionality**:
|
||||
|
||||
- Export available in CSV, JSON, and Excel formats
|
||||
- Filtering options to customize exported data
|
||||
- Export available in CSV, JSON, and Excel formats
|
||||
- Filtering options to customize exported data
|
||||
|
||||
### Important Note
|
||||
|
||||
**Please update this section whenever:**
|
||||
|
||||
1. New files or directories are added to the project
|
||||
2. The function of existing files changes significantly
|
||||
3. New relationships between components are established
|
||||
4. The architecture of the application changes
|
||||
1. New files or directories are added to the project
|
||||
2. The function of existing files changes significantly
|
||||
3. New relationships between components are established
|
||||
4. The architecture of the application changes
|
||||
|
||||
This ensures that anyone working with GitHub Copilot has an up-to-date understanding of the project structure.
|
||||
|
||||
Reference in New Issue
Block a user