semvec/pypi-packages huggingface dataset:
jps-code-repository-utils 0.3.2
Collection of utility Pythhon scripts to manage code repositories.
License: MIT
Requires Python: >=3.10
Keywords: code-repository, git, gitflow, version-control

# jps-code-repository-utils

![Build](https://github.com/jai-python3/jps-code-repository-utils/actions/workflows/test.yml/badge.svg)
![Publish to PyPI](https://github.com/jai-python3/jps-code-repository-utils/actions/workflows/publish-to-pypi.yml/badge.svg)
[![codecov](https://codecov.io/gh/jai-python3/jps-code-repository-utils/branch/main/graph/badge.svg)](https://codecov.io/gh/jai-python3/jps-code-repository-utils)

---

## 🧭 Overview

**jps-code-repository-utils** is a collection of Python-based utility scripts designed to manage and standardize code repositories.  
These tools simplify common administrative tasks such as enforcing naming conventions, auditing branch
structures, generating repository history reports, and synchronizing version metadata.

### ✨ Key Features

- Automated enforcement of branch naming conventions (`feature/`, `bugfix/`, `hotfix/`, `release/`, etc.)
- Repository cleanup and archival of inactive branches
- Consistent versioning and repository metadata management
- Repository history generation with per-branch summaries and event classification
- Integration with Jira and CI/CD pipelines for reporting and audit purposes
- Robust testing framework using **pytest** with 100% reproducible local runs

---

## 🧩 Included Utilities

| Script | Description |
|--------|--------------|
| `standardize_branches.py` | Standardizes branch names, prefixes, and folders (feature, bugfix, hotfix, release). |
| `audit_repository.py` | Audits repository metadata, tags, and release consistency. |
| `repo_history.py` | Generates detailed repository history reports with per-branch summaries, tag events, and merge timelines. |

---

## 💻 Example Commands

```bash
# Standardize branch naming across a repo
python -m scripts.standardize_branches --repo /path/to/repository

# Generate a full repository history report
python -m scripts.repo_history --global-tags
```

To explore command options:

```bash
jps-code-repository-utils-standardize --help
jps-code-repository-utils-audit --help
jps-code-repository-utils-history --help
```

---

## ⚙️ Installation

```bash
make install
```

---

## 🧪 Development Workflow

```bash
make fix && make format && make lint
make test
```

## Recent Additions

- Comprehensive pytest suite for `repo_history.py`
- Dummy Git repository fixtures for isolated test execution
- 6 passing tests and 1 intentionally skipped (network-dependent)

---

## 📦 Packaging and Distribution

This project follows semantic versioning and uses GitHub Actions for continuous integration,  
PyPI publishing, and test coverage reporting via **Codecov**.

---

## 📜 License

MIT License © Jaideep Sundaram
ensight-reader 0.13.1
A pure Python reader for the EnSight Gold format
License: MIT
Requires Python: >=3.9

[![CI - build](https://img.shields.io/github/actions/workflow/status/tkarabela/ensight-reader/main.yml?branch=master)](https://github.com/tkarabela/ensight-reader/actions)
[![CI - coverage](https://img.shields.io/codecov/c/github/tkarabela/ensight-reader)](https://app.codecov.io/github/tkarabela/ensight-reader)
[![MyPy & Ruffle checked](https://img.shields.io/badge/MyPy%20%26%20Ruffle-checked-blue?style=flat)](https://github.com/tkarabela/pysubs2/actions)
![PyPI - Version](https://img.shields.io/pypi/v/ensight-reader.svg?style=flat)
![PyPI - Status](https://img.shields.io/pypi/status/ensight-reader.svg?style=flat)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/ensight-reader.svg?style=flat)
![License](https://img.shields.io/pypi/l/ensight-reader.svg?style=flat)

# ensight-reader

This library provides a pure Python reader (with some writing capability) for the EnSight Gold data format,
a common format for results of computational fluid dynamics (CFD) simulations.
It also comes with a few CLI tools, notably `ensight_transform` which
allows you to perform in-place scaling/translation/etc. of the geometry in your case.

The library designed for efficient, selective, memory-mapped access to data from EnSight Gold case –
something that would be useful when importing the data into other systems. If you're looking for a more "batteries included" solution, look at
[`vtkEnSightGoldBinaryReader`](https://vtk.org/doc/nightly/html/classvtkEnSightGoldBinaryReader.html)
from the VTK library ([see docs for comparison](https://ensight-reader.readthedocs.io/en/latest/design-howto.html#comparison-with-vtk-library)).

### Requirements

- Python 3.9+
- NumPy 1.22+

### Installation

```sh
pip install ensight-reader
```

### Example – Python API

```python
import ensightreader
import numpy as np

case = ensightreader.read_case("example.case")
geofile = case.get_geometry_model()

part_names = geofile.get_part_names()           # ["internalMesh", ...]
part = geofile.get_part_by_name(part_names[0])
N = part.number_of_nodes

with geofile.open() as fp_geo:
    node_coordinates = part.read_nodes(fp_geo)  # np.ndarray((N, 3), dtype=np.float32)

variable = case.get_variable("UMean")

with variable.mmap_writable() as mm_var:
    data = variable.read_node_data(mm_var, part.part_id)
    data[:] = np.sqrt(data)                     # transform variable data in-place
```

### Example – CLI

```sh
# increment X coordinate
ensight_transform --translate 1 0 0 sphere.case

# scale by 1000 (eg. m -> mm conversion)
ensight_transform --scale 1e3 1e3 1e3 sphere.case

# rotation matrix
ensight_transform --matrix \
    0 -1  0  0 \
    1  0  0  0 \
    0  0  1  0 \
    0  0  0  1 \
    sphere.case

# transform only "internalMesh" part
ensight_transform --translate 1 0 0 --only-parts internalMesh motorbike.case
```

To learn more, please [see the documentation](https://ensight-reader.readthedocs.io).