mirror of
https://github.com/ArthurDanjou/ArtStudies.git
synced 2026-02-14 16:07:40 +01:00
add coding agent description files
This commit is contained in:
83
.github/copilot-instructions.md
vendored
Normal file
83
.github/copilot-instructions.md
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
# Copilot Instructions for ArtStudies
|
||||
|
||||
Collection de travaux académiques en mathématiques (L3 → M2) utilisant **Python** et **R**.
|
||||
|
||||
## Architecture du Projet
|
||||
|
||||
```
|
||||
L3/, M1/, M2/ # Niveaux académiques (Licence 3, Master 1 & 2)
|
||||
└── <Nom du Cours>/ # Ex: "Deep Learning", "Linear Models"
|
||||
├── TP{n}/ # Travaux pratiques numérotés
|
||||
├── Project/ # Projets finaux
|
||||
└── data/ # Données locales au TP
|
||||
```
|
||||
|
||||
## Python - Conventions
|
||||
|
||||
- **Gestionnaire de packages** : `uv` (voir `pyproject.toml` racine)
|
||||
- **Linter** : Ruff avec règles strictes (`select = ["ALL"]`)
|
||||
- **Format des imports** : sections personnalisées définies dans `pyproject.toml` :
|
||||
```python
|
||||
# standard-library → third-party → data-science → ml → first-party
|
||||
import numpy as np # data-science group
|
||||
import pandas as pd
|
||||
from sklearn import ... # ml group
|
||||
```
|
||||
- **Notebooks** : structures Jupyter avec cellules markdown descriptives + code
|
||||
- **Reproductibilité** : utiliser `np.random.seed(42)` pour fixer les seeds
|
||||
|
||||
### Sous-projets avec dépendances isolées
|
||||
|
||||
Certains projets ont leur propre `pyproject.toml` (ex: `M2/Reinforcement Learning/project/`). Utiliser `uv` dans ces dossiers pour installer les dépendances spécifiques.
|
||||
|
||||
## R - Conventions
|
||||
|
||||
- **Projets R** : fichiers `.Rproj` dans chaque dossier TP/Projet
|
||||
- **Gestion packages** : `renv` pour l'isolation (voir `.Rprofile`)
|
||||
- **Script d'init** : `M2/Data Visualisation/init.R` installe les packages courants
|
||||
- **Documents** : RMarkdown (`.Rmd`) pour les rapports reproductibles
|
||||
- **Linting** : utiliser `lintr` pour l'analyse statique et `styler` pour le formatage (config: `.lintr` à la racine)
|
||||
```r
|
||||
# Vérifier le style d'un fichier
|
||||
lintr::lint("script.R")
|
||||
|
||||
# Formater automatiquement
|
||||
styler::style_file("script.R")
|
||||
```
|
||||
|
||||
## SQL (M2/SQL)
|
||||
|
||||
Environnement Docker avec MySQL :
|
||||
```bash
|
||||
# Démarrer le conteneur
|
||||
docker compose -f M2/SQL/docker-compose.yml up -d
|
||||
|
||||
# Exécuter les TPs via Make
|
||||
make tp1 # Exécute scripts/TP1.sql
|
||||
make tp2 # Exécute scripts/TP2.sql
|
||||
make project # Exécute scripts/DANJOU_Arthur.sql
|
||||
```
|
||||
Logs générés dans `M2/SQL/logs/`.
|
||||
|
||||
## Nommage des Fichiers
|
||||
|
||||
| Type | Convention | Exemple |
|
||||
|------|------------|---------|
|
||||
| TP numérotés | `TP{n}.ipynb`, `TP{n}.Rmd` | `TP1.ipynb`, `TP2.Rmd` |
|
||||
| Projets personnels | `DANJOU_Arthur.*` | `DANJOU_Arthur.sql` |
|
||||
| Labs thématiques | Nom descriptif complet | `Lab 4 - Monte Carlo Control in Blackjack game.ipynb` |
|
||||
|
||||
## Stack Technique Principale
|
||||
|
||||
- **Data Science** : numpy, pandas, scipy, matplotlib, seaborn, plotly
|
||||
- **ML** : scikit-learn, xgboost, catboost, tensorflow/keras, shap
|
||||
- **LLM/RAG** : langchain, sentence-transformers, faiss-cpu
|
||||
- **Géospatial** : geopandas, rasterio
|
||||
- **R** : tidyverse, ggplot2, FactoMineR, caret, glmnet
|
||||
|
||||
## Bonnes Pratiques
|
||||
|
||||
1. Toujours vérifier si un `pyproject.toml` local existe avant d'ajouter des dépendances
|
||||
2. Les notebooks contiennent souvent du texte explicatif en **français**
|
||||
3. Utiliser Plotly pour les visualisations interactives, Matplotlib/Seaborn pour les exports
|
||||
4. Les données volumineuses ne sont pas versionnées - télécharger via le code du notebook si nécessaire
|
||||
67
CLAUDE.md
Normal file
67
CLAUDE.md
Normal file
@@ -0,0 +1,67 @@
|
||||
# CLAUDE.md
|
||||
|
||||
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||
|
||||
## Quick Commands
|
||||
|
||||
### Python Projects
|
||||
- **Install dependencies**: `uv sync` (root) or `uv sync` in a subdirectory with its own `pyproject.toml`
|
||||
- **Run linter**: `ruff check .` (includes all files via `extend-include`)
|
||||
- **Auto-fix**: `ruff check . --fix`
|
||||
- **Format imports**: `ruff format .`
|
||||
|
||||
### R Projects
|
||||
- **Load project**: RStudio/.Rprofile uses `renv` for isolation
|
||||
- **Check style**: `lintr::lint("script.R")`
|
||||
- **Format code**: `styler::style_file("script.R")`
|
||||
|
||||
### SQL (M2/SQL)
|
||||
```bash
|
||||
docker compose -f M2/SQL/docker-compose.yml up -d
|
||||
make tp1 # Execute TP1.sql
|
||||
make tp2 # Execute TP2.sql
|
||||
make tp3 # Execute TP3.sql
|
||||
make project # Execute DANJOU_Arthur.sql
|
||||
```
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
L3/ # Bachelor's degree (3rd year)
|
||||
M1/ # Master's degree (1st year)
|
||||
M2/ # Master's degree (2nd year)
|
||||
└── <Course>/ # e.g., "Deep Learning", "Data Visualisation"
|
||||
├── TP{n}/ # Practical work (numbered)
|
||||
├── Project/ # Final project
|
||||
└── data/ # Course-specific data
|
||||
```
|
||||
|
||||
## Python Conventions
|
||||
|
||||
- **Package manager**: `uv` (workspace configured at root)
|
||||
- **Linting**: Ruff with strict rules (`select = ["ALL"]`)
|
||||
- **Import ordering**: Custom sections in `pyproject.toml`:
|
||||
- `data-science`: numpy, pandas, scipy, matplotlib, seaborn, plotly
|
||||
- `ml`: tensorflow, keras, torch, sklearn, xgboost, catboost, shap
|
||||
- **Reproducibility**: Use `np.random.seed(42)` for random seeds
|
||||
- **Notebooks**: Jupyter with descriptive markdown cells
|
||||
|
||||
## R Conventions
|
||||
|
||||
- **Package management**: `renv` (autoloading via `.Rprofile`)
|
||||
- **Linting**: `lintr` configured in `.lintr`
|
||||
- **Documents**: RMarkdown (`.Rmd`) for reproducible reports
|
||||
- **Visualization**: ggplot2, plotly, FactoMineR
|
||||
|
||||
## Key Technologies
|
||||
|
||||
- **Data Science**: numpy, pandas, scipy, matplotlib, seaborn, plotly, geopandas
|
||||
- **Machine Learning**: scikit-learn, xgboost, catboost, tensorflow, keras, shap
|
||||
- **LLM/RAG**: langchain, sentence-transformers, faiss-cpu
|
||||
- **R**: tidyverse, ggplot2, FactoMineR, caret, glmnet, RShiny
|
||||
|
||||
## Notes
|
||||
|
||||
- Some subprojects (e.g., `M2/Reinforcement Learning/project/`) have isolated `pyproject.toml` files
|
||||
- Large datasets are not versioned—download via notebook code when needed
|
||||
- Course materials and documentation are primarily in French
|
||||
Reference in New Issue
Block a user