Quick guide for testing the package and code changes.
With editable install (pip install -e .), changes are immediate - no reinstall needed!
# Run quick test script
python quick_test.py
# Or test manually
python -c "import pydimension; print('✅ OK')"
pydimension-generate --help# Run full test suite
python test_package_installation.pyThis verifies:
- ✅ All classes can be imported
- ✅ Config files are accessible
- ✅ Command-line tools are available
- Make code changes (any
.pyfile inpydimension/) - Test immediately (no reinstall needed with editable install):
python quick_test.py
- Test specific functionality:
python -c "from pydimension.data_generation import DataGenerator; print('✅ OK')"
Only if you changed:
setup.py(package structure, entry points)- Package structure (added/removed modules)
- Entry points (CLI tool definitions)
pip install -e . --force-reinstall# Data generation
python -c "
from pydimension import DataGenerator, DataGenerationConfig
config = DataGenerationConfig.from_dict({
'DATA_GENERATION': {'enabled': True, 'N': 7, 'M': 10, 'ndim': 1, 'poly_order': 1, 'coefficients': [2.0, 1.0], 'random_seed': 32},
'OUTPUT': {'output_dir': 'test_output', 'data_dir': 'data', 'figures_dir': 'figures', 'results_dir': 'results'}
})
gen = DataGenerator(config)
gen.generate(verbose=False)
print('✅ Data generation works')
"pydimension-generate --config pydimension/configs/config_synthetic.json
pydimension-preprocess --config pydimension/configs/config_synthetic.json
pydimension-analyze --config pydimension/configs/config_synthetic.json
pydimension-filter --config pydimension/configs/config_synthetic.json
pydimension-optimize --config pydimension/configs/config_synthetic.json --plotpython run_pipeline.py --config pydimension/configs/config_synthetic.json --plot# Test that package works from anywhere
cd /tmp
python -c "import pydimension; print('✅ Package accessible')"
cd /Users/xie/projects/PyDimensionChanges not reflected?
pip install -e . --force-reinstall --no-cache-dirImport errors?
python -m py_compile pydimension/your_module.py # Check syntax
pip install -e . --force-reinstallCLI not working?
pip install -e . --force-reinstall # Entry points need reinstallquick_test.py- Fast test after code changes (~5 seconds)test_package_installation.py- Full installation verificationtest_environment.py- Environment and dependency check
See the Workflow section in README.md for module-specific test commands and examples.