xcytxs-setup 0.1
An automated setup tool for configuring services and installing dependencies.
Requires Python: >=3.6

# **xcytos-setup Documentation**

## **Overview**
`xcytos-setup` is an automated setup tool designed to simplify the setup of Python environments. It verifies that necessary dependencies are installed, handles the configuration of ports and credentials, and offers an easy way to get your Python application up and running quickly.

## **File Structure**
```
xcytos-setup/                # Root directory for xcytos setup
â”‚
â”œâ”€â”€ xcytxs_setup/            # Core setup logic inside this directory
â”‚   â””â”€â”€ __init__.py          # Main Python module that holds the core logic
â”‚
â”œâ”€â”€ setup.py                 # The main setup script for the project
â”œâ”€â”€ requirements.txt         # List of required Python packages
â”œâ”€â”€ LICENSE                  # Licensing information
â”œâ”€â”€ README.md                # Project documentation (this file)
```

---

## **Features**

### 1. **Python Verification**
- **Description**: Ensures that Python is installed and available in the system.
- **Functionality**: Verifies Pythonâ€™s presence by checking the Python version through system commands.
  
### 2. **Install Requirements**
- **Description**: Installs all Python dependencies specified in the `requirements.txt`.
- **Functionality**: If a `requirements.txt` file exists, the tool installs the dependencies using `pip install -r requirements.txt`.

### 3. **Dependency Discovery**
- **Description**: Analyzes Python files in the project directory for any missing modules.
- **Functionality**: Looks for imported modules in the projectâ€™s `.py` files and checks if they are installed.

### 4. **Port Handling**
- **Description**: Prompts the user for available ports to use for the services.
- **Functionality**: Asks the user to enter port numbers for services like `main` and `admin`. It ensures that the ports are not already in use on the system.

### 5. **User Input (Username and Password)**
- **Description**: Prompts for the username and password if they are not passed via command-line arguments.
- **Functionality**: Collects authentication information interactively or via arguments.

---

## **Command-Line Arguments**

- `--port`: Specifies the port to be used for services (e.g., `main`, `admin`). The tool will ask the user interactively if not specified.
- `--services`: Defines the services (like `main`, `admin`) that will be configured. Required when using `--port`.
- `--username`: Sets the username for application services.
- `--password`: Sets the password for application services.

---

## **Setup Instructions**

### **1. Python Verification and Dependency Installation**
To verify Python and install dependencies, run:

```bash
python xcytos-setup/setup.py --port 8000 --services main admin --username admin --password admin
```

### **2. Install Requirements**
If the project includes a `requirements.txt` file, you can install the dependencies by running:

```bash
python xcytos-setup/setup.py
```

This will automatically install the required libraries if they are specified in the `requirements.txt` file.

---

## **How It Works**

### **xcytos-setup Core Logic**
- **Python Verification**: Ensures Python is installed by running `sys.executable --version`.
- **Install Dependencies**: Installs any missing dependencies from the `requirements.txt` using `pip`.
- **Dependency Discovery**: Parses `.py` files to find any imported modules and confirms if they are installed.
- **Port Handling**: Prompts users for port numbers to configure the `main` and `admin` services.
- **Username & Password Configuration**: Collects user credentials for services when not provided in the command-line arguments.

---

## **License**
This project is licensed under the Apache License, Version 2.0. You can freely use, modify, and distribute the code under the terms specified in the license. A copy of the license is available in the `LICENSE` file in this repository.

---

### Conclusion

`xcytos-setup` simplifies the process of setting up a Python project by automating dependency installations, verifying system configurations, and ensuring the environment is ready for running the application. It currently handles basic setup tasks and can be extended for more advanced configuration in future versions.