Skip to content

Commit ec7751e

Browse files
committed
Added a .gitattributes to enforce consistent line endings (LF for source/docs, CRLF for Windows
scripts) and re-enabled the ESLint linebreak-style rule for LF. Details: - .gitattributes added at repo root to normalize line endings across platforms. - .eslintrc.js set back to ["error", "unix"] for JS linting.
1 parent 82a973c commit ec7751e

File tree

4 files changed

+50
-2
lines changed

4 files changed

+50
-2
lines changed

.gitattributes

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
* text=auto
2+
*.js text eol=lf
3+
*.mjs text eol=lf
4+
*.cjs text eol=lf
5+
*.css text eol=lf
6+
*.html text eol=lf
7+
*.json text eol=lf
8+
*.md text eol=lf
9+
*.yml text eol=lf
10+
*.yaml text eol=lf
11+
*.py text eol=lf
12+
*.sh text eol=lf
13+
*.bat text eol=crlf
14+
*.cmd text eol=crlf
15+
*.ps1 text eol=crlf

AGENTS.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Repository Guidelines
2+
3+
## Project Structure & Module Organization
4+
- `modules/` holds core Python runtime, UI, and model plumbing (most edits land here).
5+
- `scripts/` contains optional generation/postprocessing scripts; `extensions-builtin/` and `extensions/` are for bundled and user extensions.
6+
- Frontend assets live in `javascript/`, `html/`, `style.css`, and `script.js`.
7+
- Configuration and model assets are under `configs/`, `models/`, `embeddings/`, and `textual_inversion_templates/`.
8+
- Tests live in `test/` with fixtures and assets in `test/test_files/`.
9+
10+
## Build, Test, and Development Commands
11+
- `webui-user.bat` (Windows) or `./webui.sh` (Linux/macOS) starts the app and manages deps.
12+
- `python launch.py` runs the launcher directly (useful for debugging).
13+
- `npm run lint` runs ESLint for JavaScript; `npm run fix` applies fixes.
14+
- `python -m ruff check .` runs Python linting if Ruff is installed.
15+
16+
## Coding Style & Naming Conventions
17+
- Python follows PEP 8 conventions (4 spaces, `snake_case`), with Ruff configured in `pyproject.toml`.
18+
- JavaScript uses 4-space indentation and ESLint rules from `.eslintrc.js`; prefer `camelCase`.
19+
- Keep new files near their feature area (e.g., UI changes in `modules/ui_*.py`, assets in `javascript/`/`html/`).
20+
21+
## Testing Guidelines
22+
- Tests use `pytest` (`requirements-test.txt`) with `test_*.py` naming.
23+
- API tests assume the web UI is running at `http://127.0.0.1:7860` (see `pyproject.toml`).
24+
- Run all tests with `pytest` from the repo root; add new tests alongside related modules.
25+
26+
## Commit & Pull Request Guidelines
27+
- Recent history uses short, lower-case subjects and includes merge commits (e.g., `update CHANGELOG`).
28+
- Keep commit subjects concise and specific; avoid bundling unrelated changes.
29+
- PRs should describe the user-facing impact, include steps to test, and link relevant issues.
30+
31+
## Configuration & Assets
32+
- Put local launch args in `webui-user.bat` or `webui-user.sh`; avoid committing machine-specific paths.
33+
- Large model files and generated images belong in `models/` and `outputs/`, and should not be committed.

Captura.png

259 KB
Loading

webui-user.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
@echo off
22

3-
set PYTHON=
3+
set PYTHON=py -3.11
44
set GIT=
55
set VENV_DIR=
6-
set COMMANDLINE_ARGS=
6+
set COMMANDLINE_ARGS=--api
77

88
call webui.bat

0 commit comments

Comments
 (0)