Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/maintainers_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ This project uses [mypy](https://mypy.readthedocs.io/en/stable/index.html) to ch
./scripts/run_mypy.sh
```

To clean your virtual environment (useful when testing scripts in isolation):

```sh
./scripts/uninstall_all.sh
```

> **Note**: Several scripts support a `--no-install` flag to prevent redundant dependency installation when scripts call other scripts internally.

#### Develop Locally

If you want to test the package locally you can.
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,8 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/

# LLM
.claude/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 note: Hoping we can soon find shared permissions as projects gain momentum!

Copy link
Contributor Author

@WilliamBergamin WilliamBergamin Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yess I've been looking into the agents.md open standard but claude does not support it out of the box 😞

We would need to add it as a skill or rule

I also found that telling LLMs to use the maintainers guide to run unit tests seems to work most of the time, so maybe we can make that our standard

.cursor/

File renamed without changes.
27 changes: 0 additions & 27 deletions scripts/_utils.sh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⭐ praise: Farewell utils!

This file was deleted.

14 changes: 10 additions & 4 deletions scripts/build_pypi_package.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
#!/bin/bash
source ./scripts/_utils.sh
script_dir=$(dirname $0)
cd ${script_dir}/..

set_prj_as_cwd
# Clean previous builds
rm -rf dist/ build/ slack_cli_hooks.egg-info/

clean_project
# Install build dependencies unless --no-install is specified
if [[ "$1" != "--no-install" ]]; then
pip install -r requirements/build.txt
fi

build
# Build package
python -m build && twine check dist/*
10 changes: 4 additions & 6 deletions scripts/deploy_to_test_pypi.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
#!/bin/bash
source ./scripts/_utils.sh
script_dir=$(dirname $0)
cd ${script_dir}/..

set_prj_as_cwd

clean_project

build
./scripts/build_pypi_package.sh

# Upload to test PyPI
twine upload --repository testpypi dist/*
14 changes: 8 additions & 6 deletions scripts/format.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/bin/bash
source ./scripts/_utils.sh
script_dir=$(dirname $0)
cd ${script_dir}/..

set_prj_as_cwd
# Install dependencies unless --no-install is specified
if [[ "$1" != "--no-install" ]]; then
pip install -U pip
pip install -r requirements/dev-tools.txt
fi

pip install -U pip
pip install -r requirements/format.txt

format
black slack_cli_hooks/ tests/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐶 question(non-blocking): We're still leaning toward ruff going forward, right? So outside the scope of this PR but I find it impressive!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yess definitely still leaning towards ruff 💯
But as you mentioned I think changing the formatter would of been outside the scope of this PR

10 changes: 6 additions & 4 deletions scripts/install.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
source ./scripts/_utils.sh
script_dir=$(dirname $0)
cd ${script_dir}/..

set_prj_as_cwd

install_development_requirements
pip install -U pip
pip install -e .
pip install -r requirements/testing.txt
pip install -r requirements/dev-tools.txt
22 changes: 11 additions & 11 deletions scripts/install_and_run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
# all: ./scripts/install_and_run_tests.sh
# single: ./scripts/install_and_run_tests.sh tests/scenario_tests/test_app.py

test_target="$1"
source ./scripts/_utils.sh

set_prj_as_cwd
script_dir=$(dirname $0)
cd ${script_dir}/..

install_development_requirements
test_target="$1"

format
./scripts/install.sh
./scripts/format.sh --no-install
./scripts/lint.sh --no-install

if [[ $test_target != "" ]]
then
pytest -vv $1
# Run tests
if [[ $test_target != "" ]]; then
pytest -vv $test_target
else
pytest && \
mypy --config-file pyproject.toml
pytest
./scripts/run_mypy.sh --no-install
fi
15 changes: 8 additions & 7 deletions scripts/lint.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/bin/bash

source ./scripts/_utils.sh

set_prj_as_cwd

pip install -U pip
pip install -r requirements/format.txt
script_dir=$(dirname $0)
cd ${script_dir}/..

# Install dependencies unless --no-install is specified
if [[ "$1" != "--no-install" ]]; then
pip install -U pip
pip install -r requirements/dev-tools.txt
fi

flake8 slack_cli_hooks/ && flake8 tests/
11 changes: 6 additions & 5 deletions scripts/run_mypy.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/bin/bash
script_dir=$(dirname $0)
cd ${script_dir}/..

source ./scripts/_utils.sh

set_prj_as_cwd

install_development_requirements
# Install dependencies unless --no-install is specified
if [[ "$1" != "--no-install" ]]; then
./scripts/install.sh
fi

mypy --config-file pyproject.toml
14 changes: 7 additions & 7 deletions scripts/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
# all: ./scripts/run_tests.sh
# single: ./scripts/run_tests.sh tests/scenario_tests/test_app.py

test_target="$1"
source ./scripts/_utils.sh
script_dir=$(dirname $0)
cd ${script_dir}/..

set_prj_as_cwd
test_target="$1"

format
./scripts/format.sh --no-install

if [[ $test_target != "" ]]
then
pytest -vv $1
# Run tests
if [[ $test_target != "" ]]; then
pytest -vv $test_target
else
pytest
fi
9 changes: 7 additions & 2 deletions scripts/uninstall_all.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/bin/bash

pip uninstall -y slack-cli-hooks && \
pip freeze | grep -v "^-e" | xargs pip uninstall -y
pip uninstall -y slack-cli-hooks

PACKAGES=$(pip freeze | grep -v "^-e" | sed 's/@.*//' | sed 's/\=\=.*//')

for package in $PACKAGES; do
pip uninstall -y $package
done