Skip to content

Commit 50cf8a0

Browse files
committed
Fix Documentation 404 Errors
1 parent 97ab230 commit 50cf8a0

File tree

12 files changed

+232
-8
lines changed

12 files changed

+232
-8
lines changed

.ai/steering/commands.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Command Execution Instructions
2+
3+
## Overview
4+
5+
When the user asks you to execute a command, look for the corresponding file in the `.ai/commands/` directory and follow the instructions contained within that file.
6+
7+
## Command Execution Process
8+
9+
1. **Command Request**: Commands can be triggered in multiple ways:
10+
- Natural language: "run fix-tests", "execute fix-examples"
11+
- Slash commands: `/fix-tests`, `/fix-examples`, `/fix-docs`
12+
- Direct command names: "fix-tests", "fix-examples"
13+
14+
2. **Locate Command File**: Find the corresponding `.md` file in `.ai/commands/` directory:
15+
- Command: "fix-tests" → File: `.ai/commands/fix-tests.md`
16+
- Command: "fix-examples" → File: `.ai/commands/fix-examples.md`
17+
- Command: "fix-docs" → File: `.ai/commands/fix-docs.md`
18+
19+
3. **Read and Execute**: Read the command file and follow the step-by-step instructions provided.
20+
21+
4. **Handle Arguments**: Commands may contain `$ARGUMENTS` placeholders:
22+
- **Arguments Provided**: If arguments are already provided in the user's prompt, substitute them directly
23+
- **Arguments Missing**: If arguments are needed but not provided, ask the user for clarification in a follow-up question
24+
25+
## Example Usage
26+
27+
**User Request**: "Execute fix-tests for the algorithms module"
28+
- **Action**: Read `.ai/commands/fix-tests.md`
29+
- **Arguments**: `$ARGUMENTS = "algorithms module"` (provided in prompt)
30+
- **Execution**: Follow the instructions in the file, substituting the arguments where needed
31+
32+
**User Request**: "Run fix-examples"
33+
- **Action**: Read `.ai/commands/fix-examples.md`
34+
- **Arguments**: If the command file requires `$ARGUMENTS` but none provided, ask user: "Which examples would you like me to focus on?"
35+
36+
## Command File Structure
37+
38+
Command files in `.ai/commands/` typically contain:
39+
- Step-by-step instructions
40+
- Code snippets to execute
41+
- Conditional logic based on results
42+
- Argument placeholders (`$ARGUMENTS`)
43+
- Expected outcomes and next steps
44+
45+
## Best Practices
46+
47+
- Always read the entire command file before starting execution
48+
- Follow the instructions sequentially
49+
- Substitute arguments appropriately
50+
- If a step fails, continue with any error handling instructions provided in the command file
51+
- Report progress and results back to the user as you execute each major step

.ai/steering/product.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Product Overview
2+
3+
pymoo is an open-source Python framework for multi-objective optimization that provides state-of-the-art single and multi-objective algorithms. The framework offers comprehensive features for optimization including:
4+
5+
- Multi-objective optimization algorithms (NSGA-II, NSGA-III, MOEA/D, etc.)
6+
- Single-objective optimization methods
7+
- Visualization tools for optimization results
8+
- Decision making utilities
9+
- Performance indicators and metrics
10+
- Constraint handling mechanisms
11+
- Gradient-based optimization support
12+
13+
The project targets researchers, engineers, and developers working on optimization problems, providing both ease of use for beginners and advanced customization for experts. It's designed to be modular, extensible, and performance-oriented with compiled extensions for speed-critical operations.

.ai/README.md renamed to .ai/steering/readme.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ These guides provide step-by-step processes for:
137137
3. Using intelligent caching to avoid re-running successful tests
138138
4. Final verification
139139

140+
### Project Commands Collection
141+
The `.ai/commands/` directory contains a collection of predefined commands and workflows that should be executed when requested. These commands encapsulate common development tasks, debugging procedures, and project-specific operations. When asked to perform standard operations like testing, building, or fixing issues, reference and follow these command templates to ensure consistent execution patterns.
142+
140143
### Key File Structure
141144

