Metadata-Version: 2.4
Name: migration-core
Version: 0.1.0rc1
Summary: Shared library for the N8 Group migration product family
Project-URL: Homepage, https://github.com/n8group-oss/migration-core
Project-URL: Repository, https://github.com/n8group-oss/migration-core
Project-URL: Issues, https://github.com/n8group-oss/migration-core/issues
Project-URL: Changelog, https://github.com/n8group-oss/migration-core/releases
Author-email: N8 Group <contact@n8-group.com>
License-Expression: BUSL-1.1
License-File: LICENSE
Keywords: azure-devops,bitbucket,github,migration
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: httpx>=0.27.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: structlog>=24.0.0
Provides-Extra: dev
Requires-Dist: build>=1.2.2; extra == 'dev'
Requires-Dist: mypy>=1.9.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.24.0; extra == 'dev'
Requires-Dist: pytest-cov>=5.0.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: respx>=0.22.0; extra == 'dev'
Requires-Dist: ruff>=0.3.0; extra == 'dev'
Provides-Extra: github-app
Requires-Dist: pyjwt[crypto]>=2.8.0; extra == 'github-app'
Description-Content-Type: text/markdown

# migration-core

Shared Python library for the N8 Group migration product family.

`migration-core` packages the GitHub-side adapters, shared target models, exception hierarchy, and identity helpers used by migration tools such as `bb2gh` and `ado2gh`.

## What This Package Includes

- GitHub target adapter abstractions and implementations under `migration_core.adapters`
- Shared GitHub-facing data models under `migration_core.models`
- Shared exception types under `migration_core.exceptions`
- Enterprise identity helpers and clients under `migration_core.identity`
- Supporting architecture and specification docs in `docs/` and `.specify/`

This repository is a library package. It does not currently ship a standalone CLI.

## Installation

Install the base package from a package index:

```bash
python -m pip install migration-core
```

Install with GitHub App authentication support:

```bash
python -m pip install "migration-core[github-app]"
```

Install from source for local development and release verification:

```bash
python -m pip install -e ".[dev,github-app]"
```

## Optional Extras

- `github-app` - adds `pyjwt[crypto]` for GitHub App JWT generation used by the multi-app adapter flow
- `dev` - adds local quality and packaging tools, including `pytest`, `ruff`, `mypy`, and `build`

## Local Verification

After installing the development extras, run:

```bash
python -m build
python -m pytest -v
ruff check src tests
mypy src
```

## Current Module Surface

Top-level package exports:

```python
from migration_core import __version__
from migration_core.adapters import SourceAdapter, TargetAdapter
from migration_core.adapters.github import (
    GitHubAppConfig,
    GitHubBaseAdapter,
    GitHubCloudAdapter,
    GitHubCloudDRAdapter,
    GitHubServerAdapter,
    MultiAppGitHubAdapter,
)
from migration_core.exceptions import APIError, MigrationError
from migration_core.models import GitHubRulesetConfig, Repository, User
```

Additional identity clients are available as submodules:

```python
from migration_core.identity.github_saml import GitHubSAMLClient
from migration_core.identity.github_scim import GitHubSCIMClient
```

## Repository Layout

- `src/migration_core/` - package source
- `tests/` - unit and integration tests
- `docs/architecture/` - architecture reference docs
- `.specify/` - shared specification kit assets used by product repos

## License

Licensed under the Business Source License 1.1. See `LICENSE`.
