Skip to content

Commit

Permalink
Add rewrite foundation
Browse files Browse the repository at this point in the history
  • Loading branch information
cnpryer committed Mar 17, 2023
1 parent b95aea4 commit ce2e5a1
Show file tree
Hide file tree
Showing 78 changed files with 2,278 additions and 7,089 deletions.
1,776 changes: 0 additions & 1,776 deletions Cargo.lock

This file was deleted.

40 changes: 0 additions & 40 deletions Cargo.toml

This file was deleted.

1 change: 0 additions & 1 deletion resources/mock-project/.gitignore

This file was deleted.

Empty file.
16 changes: 0 additions & 16 deletions resources/mock-project/pyproject.toml

This file was deleted.

Empty file.
Empty file.
Empty file.
Binary file not shown.
Binary file not shown.
2 changes: 0 additions & 2 deletions resources/mock-project/tests/test_package.py

This file was deleted.

1 change: 0 additions & 1 deletion resources/readme

This file was deleted.

57 changes: 18 additions & 39 deletions src/bin/huak/commands/mod.rs → src/bin/huak/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,6 @@ use crate::errors::CliResult;

use clap::{Parser, Subcommand};

pub(crate) mod activate;
pub(crate) mod add;
pub(crate) mod audit;
pub(crate) mod build;
pub(crate) mod clean;
pub(crate) mod config;
pub(crate) mod doc;
pub(crate) mod fix;
pub(crate) mod fmt;
pub(crate) mod init;
pub(crate) mod install;
pub(crate) mod lint;
pub(crate) mod new;
pub(crate) mod publish;
pub(crate) mod remove;
pub(crate) mod run;
pub(crate) mod test;
pub(crate) mod update;
pub(crate) mod version;

// Main CLI struct.

/// A Python package manager written in Rust inspired by Cargo.
#[derive(Parser)]
Expand Down Expand Up @@ -135,36 +114,36 @@ pub enum Commands {
impl Cli {
pub fn run(self) -> CliResult<()> {
match self.command {
Commands::Config { command } => config::run(command),
Commands::Activate => activate::run(),
Commands::Add { dependency, group } => add::run(dependency, group),
Commands::Audit => audit::run(),
Commands::Build => build::run(),
Commands::Clean { pycache } => clean::run(pycache),
Commands::Doc { check } => doc::run(check),
Commands::Config { command } => config(command),
Commands::Activate => activate(),
Commands::Add { dependency, group } => add(dependency, group),
Commands::Audit => audit(),
Commands::Build => build(),
Commands::Clean { pycache } => clean(pycache),
Commands::Doc { check } => doc(check),
Commands::Fix => fix::run(),
Commands::Fmt { check } => fmt::run(check),
Commands::Fmt { check } => fmt(check),
// --lib is the default, so it's unnecessary to handle. If --app is not passed, assume --lib.
#[allow(unused_variables)]
Commands::Init { app, lib } => init::run(app),
Commands::Install { groups } => install::run(groups),
Commands::Lint { fix } => lint::run(fix),
Commands::Init { app, lib } => init(app),
Commands::Install { groups } => install(groups),
Commands::Lint { fix } => lint(fix),
// --lib is the default, so it's unnecessary to handle. If --app is not passed, assume --lib.
#[allow(unused_variables)]
Commands::New {
path,
app,
lib,
no_vcs,
} => new::run(path, app, no_vcs),
Commands::Publish => publish::run(),
} => new(path, app, no_vcs),
Commands::Publish => publish(),
Commands::Remove { dependency, group } => {
remove::run(dependency, group)
remove(dependency, group)
}
Commands::Run { command } => run::run(command),
Commands::Test => test::run(),
Commands::Update { dependency } => update::run(dependency),
Commands::Version => version::run(),
Commands::Run { command } => run(command),
Commands::Test => test(),
Commands::Update { dependency } => update(dependency),
Commands::Version => version(),
}
}
}
20 changes: 0 additions & 20 deletions src/bin/huak/commands/activate.rs

This file was deleted.

36 changes: 0 additions & 36 deletions src/bin/huak/commands/add.rs

This file was deleted.

6 changes: 0 additions & 6 deletions src/bin/huak/commands/audit.rs

This file was deleted.

26 changes: 0 additions & 26 deletions src/bin/huak/commands/build.rs

This file was deleted.

23 changes: 0 additions & 23 deletions src/bin/huak/commands/clean.rs

This file was deleted.

91 changes: 0 additions & 91 deletions src/bin/huak/commands/clean_pycache.rs

This file was deleted.

Loading

0 comments on commit ce2e5a1

Please sign in to comment.