Metadata-Version: 2.3
Name: cfde-c2m2
Version: 0.4.1
Summary: Utilities for preparing C2M2 tables
Author: CFDE DRC
Author-email: help@cfde.cloud
Requires-Python: >=3.9
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: click (<8.2.1) ; python_version < "3.10"
Requires-Dist: click (>=8.2.1,<9.0.0) ; python_version >= "3.10"
Requires-Dist: frictionless (>=5.18.1,<6.0.0)
Requires-Dist: requests (>=2.32.4,<3.0.0)
Requires-Dist: sqlalchemy (<2)
Requires-Dist: tqdm (>=4.67.1,<5.0.0)
Description-Content-Type: text/markdown

# CFDE C2M2 Utilities

A collection of utilities for simplifying the C2M2 submission process. If you prepare your submission with these utilities, you do not need to run the prepare_C2M2_submission.py script or download the CV reference files manually.

**Init:** Initializes a fresh C2M2 submission in the current working directory, creating blank versions of all tables defined in the current C2M2 datapackage schema (C2M2_datapackage.json). 

**Prepare:** Resolves ontology identifiers and populates the Common Vocabulary (CV) tables.

**Validate:** Checks validity of C2M2 submission and highlights tables for which corrections, if any, are needed. 

**Package:** Collects metadata tables in a zip file to be submitted to the DRC portal.

**Submit:** Submits C2M2 datapackage to DRC portal (coming soon)

## Setup

### Using pipx
```bash
# installation
pipx install cfde-c2m2
# upgrade
pipx upgrade cfde-c2m2
```

### Using uv

```bash
# installation
uv tool install cfde-c2m2
# upgrade
uv tool upgrade cfde-c2m2
```

## Usage

```bash
# create an empty c2m2 submission OR update your existing submission directory
cfde-c2m2 init

# fill in your tables however you like

# finish preparing your package by resolving iris
cfde-c2m2 prepare

# verify integrity of your package
cfde-c2m2 validate

# zip the necessary files for a bare minimum package (opt for a useful name for your team)
cfde-c2m2 package -o 2026_03_C2M2.zip

# Coming Soon: submit to DRC portal
cfde-c2m2 submit 2026_03_C2M2.zip
```

