File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,6 +63,47 @@ Below is an example `/slack.json` file that overrides the default `start`:
6363}
6464```
6565
66+ ## Development Scripts
67+
68+ ### Quick Reference
69+
70+ ``` bash
71+ # Run tests with installation and formatting
72+ ./scripts/install_and_run_tests.sh
73+
74+ # Run tests with formatting (no install)
75+ ./scripts/run_tests.sh
76+
77+ # Run single test file
78+ ./scripts/run_tests.sh tests/scenario_tests/test_app.py
79+
80+ # Format code
81+ ./scripts/format.sh
82+
83+ # Lint code (format check + flake8)
84+ ./scripts/lint.sh
85+
86+ # Type check
87+ ./scripts/run_mypy.sh
88+
89+ # Install dependencies
90+ ./scripts/install.sh
91+
92+ # Build package
93+ ./scripts/build_pypi_package.sh
94+ ```
95+
96+ ### Script Options
97+
98+ Most scripts support ` --no-install ` flag to skip dependency installation:
99+ ``` bash
100+ ./scripts/format.sh --no-install
101+ ./scripts/lint.sh --no-install
102+ ./scripts/run_mypy.sh --no-install
103+ ```
104+
105+ This is useful in CI or when dependencies are already installed.
106+
66107## Contributing
67108
68109Contributions are always welcome! Please review the
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11#! /bin/bash
2- source ./scripts/_utils.sh
32
4- set_prj_as_cwd
3+ script_dir=$( dirname $0 )
4+ cd ${script_dir} /..
55
6- clean_project
6+ rm -rf dist/ build/ slack_cli_hooks.egg-info/
77
8- build
8+ pip install -r requirements/build.txt && \
9+ python -m build && \
10+ twine check dist/*
Original file line number Diff line number Diff line change 11#! /bin/bash
2- source ./scripts/_utils.sh
32
4- set_prj_as_cwd
3+ script_dir=$( dirname $0 )
4+ cd ${script_dir} /..
55
6- clean_project
6+ rm -rf dist/ build/ slack_cli_hooks.egg-info/
77
8- build
8+ pip install -r requirements/build.txt && \
9+ python -m build && \
10+ twine check dist/*
911
1012twine upload --repository testpypi dist/*
Original file line number Diff line number Diff line change 11#! /bin/bash
2- source ./scripts/_utils .sh
2+ # ./scripts/format .sh [--no-install]
33
4- set_prj_as_cwd
4+ script_dir=$( dirname $0 )
5+ cd ${script_dir} /..
56
6- pip install -U pip
7- pip install -r requirements/format.txt
7+ if [[ " $1 " != " --no-install" ]]; then
8+ export PIP_REQUIRE_VIRTUALENV=1
9+ pip install -U pip
10+ pip install -U -r requirements/format.txt
11+ fi
812
9- format
13+ black slack_cli_hooks/ tests/
Original file line number Diff line number Diff line change 11#! /bin/bash
2- source ./scripts/_utils.sh
32
4- set_prj_as_cwd
3+ script_dir=$( dirname $0 )
4+ cd ${script_dir} /..
55
6- install_development_requirements
6+ export PIP_REQUIRE_VIRTUALENV=1
7+ pip install -U pip
8+ pip install -e .
9+ pip install -r requirements/testing.txt
10+ pip install -r requirements/format.txt
Original file line number Diff line number Diff line change 11#! /bin/bash
2+ # Run all the tests or a single test with installation
23# all: ./scripts/install_and_run_tests.sh
34# single: ./scripts/install_and_run_tests.sh tests/scenario_tests/test_app.py
45
5- test_target=" $1 "
6- source ./scripts/_utils.sh
7-
8- set_prj_as_cwd
6+ script_dir=$( dirname $0 )
7+ cd ${script_dir} /..
98
10- install_development_requirements
9+ test_target= " $1 "
1110
12- format
11+ ./scripts/install.sh
1312
1413if [[ $test_target != " " ]]
1514then
16- pytest -vv $1
15+ ./scripts/format.sh --no-install
16+ pytest -vv $test_target
1717else
18- pytest && \
19- mypy --config-file pyproject.toml
18+ ./scripts/format.sh --no-install
19+ ./scripts/lint.sh --no-install
20+ pytest
2021fi
Original file line number Diff line number Diff line change 11#! /bin/bash
2+ # ./scripts/lint.sh [--no-install]
23
3- source ./scripts/_utils.sh
4+ script_dir=$( dirname $0 )
5+ cd ${script_dir} /..
46
5- set_prj_as_cwd
6-
7- pip install -U pip
8- pip install -r requirements/format.txt
7+ if [[ " $1 " != " --no-install " ]] ; then
8+ pip install -U pip
9+ pip install -U -r requirements/format.txt
10+ fi
911
12+ black --check slack_cli_hooks/ tests/
1013flake8 slack_cli_hooks/ && flake8 tests/
Original file line number Diff line number Diff line change 11#! /bin/bash
2+ # ./scripts/run_mypy.sh [--no-install]
23
3- source ./scripts/_utils.sh
4+ script_dir=$( dirname $0 )
5+ cd ${script_dir} /..
46
5- set_prj_as_cwd
6-
7- install_development_requirements
7+ if [[ " $1 " != " --no-install " ]] ; then
8+ ./scripts/install.sh
9+ fi
810
911mypy --config-file pyproject.toml
Original file line number Diff line number Diff line change 11#! /bin/bash
2+ # Run all the tests or a single test
23# all: ./scripts/run_tests.sh
34# single: ./scripts/run_tests.sh tests/scenario_tests/test_app.py
45
5- test_target= " $1 "
6- source ./scripts/_utils.sh
6+ script_dir= $( dirname $0 )
7+ cd ${script_dir} /..
78
8- set_prj_as_cwd
9+ test_target= " $1 "
910
10- format
11+ ./scripts/ format.sh --no-install
1112
1213if [[ $test_target != " " ]]
1314then
14- pytest -vv $1
15+ pytest -vv $test_target
1516else
1617 pytest
1718fi
You can’t perform that action at this time.
0 commit comments