Skip to content

Commit

Permalink
Remove unimplemented commands & update some docs
Browse files Browse the repository at this point in the history
  • Loading branch information
cnpryer committed Mar 27, 2023
1 parent f3edebb commit 04d9613
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 81 deletions.
53 changes: 18 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,8 @@ A Python package manager written in Rust. The [Cargo](https://github.com/rust-la
Huak aims to support a base workflow for developing Python packages and projects. The process is linear and purpose oriented, establishing better familiarization with the steps.

```mermaid
graph LR
A[Workflow Startup] --> B[Project Change]
B --> C[Project Test]
C --> D[Project Distribution]
```

See the [design doc](/docs/design_doc.md) for more workflow details.

The goal is to create an opinionated tool to support a reliably inviting onboarding experience for the Python ecosystem, that feels responsive and snappy to use.

### Project Status

See **[the milestone list](https://github.com/cnpryer/huak/milestones)** to check the status of this project at any point in time.

## README Contents

- [Installation](#installation)
Expand All @@ -60,37 +47,33 @@ A Python package manager written in Rust inspired by Cargo.
Usage: huak [OPTIONS] <COMMAND>

Commands:
activate Activate the project's virtual environment*
add Add dependencies to the project
audit Check for vulnerable dependencies and license compatibility*
build Build tarball and wheel for the project
config Interact with the configuration of huak
clean Remove tarball and wheel from the built project
doc Generates documentation for the project*
fix Auto-fix fixable lint conflicts
fmt Format the project's Python code
init Initialize the existing project
install Install the dependencies of an existing project
lint Lint the project's Python code
new Create a new project at <path>
publish Builds and uploads current project to a registry
remove Remove dependencies from the project
run Run a command within the project's environment context
test Test the project's Python code
update Update dependencies added to the project*
version Display the version of the project
help Print this message or the help of the given subcommand(s)
add Add dependencies to the project
build Build tarball and wheel for the project
config Interact with the configuration of huak
clean Remove tarball and wheel from the built project
fix Auto-fix fixable lint conflicts
fmt Format the project's Python code
init Initialize the existing project
install Install the dependencies of an existing project
lint Lint the project's Python code
new Create a new project at <path>
publish Builds and uploads current project to a registry
remove Remove dependencies from the project
run Run a command within the project's environment context
test Test the project's Python code
version Display the version of the project
help Print this message or the help of the given subcommand(s)

Options:
-q, --quiet
-h, --help Print help
-V, --version Print version
```
$\textcolor{red}{\textsf{* indicates first-pass of implementation is incomplete.}}$

## Documentation

More documentation can be found [here](./docs/user_guide.md).
- [User Guide](./docs/user_guide.md)
- [Development](/docs/development.md)

## Goals

Expand Down
31 changes: 11 additions & 20 deletions docs/design_doc.md → docs/development.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
# Architecture
# Contents

This document is constantly changing while Huak is fresh.

As I become more comfortable with Rust and knowledgeable of the packaging domain, I'll flesh out the general design for Huak more concretely. Until then, I want to leave its design open to influence.

- [Design](#design)
- [Project Workflows](#linear-project-workflows)
- Huak's Design
- [Contributing](#contributing)
- [Project Workflows](#project-workflows)
- [The Code](#the-code)

## Design
## Contributing

Currently, this only covers high level influence for design of the project.
See [CONTRIBUTING.md](/docs/CONTRIBUTING.md).

### Linear project workflows
## Project workflows

Huak enables and supports a standard *process of developing*. This process is linear. Iteration happens in sequential steps.

Expand All @@ -25,23 +20,23 @@ graph LR
D --> E[Project Distribution]
```

#### 1. Project Bootstrap
### 1. Project Bootstrap

Quick and easy initialization of a project with opinions on topics like structure and configuration.

#### 2. Project Setup
### 2. Project Setup

Adding dependencies, various metadata, etc. The setup phase is vague but prepares the project for the following steps.

#### 3. Project Change
### 3. Project Change

A change is made to the project.

#### 3. Project Test
### 3. Project Test

The project is evaluated in some form.

#### 4. Project Distribution
### 4. Project Distribution

The project is distributed for use. This can be publishing to a registry or simply using it locally and executing within its context.

Expand All @@ -63,7 +58,3 @@ src
├── ops # Library operation logic
└── sys # Library system implementations
```

## Contributing

See [CONTRIBUTING.md](/docs/CONTRIBUTING.md).
26 changes: 0 additions & 26 deletions src/bin/huak/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ pub struct Cli {
#[derive(Subcommand)]
#[clap(rename_all = "kebab-case")]
pub enum Commands {
/// Activate the project's virtual environment*.
Activate,
/// Add dependencies to the project.
Add {
#[arg(num_args = 1.., required = true)]
Expand All @@ -41,8 +39,6 @@ pub enum Commands {
#[arg(last = true)]
trailing: Option<Vec<String>>,
},
/// Check for vulnerable dependencies and license compatibility*.
Audit,
/// Build tarball and wheel for the project.
Build {
/// Pass trailing arguments with `--`.
Expand All @@ -63,11 +59,6 @@ pub enum Commands {
/// Remove all __pycache__ directories.
include_pycache: bool,
},
/// Generates documentation for the project*.
Doc {
#[arg(long)]
check: bool,
},
/// Auto-fix fixable lint conflicts
Fix {
/// Pass trailing arguments with `--`.
Expand Down Expand Up @@ -155,11 +146,6 @@ pub enum Commands {
#[arg(last = true)]
trailing: Option<Vec<String>>,
},
/// Update dependencies added to the project*.
Update {
#[arg(default_value = "*")]
dependency: String,
},
/// Display the version of the project.
Version,
}
Expand All @@ -179,9 +165,6 @@ impl Cli {
};
match self.command {
Commands::Config { command } => config(command),
Commands::Activate => {
Err(HuakError::UnimplementedError("activate".to_string()))
}
Commands::Add {
dependencies,
group,
Expand All @@ -191,9 +174,6 @@ impl Cli {
Some(InstallerOptions { args: trailing });
add(dependencies, group, operation_config)
}
Commands::Audit => {
Err(HuakError::UnimplementedError("audit".to_string()))
}
Commands::Build { trailing } => {
operation_config.build_options =
Some(BuildOptions { args: trailing });
Expand All @@ -210,9 +190,6 @@ impl Cli {
operation_config.clean_options = Some(options);
clean(operation_config)
}
Commands::Doc { check: _ } => {
Err(HuakError::UnimplementedError("doc".to_string()))
}
Commands::Fix { trailing } => {
operation_config.lint_options = Some(LintOptions {
args: trailing,
Expand Down Expand Up @@ -292,9 +269,6 @@ impl Cli {
Some(TestOptions { args: trailing });
test(operation_config)
}
Commands::Update { dependency: _ } => {
Err(HuakError::UnimplementedError("update".to_string()))
}
Commands::Version => version(operation_config),
}
.map_err(|e| Error::new(e, ExitCode::FAILURE))
Expand Down

0 comments on commit 04d9613

Please sign in to comment.