Chuvash Toponymy Database v.0.1

Artifact [d76519318c]
Login

Artifact [d76519318c]

Artifact d76519318c197f06b223b601efe456b040b3d04091a2df058c58fa2a51dd7d97:


Structure

tests/
├── __init__.py          # Marks this as a Python package
├── config.py            # Configuration (e.g., database connection details)
├── schema.py            # Table creation and schema definitions
├── csv_loader.py        # CSV loading logic
├── validators.py        # Validation checks (schema, logic, data quality)
└── main.py              # Entry point to tie everything together

init.py

Empty.

config.py

This file holds configuration details, such as database connection parameters and CSV file paths.

schema.py

This file defines the PostgreSQL table schemas with proper constraints.

csv_loader.py

Handles CSV parsing and loading into PostgreSQL.

validators.py

Contains all validation logic, adapted for PostgreSQL syntax.

main.py

Ties everything together and runs the validation.

Key Changes and Notes

PostgreSQL Integration:

Modular Design:

Error Handling:

Execution:

Run the script with:

python main.py \
  --spatial /path/to/Spatial.csv \
  --linguistic /path/to/Linguistic.csv \
  --temporal /path/to/Temporal.csv \
  --sources /path/to/Sources.csv \
  --db-name your_db \
  --db-user your_user \
  --db-password your_password

Customization: