Skip to content

seedcase-project/spaid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spaid: Seedcase Project aid — a toolkit for developing Seedcase

Installation

Clone this repo to somewhere on your computer. Then open a terminal in the newly created folder and run:

just install

After that is finished, check to make sure that the ~/.local/bin folder is on your execution path (so your Terminal can find the installed commands) by running the below code, which should give the output below:

echo $PATH | grep -o "\.local/bin" | uniq
.local/bin

Then you don’t need to do anything else. If you don’t see that folder, find your ~/.zshrc, open it in a text editor, and add this line to that file:

export PATH=$HOME/.local/bin:$PATH

Close your terminal and re-run the echo code above to check that it worked.

If it worked and you now see the folder, you have installed the spaid helper functions!

Commands

spaid_lint_commits_on_branch -h

Usage: spaid_lint_commits_on_branch [-h]

Run this command on a development Git branch to check if commit messages follow the Conventional Commit standard. This will only work if:

  • you are in a local Git repository
  • the repository is a Python project managed by Poetry
  • the Poetry project has commitizen installed
  • you are on a branch that isn’t main

Otherwise, you’ll get an error or nothing will happen.

spaid_setup_dev_workspace -h

Usage: spaid_setup_dev_workspace [-h]

Run this command to either setup up or update your development workspace to have any helper packages or tools installed and configured. These are the actions it does currently:

  • Installs Python package dependencies (if in a Poetry project)
  • Installs pre-commit hooks
  • Runs pre-commit hooks on all the files

This command only works if:

  • you are in a local Git repository
  • the repository has a file called ‘.pre-commit-config.yaml’
spaid_create_python_files -h

Usage: spaid_create_python_files [-h]

Run this script to create a new function file with the corresponding test file.

Example:

$ spaid_create_python_files seedcase_sprout core properties
Created:
./seedcase_sprout/core/properties.py
./tests/core/test_properties.py

Positional arguments:

  • module: The folder of the module you want to create the new function in.
  • submodule: The folder of the submodule or part, e.g. core vs cli, that you want to create the new function in.
  • name: The name of the function you want to create.

Pull requests

spaid_pr_list -h

Usage: spaid_pr_list [-h]

Lists all open PRs in an organization.

Examples: $ spaid_pr_list seedcase-project

Positional argument:

  • org: The name of the GitHub organization.
spaid_pr_merge_rebase -h

Usage: spaid_pr_merge_rebase [-h]

Doa merge rebase on multiple PRs in a single repository. Requires admin privilege, so not everyone can use this command.

Examples:

# Do merge rebase on (fake) PRs 1, 2, and 3.
$ spaid_pr_merge_rebase seedcase-project seedcase-theme 1 2 3

Positional arguments:

  • org: The name of the GitHub organization.
  • repo: The name of the repository in the GitHub organization.
  • PR number(s): One or more PR numbers to do the merge rebase for.

GitHub organization management

spaid_gh_org_invite -h
Usage: spaid_gh_org_invite [-h]

Invite a GitHub user to a GitHub organization.

Example:

    $ spaid_gh_org_invite seedcase-project lwjohnst86

Positional arguments:

1. organization: The GitHub organization name.
2. username: The GitHub username of the person you want to invite.
spaid_gh_teams_list -h
Usage: spaid_gh_teams_list [-h]

Run this script to get a list of teams (their 'slug', not the human-readable
name) within a specific organization.

Example:

    $ spaid_gh_list_teams seedcase-project
    admin
    developers

Positional arguments:

1. organization: The GitHub organization name.
spaid_gh_teams_invite -h
Usage: spaid_gh_teams_invite [-h]

Add a GitHub user to a team in a GitHub organization.

Example:

    $ spaid_gh_teams_invite seedcase-project admin lwjohnst86

Positional arguments:

1. organization: The GitHub organization name.
2. team_slug: The GitHub organization team 'slug' name.
3. username: The GitHub username of the person you want to invite.

About

A toolkit for developing Seedcase projects.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •