A powerful, Git-based migration framework for NADOO Framework projects. This tool helps you:
- Migrate older NADOO Framework projects to newer versions
- Convert non-NADOO projects to NADOO Framework projects
- Manage dependencies in NADOO Framework projects
You can install the NADOO Migration Framework using pip:
pip install nadoo-migration-framework
Or using Poetry:
poetry add nadoo-migration-framework
After installation, the following commands will be available globally in your terminal:
nadoo
- Main command with all subcommandsnadoo-init
- Quick command to create new projectsnadoo-migrate
- Quick command to run migrationsnadoo-add
- Quick command to add packages
Create a new NADOO Framework project:
# Using the main command
nadoo init my-project
# Or using the quick command
nadoo-init my-project
# Specify a custom path
nadoo init my-project --path /path/to/projects
To migrate a project to the latest NADOO Framework version:
# In your project directory
nadoo migrate
# Or using the quick command
nadoo-migrate
# Specify a project path
nadoo migrate /path/to/project
# Force migration even if checks fail
nadoo migrate --force
The migration tool will:
- Analyze your project structure
- Detect if it's a NADOO Framework project or not
- Determine required migrations
- Apply migrations with Git-based version control
To add a package to your NADOO Framework project:
# Using the main command
nadoo add package-name
# Or using the quick command
nadoo-add package-name
# Add as development dependency
nadoo add package-name --dev
This will:
- Add the package to your project's dependencies
- Update your project configuration
- Install the package using your package manager
- Install the package:
pip install nadoo-migration-framework
- Create
.github/workflows/nadoo-check.yml
in your project:
name: NADOO Framework Check
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
schedule:
- cron: '0 0 * * *' # Daily check
jobs:
check-nadoo-compatibility:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install NADOO Migration Framework
run: |
python -m pip install --upgrade pip
pip install nadoo-migration-framework
- name: Check NADOO Framework Compatibility
id: check
continue-on-error: true
run: |
nadoo check --json > nadoo-check.json
That's it! The workflow will now:
- Check your project daily for NADOO compatibility
- Create issues if migration is needed
- Automatically create PRs with migration changes
- Keep your project up to date with the latest NADOO standards
-
If your project needs migration:
- An issue will be created explaining what needs to be changed
- A PR will be created with automatic migrations
- You can review and merge the changes
-
If your project is compatible:
- The check will pass silently
- You'll be notified of any new updates
-
If migration fails:
- An issue will be created with details
- You can run
nadoo migrate --debug
locally to investigate
The main command with all functionality:
nadoo [COMMAND] [OPTIONS]
Commands:
init Create a new NADOO Framework project
migrate Migrate a project to the latest version
add Add a package to the project
Standalone commands for common operations:
-
nadoo-init
: Create new projectsnadoo-init PROJECT_NAME [--path PATH]
-
nadoo-migrate
: Run migrationsnadoo-migrate [PROJECT_PATH] [--force]
-
nadoo-add
: Add packagesnadoo-add PACKAGE_NAME [--dev]
- Intelligent Project Analysis: Automatically detects project type and structure
- Git Integration: All migrations are tracked with Git commits
- Safe Migrations: Automatic rollback on failure
- Package Management: Integrated with NADOO Framework package management
- Extensible: Easy to add new migration strategies
- Global Commands: Quick access to common operations
To contribute to the NADOO Migration Framework:
- Clone the repository:
git clone https://github.com/NADOOIT/nadoo-migration-framework.git
cd nadoo-migration-framework
- Install dependencies:
poetry install
- Run tests:
poetry run pytest
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.