Metadata-Version: 2.4
Name: plainfile-project-check
Version: 0.1.0
Summary: Offline stable-ID reconciliation for normalized project and task exports
Author-email: Plainfile Tools <plainfiletools@gmail.com>
License: MIT License
        
        Copyright (c) 2026 Plainfile Tools contributors
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
        This license grants lawful personal and commercial use. It does not promise
        exclusive ownership of algorithms or AI-generated material, continuing
        maintenance, custom development, or fitness for a particular migration.
        
Keywords: csv,json,migration,reconciliation,data-quality
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# Plainfile Project Check

Plainfile Project Check is a free, open-source, dependency-free Python tool for comparing before-and-after project exports by stable ID. It runs locally, reads only the files you name, and emits a deterministic JSON report. It sends no data, performs no network requests, and includes no telemetry or runtime advertising.

It checks missing and unexpected project/task IDs, duplicate IDs in either snapshot, tasks whose project is absent, task-to-project reassignments, and exact-decimal `work_minutes` changes. A clean result exits `0`, differences exit `1`, and invalid input or a refused output exits `2`.

Requires Python 3.10 or newer.

## Install an offline wheel

From the directory containing the downloaded wheel, install the supplied file without relying on package-registry availability, contacting an index, or resolving dependencies:

```console
python -m pip install --no-index --no-deps plainfile_project_check-0.1.0-py3-none-any.whl
```

To run directly from a source checkout without installing, set `PYTHONPATH` to the `src` directory, then use the module command:

```powershell
$env:PYTHONPATH = "src"
python -m plainfile_project_check examples/before.json examples/after-clean.json
```

## Quick start with JSON

The normalized JSON format is exactly:

```json
{
  "projects": [{"id": "P-001", "name": "Plan"}],
  "tasks": [{"id": "T-001", "project_id": "P-001", "name": "Task", "work_minutes": "60.50"}]
}
```

From an installed package:

```console
plainfile-project-check before.json after.json --output report.json
```

The module form is equivalent:

```console
python -m plainfile_project_check before.json after.json
```

Omit `--output` to print the report to standard output. An output path must be new. The tool refuses to overwrite an existing output or either input.

## CSV adapter

For each snapshot, create one directory containing these two UTF-8 CSV files with exactly these header names and order:

`projects.csv`

```csv
id,name
P-001,"Plan, phase one"
```

`tasks.csv`

```csv
id,project_id,name,work_minutes
T-001,P-001,"Review, exact totals",60.50
```

Then run:

```console
plainfile-project-check before-dir after-dir --format csv --output report.json
```

Ready-to-run synthetic directories are included:

```console
plainfile-project-check examples/csv-before examples/csv-after-corrupted --format csv
```

CSV values remain text, so IDs such as `0007` keep their leading zeros. The adapter uses ordinary comma-delimited CSV with double-quoted fields. It rejects missing, reordered, extra, or duplicate columns, malformed rows, invalid UTF-8, and invalid decimal work values.

Each input file is limited to 10 MB. IDs, names, and task project IDs must be non-empty strings. Work minutes must be finite, non-negative exact decimal text or a JSON integer, with at most 50 digits and a decimal exponent from -12 through 12. JSON duplicate object keys are rejected.

## Scope and limitations

This tool accepts only user-supplied normalized JSON or the documented two-file CSV shape. It has no native Project Online, Microsoft Project, OData, XML, API, authentication, or extraction support. Exporting and mapping source-system data is your responsibility.

Names are validated but not compared. Tasks with duplicate IDs are reported and excluded from task reassignment and work comparison because identity is ambiguous. Duplicate project IDs are reported but do not suppress task comparisons. The report does not understand scheduling dependencies, calendars, resources, assignments, costs, custom fields, or fields omitted from the snapshots. A clean report does not certify a migration, prove data completeness, or establish legal authority to use the data. Keep source backups and review the report before changing another system.

The package code, documentation, examples, and tests were produced with substantial AI assistance under owner direction. All fixtures are original synthetic data; they contain no client data and demonstrate no client results. The package does not promise automatic updates, custom maintenance, or support.

The MIT license permits personal and commercial use, modification, and redistribution with its notice. It does not claim exclusive human authorship or exclusive ownership of general algorithms or AI-generated material.

If you need a separate pre-import CSV cleanup utility, Plainfile Tools sells [CSV Import Check for $19](https://plainfiletools.gumroad.com/l/csv-import-check?utm_source=pypi&utm_medium=package&utm_campaign=project_check_v010). It is a distinct product, is not required for this package, and does not unlock features here.

Contact: plainfiletools@gmail.com

## Development

```console
python -m unittest discover -s tests -v
python -m build --no-isolation
```
