Skip to content

SlippyRicky/python-dev-env-ups

Repository files navigation

🐍 Cross-Platform Python Development Environment

A comprehensive, cross-platform Python development environment designed for UPS M1 SGM programming coursework. Works seamlessly on macOS, Linux, and Windows.

Python Platform License

🎯 Purpose

This repository provides a ready-to-use Python development environment that works consistently across different operating systems, perfect for academic coursework where you might need to work on:

  • 🍎 Personal Mac (with Terminal and IntelliJ)
  • 🐧 Linux systems (university servers, personal installations)
  • πŸ’» Windows computers (school labs with Emacs)

πŸš€ Quick Start

1. Clone and Setup

git clone <your-repo-url>
cd python-dev-env
./check_platform.sh    # Check system compatibility
./setup_env.sh         # Automatic setup

2. Activate Environment

# macOS/Linux
source activate_env.sh

# Windows Command Prompt
activate_env.bat

3. Start Coding

python src/example.py   # Run example
pytest tests/          # Run tests
jupyter notebook        # Start Jupyter

πŸ“‹ Features

✨ Cross-Platform Compatibility

  • Automatic OS detection (macOS, Linux distributions, Windows)
  • Smart Python detection (python3, python, py commands)
  • Platform-specific installation guides
  • Consistent workflow across all systems

πŸ› οΈ Development Tools

  • Testing: pytest with example test suite
  • Code Quality: black (formatter) + flake8 (linter)
  • Interactive Development: Jupyter notebooks
  • Data Science: numpy, pandas, matplotlib
  • Web Development: requests library

πŸ”§ Utility Scripts

  • setup_env.sh - Universal environment setup
  • activate_env.sh - Enhanced activation (Unix)
  • activate_env.bat - Windows activation
  • check_platform.sh - System diagnostics

πŸ“ Project Structure

python-dev-env/
β”œβ”€β”€ πŸ“œ Scripts
β”‚   β”œβ”€β”€ activate_env.sh         # Unix activation
β”‚   β”œβ”€β”€ activate_env.bat        # Windows activation
β”‚   β”œβ”€β”€ setup_env.sh           # Universal setup
β”‚   └── check_platform.sh      # Platform diagnostics
β”œβ”€β”€ πŸ“š Documentation
β”‚   β”œβ”€β”€ README.md              # Main documentation
β”‚   └── CROSS_PLATFORM_GUIDE.md # Detailed platform guide
β”œβ”€β”€ 🐍 Python Code
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   └── example.py         # Example Python script
β”‚   β”œβ”€β”€ tests/
β”‚   β”‚   └── test_example.py    # Unit tests
β”‚   └── example_notebook.ipynb # Jupyter example
└── βš™οΈ Configuration
    β”œβ”€β”€ requirements.txt        # Python dependencies
    └── .gitignore             # Git ignore rules

πŸ–₯️ Platform Support

🍎 macOS

  • Shells: zsh (default), bash
  • IDEs: IntelliJ IDEA, PyCharm, VS Code
  • Package Manager: Homebrew compatible
  • Architecture: Intel & Apple Silicon (M1/M2/M3)

🐧 Linux

  • Distributions: Ubuntu, Debian, CentOS, RHEL, Fedora, Arch
  • Package Managers: apt, yum, dnf, pacman
  • Desktop Environments: GNOME, KDE, XFCE, i3
  • Editors: Emacs, Vim, VS Code

πŸ’» Windows

  • Native: Command Prompt, PowerShell
  • Unix-like: WSL, Git Bash, Cygwin
  • IDEs: VS Code, PyCharm, Emacs
  • Terminals: Windows Terminal, ConEmu

πŸ“¦ Installation

Prerequisites

Ubuntu/Debian:

sudo apt update
sudo apt install python3 python3-venv python3-pip build-essential

CentOS/RHEL/Fedora:

sudo dnf install python3 python3-venv python3-pip gcc gcc-c++ make

macOS:

# Install Homebrew (if not installed)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install python

Windows:

  • Download Python from python.org
  • Or install from Microsoft Store
  • Consider using WSL for better compatibility

πŸ”§ Usage Examples

Basic Development Workflow

# Activate environment
source activate_env.sh

# Install additional packages
pip install requests beautifulsoup4

# Update requirements
pip freeze > requirements.txt

# Format code
black src/

# Check code style
flake8 src/

# Run tests
pytest tests/ -v

# Start Jupyter for data analysis
jupyter notebook

Working with Different Platforms

# Check your system setup
./check_platform.sh

# Platform-specific activation:
source activate_env.sh      # macOS/Linux
activate_env.bat            # Windows CMD
source activate_env.sh      # Git Bash/WSL

πŸ§ͺ Testing

The environment includes a comprehensive test suite:

# Run all tests
pytest tests/

# Run with coverage
pytest tests/ --cov=src

# Run specific test
pytest tests/test_example.py::test_basic_statistics -v

πŸ”§ Troubleshooting

Common Issues

Environment not activating?

./check_platform.sh  # Check system status
./setup_env.sh       # Recreate environment

Python not found?

  • macOS: brew install python
  • Linux: sudo apt install python3 (or equivalent)
  • Windows: Download from python.org

Permission errors on Linux?

chmod +x *.sh

See detailed troubleshooting guide for platform-specific solutions.

πŸ“š Documentation

🀝 Contributing

This is a personal academic repository, but feel free to:

  1. Fork for your own coursework
  2. Adapt for different subjects
  3. Suggest improvements via issues

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸŽ“ Academic Context

Created for UniversitΓ© Paris Saclay (UPS) M1 SGM programming coursework. Designed to provide a consistent development environment across different computing environments encountered in academic settings.


Happy Coding! πŸš€

"Write once, run everywhere" - now for Python development environments too!

About

Parrallel work space for python work

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published