Skip to content

Commit

Permalink
docs: update contributing instructions and add help command to makefi…
Browse files Browse the repository at this point in the history
…le (#249)
  • Loading branch information
tdstein authored Jul 30, 2024
1 parent 046ace7 commit 7471a26
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 11 deletions.
21 changes: 11 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,28 @@ Before contributing to the `posit-sdk`, ensure that the following prerequisites
> [!WARNING]
> Executing `make` will utilize `pip` to install third-party packages in your activated Python environment. Please review the [`Makefile`](./Makefile) to verify behavior before executing any commands.
1. Fork the repository and clone it to your local machine.
1. Create a new branch for your feature or bug fix.
1. Run `make` to run the default development workflow.
1. Make your changes and test them thoroughly using `make test`
1. Run `make fmt` and `make lint` to verify adherence to the project style guide.
1. Commit your changes and push them to your forked repository.
1. Submit a pull request to the main repository.
1. Fork the repository and open it in your development environment.
2. Run `make` to run the default development workflow.
3. Make your changes and test them thoroughly using `make test`
4. Run `make fmt` and `make lint` to verify adherence to the project style guide.
5. Commit your changes and push them to your forked repository.
6. Submit a pull request to the main repository.

## Tooling

Use the default make target to execute the full build pipeline. For details on specific targets, refer to the [Makefile](./Makefile).

## Style Guide

We use [Ruff](https://docs.astral.sh/ruff/) for linting and code formatting. All proposed changes must successfully pass the `make lint` rules prior to merging.
We use [Ruff](https://docs.astral.sh/ruff/) for linting and code formatting. Run `make deps` to install it.

Utilize `make fmt lint fix` to format and lint your changes.
All proposed changes must successfully pass the `make lint` rules prior to merging.

Utilize `make fmt lint` to format and lint your changes.

### (Optional) pre-commit

This project is configured for [pre-commit](https://pre-commit.com). Once enabled, a `git commit` hook is created, which invokes `make fmt lint fix`.
This project is configured for [pre-commit](https://pre-commit.com). Once enabled, a `git commit` hook is created, which invokes `make fmt lint`.

To enable pre-commit on your machine, run `pre-commit install`.

Expand Down
21 changes: 20 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ include vars.mk

.DEFAULT_GOAL := all

.PHONY: build clean cov default deps dev docs fmt fix install it lint test uninstall version
.PHONY: build clean cov default deps dev docs fmt fix install it lint test uninstall version help

all: deps dev test lint build

Expand Down Expand Up @@ -60,3 +60,22 @@ uninstall:

version:
@$(PYTHON) -m setuptools_scm

help:
@echo "Makefile Targets"
@echo " all Run deps, dev, test, lint, and build"
@echo " build Build the project"
@echo " clean Clean up project artifacts"
@echo " cov Generate a coverage report"
@echo " cov-html Generate an HTML coverage report and open it"
@echo " cov-xml Generate an XML coverage report"
@echo " deps Install dependencies"
@echo " dev Install the project in editable mode"
@echo " docs Build the documentation"
@echo " fmt Format the code"
@echo " install Install the built project"
@echo " it Run integration tests"
@echo " lint Lint the code"
@echo " test Run unit tests with coverage"
@echo " uninstall Uninstall the project"
@echo " version Display the project version"

0 comments on commit 7471a26

Please sign in to comment.