Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Bug Report
description: Report a bug in ptool
labels: ["bug"]
body:
- type: markdown
attributes:
value: "Thanks for taking the time to report a bug!"

- type: textarea
id: description
attributes:
label: Description
description: A clear description of what the bug is.
validations:
required: true

- type: textarea
id: reproduce
attributes:
label: Steps to reproduce
description: Minimal steps to reproduce the behaviour.
placeholder: |
1. Run `ptool checksums ...`
2. Then run `ptool compare ...`
3. See error
validations:
required: true

- type: textarea
id: expected
attributes:
label: Expected behaviour
description: What you expected to happen.
validations:
required: true

- type: textarea
id: environment
attributes:
label: Environment
description: Output of `ptool --version` and `python --version`.
validations:
required: true
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Feature Request
description: Suggest a new feature or improvement
labels: ["enhancement"]
body:
- type: textarea
id: problem
attributes:
label: Problem
description: What problem does this feature solve?
validations:
required: true

- type: textarea
id: solution
attributes:
label: Proposed solution
description: Describe the solution you'd like.
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: Alternatives considered
description: Any alternative approaches you've thought about.
16 changes: 16 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## Summary

<!-- Describe what this PR does and why. -->

## Changes

-

## Test plan

- [ ] Tests added or updated
- [ ] `pytest tests/ -v` passes locally

## Related issues

<!-- Closes #... -->
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: pip install -e ".[dev]"

- name: Run tests
run: pytest tests/ -v
29 changes: 27 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
__pycache__
ptool.egg-info
# Python
__pycache__/
*.py[cod]
*.egg-info/
*.egg
dist/
build/

# Virtual environments
.venv/
.env/

# Testing
.pytest_cache/
.coverage
htmlcov/

# Editor
.vscode/
.idea/
*.swp
*.swo

# HPC
slurm-*.out

# OS
.DS_Store
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added
- Configurable checksum types: `imohash-64k` (default), `xxhash`, `md5`
- `--checksum-type` option on `ptool checksums` command
- Guard in `compare` and `summary` against mixing CSVs with different checksum types
- Test suite covering checksum type correctness and false-negative behaviour
- `pyproject.toml` replacing legacy `setup.py`
- `CONTRIBUTING.md`, `CODE_OF_CONDUCT.md`, `SECURITY.md`, `CHANGELOG.md`
- GitHub Actions CI workflow
- GitHub issue and PR templates

### Fixed
- Invalid `str[pyarrow]` dtype string in `read_csv` (now `string[pyarrow]`), which caused a `TypeError` on pandas 2.x
- Incorrect `license = "MIT"` metadata — corrected to GPL-3.0 to match the `LICENSE` file
- Invalid PyPI classifier `Development Status :: 0.2.2` — corrected to `Development Status :: 4 - Beta`
- Wrong `url` in package metadata (pointed to GitLab) — updated to GitHub

### Changed
- imohash sample size upgraded from 16 KB to 64 KB to reduce false-negative risk

## [0.2.2] - 2024-01-01

### Added
- `sync_options`: support for additional sync configuration options

## [0.2.1] - 2024-01-01

### Fixed
- Truncated prefix handling in checksum paths

## [0.2.0] - 2024-01-01

### Added
- Initial public release with `checksums`, `compare`, `summary`, and `prepare-rsync` commands
41 changes: 41 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes
* Focusing on what is best not just for us as individuals, but for the overall community

Examples of unacceptable behavior:

* The use of sexualized language or imagery, and sexual attention or advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at **pavan.siligam@gmail.com**. All complaints will be reviewed and investigated promptly and fairly.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1.
52 changes: 52 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Contributing to ptool

Thank you for considering contributing to ptool! This document describes how to get started.

## Development setup

1. Fork the repository and clone your fork:

```shell
git clone https://github.com/<your-username>/pool_tool.git
cd pool_tool
```

2. Create the conda environment and install the package in editable mode:

```shell
conda env create -f environment.yaml
conda activate ptool
pip install -e ".[dev]"
```

3. Verify the setup by running the test suite:

```shell
pytest tests/ -v
```

## Workflow

- Create a feature branch from `main`:

```shell
git checkout -b my-feature
```

- Make your changes, add tests, and ensure all tests pass before opening a PR.
- Write clear, descriptive commit messages.
- Open a pull request against `main` and fill in the PR template.

## Running tests

```shell
pytest tests/ -v
```

## Reporting bugs

Please use the [bug report template](https://github.com/esm-tools/pool_tool/issues/new?template=bug_report.yml) when filing issues.

## Code of conduct

This project follows the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md). By participating you agree to abide by its terms.
Loading
Loading