MCPcopy Create free account
hub / github.com/ashfawk/oceanhazard-detection / main

Function main

setup_python.py:103–138  ·  view source on GitHub ↗

Main setup function

()

Source from the content-addressed store, hash-verified

101 return True
102
103def main():
104 """Main setup function"""
105 print("🚀 Setting up Ocean Hazard System Python Environment")
106 print("=" * 50)
107
108 # Check Python version
109 if not check_python_version():
110 sys.exit(1)
111
112 # Install requirements
113 if not install_requirements():
114 print("❌ Failed to install requirements")
115 sys.exit(1)
116
117 # Install spaCy model
118 if not install_spacy_model():
119 print("⚠️ Warning: Failed to install spaCy model")
120
121 # Download NLTK data
122 if not download_nltk_data():
123 print("⚠️ Warning: Failed to download NLTK data")
124
125 # Create data directories
126 create_data_directories()
127
128 # Test imports
129 if not test_imports():
130 print("❌ Some modules failed to import")
131 sys.exit(1)
132
133 print("\n" + "=" * 50)
134 print("🎉 Python environment setup completed successfully!")
135 print("\nNext steps:")
136 print("1. Set up your API keys in a .env file")
137 print("2. Test the data processing pipeline")
138 print("3. Run the social media extractors")
139
140if __name__ == "__main__":
141 main()

Callers 1

setup_python.pyFile · 0.70

Calls 6

check_python_versionFunction · 0.85
install_requirementsFunction · 0.85
install_spacy_modelFunction · 0.85
download_nltk_dataFunction · 0.85
create_data_directoriesFunction · 0.85
test_importsFunction · 0.70

Tested by

no test coverage detected