semvec/pypi-packages huggingface dataset:
architecture-checker 0.2.9
A tool to enforce architectural patterns in python projects
Requires Python: >=3.6

# Architecture Checker

**Architecture Checker** is a standalone Python tool for enforcing architectural patterns and dependencies in large
python projects. By analyzing code structure and dependencies, this tool ensures that architectural rules are followed,
promoting cleaner, more maintainable, and modular codebases.

Inspired by https://github.com/qossmic/deptrac

## Features

- **Layer-Based Analysis**: Define project layers and restrict their dependencies to enforce modularity.
- **Dynamic Layer Configuration**: Easily configure collectors for each layer using file patterns and class inheritance.
- **Cross-Layer Dependency Rules** (TODO): Specify rules to disallow certain layers from accessing others.
- **Extensible and Configurable**: Customize layers and rules for any python project setup.

## Installation

To install **Architecture Checker**, use `pip`:

```bash
pip install architecture_checker
```

## Configuration

Before running the tool, create a configuration file (`config.yaml` or similar) that specifies the rules and target
files to enforce.

### Example Configuration (`config.example.yaml`)

```yaml
layers:
  - name: models
    collectors:
      - type: class_inherits
        base_class: "django.db.models.Model"

  - name: services
    collectors:
      - type: file_regex
        regex: "^.*/providers.py$"

  - name: views
    collectors:
      - type: file_regex
        regex: ".*/views_api.py"

ruleset:
  views:
    disallow:
      - models  # Disallows direct access to models in views

```

## Usage

Run the tool from the command line by specifying the project root directory and configuration file:

```bash
python run_architecture_checker.py --project_root='/path/to/your_project' --config=config.example.yaml
```

### Arguments

- `--project_root`: The path to the root of the project where apps are located.
- `--config`: Path to the configuration file that defines the rules and target files.

## Sample Output

If violations are found, the tool will output a summary of architectural violations grouped by app, along with details
of each violation, such as the file, line number, and violation message.

```plaintext
/path/to/your_project/your_project/app1/views_api.py:74 - Layer 'views' is not allowed to depend on layer 'models'
```

## Running Tests

To test the tool, use `unittest`:

```bash
python -m unittest discover tests
```

## License

See the [LICENSE](LICENSE) file for details.
partitioned 0.1.4
Determine if a series of lines is partitioned (all identical lines sequential).
Requires Python: >=3.6

The `partitioned` package is a simple Python script to check if a sequence of lines is partitioned (all duplicate lines are sequential). 

Example of partitioned lines (where `partitioned` exits 0):
WORLD
WORLD
HELLO
HELLO

Note the above are not sorted, only partitioned! The `partitioned` tool does not detect if its input is sorted.

Example of unpartitioned lines (where `partitioned` exits 1):
HELLO
WORLD
HELLO
WORLD


The original motive for `partitioned` was for bioinformatics, specifically to determine if a .sam/.bam file was partitioned by readID, permitting a time-consuming sort by name that is usually unnecessary. An example of how it can be used for this is:

`samtools view demo.bam | awk -F'\\t' '{ print \$1 }' | partitioned && echo "demo.bam is partitioned by readID" || echo "demo.bam is not partitioned by readID"`

Details:
+ `partitioned` exits 0 (success) if the file is partitioned, 1 otherwise.
+ It uses a temporary SQLite3 database cache previously seen lines. This starts primarily in memory and spills to disk if necessary and is cleaned up automatically when the command terminates.
+ It can also read from a file with `-i` (streams from stdin if unspecified).
+ Pragmas can be set with `--pragmas` as a space-separated list.
+ The number of lines read in at once is configurable with `--chunk-size` (default is 1 million lines).
baram 0.5.0
AWS Framework for python
Requires Python: <4.0,>=3.9

## Baram

Python based AWS Framework which leverages boto3 and awswrangler.

Baram means "wind" in Korean which makes cloud move conveniently.

## Features

- TBD
- Convenient S3 Usage(KMS setting, delete directory ...)
- Athena Iceberg
- Athena Performance Management(cache, ctas_approach control)
- Glue Job Management

## Quick Start

```bash
> pip install awswrangler
```

## For Beginner

### S3 Usage

```python
# import S3Manager
from baram.s3_manager import S3Manager

sm = S3Manager("my_bucket_name")

# Upload local file to S3
sm.upload_file(local_file_path="local_file_path",
               s3_file_path="s3_file_path")

# Emphasize Directory Deletion
sm.download_dir(s3_dir_path="s3_directory_path",
                local_dir_path="local_directory_path")

# Copy S3 object
sm.copy_object(from_key="from_s3_key",
               to_key="to_s3_key")

```

## For Data Scientist

### S3 Usage

```python

# Read csv from s3

# EDA

# Merging Datasets from S3(https://aws-sdk-pandas.readthedocs.io/en/stable/tutorials/013%20-%20Merging%20Datasets%20on%20S3.html)

# write dataframe to s3

```

### Athena Usage

```python

# Read rows from Athena

# EDA

# write dataframe to Another Athena Table without schema input.

# Batching(Good for restricted memory environments), https://aws-sdk-pandas.readthedocs.io/en/stable/tutorials/006%20-%20Amazon%20Athena.html

# big table dump to s3

```

## For Data Engineer

### Manage S3

```python

# check_s3_object_exists

# count_csv_row_count

# rename_file

```

## Read The Docs

- [How to import Baram in Glue](TBD)
- [How to import Baram in SageMaker](TBD)
- [S3 Usage with Baram](TBD)
- [Athena Usage with Baram](TBD)