openizer 1.0.0
Openizer is a tool designed to calculate the Open Source Compatibility Score (OSCS) of a repository.
Requires Python: >=3.8

## Openizer

### Overview

**Openizer** is a tool designed to calculate the **Open Source Compatibility Score (OSCS)** of a repository. It evaluates your project against open-source best practices, providing a comprehensive score out of 100. By checking for essential files, documentation quality, code practices, and more, Openizer helps you enhance your repository's alignment with open-source standards.

---

### Table of Contents

- [Features](#features)
- [Installation](#installation)
- [Usage](#usage)
  - [Basic Usage](#basic-usage)
  - [Command-Line Options](#command-line-options)
  - [Example Output](#example-output)
- [Configuration File Support](#configuration-file-support)
  - [Using a Configuration File](#using-a-configuration-file)
  - [Sample Configuration File](#sample-configuration-file)
- [Checks Performed](#checks-performed)
- [Scoring System](#scoring-system)
- [Contributing](#contributing)
- [License](#license)

---

### Features

- **Comprehensive Evaluation**: Checks licensing, documentation, community standards, code quality, security practices, release management, and legal compliance.
- **Modular Design**: Easily extendable with new checks or customization.
- **Configuration File Support**: Customize behavior via an `openizer.yaml` file.
- **User-Friendly Output**: Clear, color-coded messages indicating the status of each check.
- **Command-Line Interface**: Flexible options to adjust verbosity, scoring details, and repository path.
- **Logging**: Adjustable logging levels to aid in debugging and integration.

---

### Installation

1. **Clone the Repository**

   ```bash
   git clone https://github.com/onurravli/openizer.git
   cd openizer
   ```

2. **Install Dependencies**

   Openizer requires Python 3.6 or higher and the following Python packages:

   - `argparse`
   - `colorama`
   - `PyYAML`

   Install the dependencies using `pip`:

   ```bash
   pip install -r requirements.txt
   ```

   _If you don't have `pip`, you can install it from [here](https://pip.pypa.io/en/stable/installation/)._

---

### Usage

#### Basic Usage

Run Openizer on your repository (by default, it checks the current directory):

```bash
python openizer
```

#### Command-Line Options

- `-h`, `--help`: Show the help message and exit.
- `-v`, `--verbose`: Increase output verbosity (more detailed output).
- `-q`, `--quiet`: Minimal output (only the final score and summary).
- `-s`, `--scores`: Display detailed scoring for each rule.
- `-p`, `--path`: Path to the repository to check (default: current directory).
- `--config`: Path to a custom configuration file (default: `openizer.yaml` in the repository root).

**Example:**

```bash
python openizer -v -s -p /path/to/your/repo --config /path/to/openizer.yaml
```

#### Example Output

```plaintext
Calculating Open Source Compatibility Score...

Section: Licensing
✔ LICENSE file is present. (10/10 points)
✔ License mentioned in README. (5/5 points)

Section: Documentation
✔ README contains all necessary sections. (5/5 points)
✔ CONTRIBUTING.md file is present. (5/5 points)
✔ CODE_OF_CONDUCT.md file is present. (5/5 points)
▲ API/User documentation is missing. (0/5 points)

...

Total Score: 85/100
Excellent! Your repository is highly compatible with open source best practices.
```

---

### Configuration File Support

Openizer supports customization through a YAML configuration file (`openizer.yaml`). This allows you to:

- Enable or disable specific checks.
- Specify custom file names or patterns.
- Adjust scoring weights (if implemented).

#### Using a Configuration File

Place an `openizer.yaml` file in the root of your repository or specify a custom path using the `--config` option.

**Example:**

```bash
python openizer --config /path/to/openizer.yaml
```

#### Sample Configuration File

```yaml
# openizer.yaml

# Enable or disable checks

checks:
  licensing: true
  documentation: true
  community_standards: true
  project_governance: false # Disabled
  code_quality: true
  security_practices: true
  release_management: true
  legal_compliance: true

# Custom file names or patterns

files:
  readme: ["README_EN.md"]
  license: ["LICENSE_APACHE.md"]
  contributing: ["CONTRIBUTE.md"]
  code_of_conduct: ["CODEOFCONDUCT.md"]
  style_guide: ["STYLE_GUIDE.md"]
  linter: [".eslintrc.json"]
  ci_config: [".github/workflows", ".travis.yml"]
  dependency: ["package-lock.json"]
  third_party: ["THIRD_PARTY.md"]
  cla: ["DCO.md"]
# Scoring weights (optional)

# scoring:

# licensing: 15

# documentation: 10

# # Adjust weights for other sections
```

---

### Checks Performed

Openizer evaluates your repository across several categories:

1. **Licensing**

   - Presence of a `LICENSE` file.
   - License mentioned in the `README`.

2. **Documentation**

   - Comprehensive `README` file with sections like Overview, Installation, and Usage.
   - Presence of a `CONTRIBUTING.md` file.
   - Presence of a `CODE_OF_CONDUCT.md` file.
   - Availability of API or user documentation.

3. **Community Standards**

   - Issue templates are set up.
   - Pull request template is present.
   - Communication channels are mentioned (e.g., Slack, Discord).

4. **Project Governance**

   - Maintainers and their roles are documented.
   - Decision-making process is documented.

5. **Code Quality**

   - Coding standards and style guides are documented.
   - Automated testing is set up.
   - Code review process is documented.

6. **Security Practices**

   - Presence of a `SECURITY.md` file.
   - Dependency management and updates are in place.

7. **Release Management**

   - Semantic versioning and tags are used.
   - Presence of a `CHANGELOG.md` file.

8. **Legal Compliance**
   - Third-party licenses are documented.
   - Contributor License Agreement (CLA) or Developer Certificate of Origin (DCO) is implemented.

---

### Scoring System

Each check contributes to the total score out of 100. Points are awarded based on the presence and quality of essential files and practices.

- **Licensing**: 15 points
- **Documentation**: 20 points
- **Community Standards**: 15 points
- **Project Governance**: 10 points
- **Code Quality**: 15 points
- **Security Practices**: 10 points
- **Release Management**: 5 points
- **Legal Compliance**: 10 points

_Note: The scoring weights can be adjusted via the configuration file if the feature is implemented._

---

### Contributing

Contributions are welcome! If you'd like to add new features, improve existing ones, or fix bugs, please follow these steps:

1. **Fork the Repository**

   Click the "Fork" button at the top right of this page to create a copy of this repository under your GitHub account.

2. **Clone Your Fork**

   ```bash
   git clone https://github.com/onurravli/openizer.git
   cd openizer
   ```

3. **Create a New Branch**

   ```bash
   git checkout -b feature/your-feature-name
   ```

4. **Make Your Changes**

   Implement your feature or fix.

5. **Commit Your Changes**

   ```bash
   git commit -am "Add new feature"
   ```

6. **Push to Your Fork**

   ```bash
   git push origin feature/your-feature-name
   ```

7. **Open a Pull Request**

   Go to the original repository and open a pull request from your forked repository.

---

### License

This project is licensed under the [MIT License](LICENSE).

---

_Enhance your open-source projects by ensuring they meet the highest standards. Use Openizer to identify areas for improvement and showcase your commitment to open-source excellence!_