142145
```

.ai/steering/structure.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Project Structure
2+
3+
## Root Directory Layout
4+
```
5+
pymoo/ # Main package directory
6+
├── algorithms/ # Optimization algorithms (MOO, SOO)
7+
├── core/ # Core framework classes and interfaces
8+
├── problems/ # Test problems and problem definitions
9+
├── operators/ # Genetic operators (crossover, mutation, selection)
10+
├── indicators/ # Performance metrics and indicators
11+
├── visualization/ # Plotting and visualization tools
12+
├── gradient/ # Gradient computation utilities
13+
├── constraints/ # Constraint handling mechanisms
14+
├── termination/ # Termination criteria
15+
├── util/ # Utility functions and helpers
16+
└── functions/ # Compiled performance-critical functions
17+
18+
examples/ # Usage examples and tutorials
19+
tests/ # Test suite
20+
docs/ # Documentation source
21+
benchmark/ # Performance benchmarking scripts
22+
```
23+
24+
## Core Architecture Patterns
25+
26+
### Problem Definition
27+
- Base class: `pymoo.core.problem.Problem`
28+
- Elementwise problems: `ElementwiseProblem` for single-point evaluation
29+
- Meta problems: `MetaProblem` for problem composition
30+
- All problems define `n_var`, `n_obj`, `n_constr`, `xl`, `xu` attributes
31+
32+
### Algorithm Structure
33+
- Base class: `pymoo.core.algorithm.Algorithm`
34+
- Algorithms follow ask-and-tell pattern
35+
- Modular design with interchangeable operators
36+
- Support for both population-based and single-point methods
37+
38+
### Operator Pattern
39+
- All operators inherit from `pymoo.core.operator.Operator`
40+
- Crossover, mutation, selection, sampling operators
41+
- Configurable and composable design
42+
43+
### Data Structures
44+
- `Population`: Collection of individuals
45+
- `Individual`: Single solution with variables, objectives, constraints
46+
- `Result`: Optimization result container
47+
48+
## File Organization Conventions
49+
50+
### Algorithm Files
51+
- Multi-objective: `pymoo/algorithms/moo/`
52+
- Single-objective: `pymoo/algorithms/soo/`
53+
- Each algorithm in separate module with descriptive name
54+
55+
### Problem Files
56+
- Multi-objective: `pymoo/problems/multi/`
57+
- Single-objective: `pymoo/problems/single/`
58+
- Many-objective: `pymoo/problems/many/`
59+
- Dynamic problems: `pymoo/problems/dynamic/`
60+
61+
### Example Structure
62+
- Organized by category in `examples/` subdirectories
63+
- Each example is self-contained and executable
64+
- Integration tests run examples as validation
65+
66+
### Test Organization
67+
- Mirror package structure in `tests/`
68+
- Separate test categories using pytest markers
69+
- Performance tests in `benchmark/` directory
70+
71+
## Import Conventions
72+
- Main API accessible via `from pymoo.optimize import minimize`
73+
- Algorithm imports: `from pymoo.algorithms.moo.nsga2 import NSGA2`
74+
- Problem imports: `from pymoo.problems import get_problem`
75+
- Utility imports follow full module path

.ai/steering/tech.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Technology Stack
2+
3+
## Core Technologies
4+
- **Python**: 3.9+ (supports 3.9, 3.10, 3.11, 3.12, 3.13)
5+
- **Build System**: setuptools with Cython compilation
6+
- **Package Management**: pip/PyPI distribution
7+
8+
## Key Dependencies
9+
- **numpy** (>=1.19.3): Core numerical operations
10+
- **scipy** (>=1.1): Scientific computing algorithms
11+
- **matplotlib** (>=3): Visualization and plotting
12+
- **autograd** (>=1.4): Automatic differentiation
13+
- **cma** (>=3.2.2): Covariance Matrix Adaptation
14+
- **moocore** (>=0.1.7): Multi-objective optimization core utilities
15+
- **Cython**: Performance-critical compiled extensions
16+
17+
## Optional Dependencies
18+
- **Parallelization**: joblib, dask, ray
19+
- **Development**: pytest, jupyter, pandas, numba
20+
- **Optimization**: optuna
21+
22+
## Build Commands
23+
24+
### Installation
25+
```bash
26+
# Standard installation
27+
pip install -U pymoo
28+
29+
# Development installation
30+
git clone https://github.com/anyoptimization/pymoo
31+
cd pymoo
32+
pip install .
33+
34+
# With optional dependencies
35+
pip install pymoo[full] # All features
36+
pip install pymoo[parallelization] # Parallel computing
37+
pip install pymoo[visualization] # Enhanced plotting
38+
```
39+
40+
### Development Commands
41+
```bash
42+
# Clean build artifacts
43+
make clean
44+
45+
# Clean compiled extensions
46+
make clean-ext
47+
48+
# Compile Cython extensions
49+
make compile
50+
python setup.py build_ext --inplace
51+
52+
# Create distribution
53+
make dist
54+
55+
# Install from source
56+
make install
57+
```
58+
59+
### Testing
60+
```bash
61+
# Run all tests
62+
pytest
63+
64+
# Run specific test categories
65+
pytest -m "not long" # Skip long-running tests
66+
pytest -m examples # Run example integration tests
67+
pytest -m gradient # Run gradient computation tests
68+
```
69+
70+
### Verification
71+
```bash
72+
# Check if compiled extensions are working
73+
python -c "from pymoo.functions import is_compiled;print('Compiled Extensions: ', is_compiled())"
74+
```

docs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ help:
1717
# Catch-all target: route all unknown targets to Sphinx using the new
1818
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
1919
%: Makefile
20-
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/serve.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
python3 -m http.server --directory build/html
1+
python3 -m http.server --directory build/html 8080
22

docs/source/_theme/newsletter.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ <h5 class="modal-title" id="exampleModalLabel"><b>Newsletter</b></h5>
4747
<div class="mc-field-group">
4848
<label for="mce-EMAIL">Email Address <span class="asterisk">*</span>
4949
</label>
50-
<input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL">
50+
<input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL" autocomplete="email">
5151
</div>
5252
<div class="mc-field-group">
5353
<label for="mce-FNAME">First Name </label>

docs/source/_theme/static/sphinx-book-theme.7d483ff0a819d6edff12ce0b1ead3928.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ var initTriggerNavBar = () => {
44
}
55
}
66
var scrollToActive = () => {
7-
var navbar = document.getElementById('site-navigation')
7+
var navbar = document.getElementById('bd-docs-nav')
8+
if (!navbar) return;
89
var active_pages = navbar.querySelectorAll(".active")
910
var active_page = active_pages[active_pages.length - 1]
1011
if (active_page !== undefined && active_page.offsetTop > ($(window).height() * .5)) {

docs/source/conf.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,3 +204,10 @@
204204
copybutton_remove_prompts = True
205205
copybutton_copy_empty_lines = False
206206

207+
# ===========================================================================
208+
# nbsphinx
209+
# ===========================================================================
210+
211+
# Disable RequireJS to avoid conflicts with clipboard.min.js
212+
nbsphinx_requirejs_path = ""
213+

0 commit comments

Comments
 (0)