Main setup function.
()
| 22 | |
| 23 | |
| 24 | def main(): |
| 25 | """Main setup function.""" |
| 26 | print("🚀 Setting up docstrange development environment...\n") |
| 27 | |
| 28 | # Check Python version |
| 29 | if sys.version_info < (3, 8): |
| 30 | print("❌ Python 3.8 or higher is required") |
| 31 | sys.exit(1) |
| 32 | |
| 33 | print(f"✅ Python {sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro} detected") |
| 34 | |
| 35 | # Install dependencies |
| 36 | print("\n📦 Installing dependencies...") |
| 37 | |
| 38 | # Install base dependencies |
| 39 | if not run_command("pip install -e .", "Installing package in development mode"): |
| 40 | print("❌ Failed to install package") |
| 41 | sys.exit(1) |
| 42 | |
| 43 | # Install development dependencies |
| 44 | if not run_command("pip install -e .[dev]", "Installing development dependencies"): |
| 45 | print("⚠️ Failed to install development dependencies (continuing anyway)") |
| 46 | |
| 47 | # Run tests |
| 48 | print("\n🧪 Running tests...") |
| 49 | if not run_command("python -m pytest tests/ -v", "Running tests"): |
| 50 | print("⚠️ Some tests failed (this might be expected for first run)") |
| 51 | |
| 52 | # Run example |
| 53 | print("\n📝 Running basic example...") |
| 54 | if not run_command("python examples/basic_usage.py", "Running basic usage example"): |
| 55 | print("⚠️ Example failed (this might be expected for first run)") |
| 56 | |
| 57 | print("\n🎉 Setup completed!") |
| 58 | print("\n📚 Next steps:") |
| 59 | print("1. Check out the examples/ directory for usage examples") |
| 60 | print("2. Run 'python -m pytest tests/' to run all tests") |
| 61 | print("3. Run 'python examples/basic_usage.py' to see the library in action") |
| 62 | print("4. Check the README.md for detailed documentation") |
| 63 | |
| 64 | |
| 65 | if __name__ == "__main__": |
no test coverage detected