Skip to content

Commit 6a83f15

Browse files
authored
chore: Replaced requirements.txt with Pipfiles (#104)
* chore: Replaced requirements.txt with Pipfiles * fix: test pipenv pytest workflow step * fix: Dockerfile pipenv cmd
1 parent c24e623 commit 6a83f15

File tree

12 files changed

+923
-41
lines changed

12 files changed

+923
-41
lines changed

.devcontainer/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
FROM python:3.13-alpine
22

33
# Update pip and install dependencies and tools
4-
RUN pip install --upgrade pip \
5-
&& apk update && \
4+
RUN pip install --upgrade pip && \
5+
pip install pipenv && \
6+
apk update && \
67
apk add --no-cache \
78
make \
89
git

.github/workflows/master.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ jobs:
2626

2727
- name: Install dependencies
2828
run: |
29-
pip install -r requirements.txt
30-
pip install -r tests/requirements.txt
29+
pip install pipenv
30+
pipenv install --dev
3131
3232
- name: Test
33-
run: pytest -v --cov=./ --cov-report xml
33+
run: pipenv run pytest -v --cov=./ --cov-report xml
3434

3535
- name: Fix code coverage path
3636
working-directory: ./

.github/workflows/re-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ jobs:
2727

2828
- name: Install dependencies
2929
run: |
30-
pip install -r requirements.txt
31-
pip install -r tests/requirements.txt
30+
pip install pipenv
31+
pipenv install --dev
3232
3333
- name: Test
34-
run: pytest
34+
run: pipenv run pytest
3535

3636
docker:
3737
name: Publish Docker Image

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ jobs:
2222

2323
- name: Install dependencies
2424
run: |
25-
pip install -r requirements.txt
26-
pip install -r tests/requirements.txt
25+
pip install pipenv
26+
pipenv install --dev
2727
2828
- name: Test
29-
run: pytest
29+
run: pipenv run pytest
3030

3131
docker:
3232
name: Publish Docker Image

Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ ENV APP_HOME=/home/app
44
RUN addgroup -S app \
55
&& adduser -S app -G app
66

7-
COPY requirements.txt $APP_HOME
7+
COPY Pipfile Pipfile.lock $APP_HOME
88

99
WORKDIR $APP_HOME
1010

1111
RUN pip install --upgrade pip && \
12-
pip install --no-cache-dir -r requirements.txt
12+
pip install pipenv && \
13+
pipenv install --deploy --system --ignore-pipfile && \
14+
pip uninstall -y pipenv
1315

1416
COPY /src .
1517

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
.PHONY: install install-test run test cover
1+
.PHONY: install run test cover
22

33
install:
4-
pip install -r requirements.txt
5-
6-
install-test:
7-
pip install -r tests/requirements.txt
4+
pipenv install --dev
85

96
run:
107
python src/app.py
118

9+
gunicorn:
10+
gunicorn --bind 0.0.0.0:5000 --chdir ./src/ app:slack_app
11+
1212
test:
1313
pytest -v --cov=./src --cov-report xml
1414

Pipfile

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
[[source]]
2+
url = "https://pypi.org/simple"
3+
verify_ssl = true
4+
name = "pypi"
5+
6+
[packages]
7+
slack-bolt = "==1.23.0"
8+
python-dotenv = "==1.1.0"
9+
gunicorn = "==23.0.0"
10+
flask = "==3.1.1"
11+
requests = "==2.32.3"
12+
pyjwt = "==2.10.1"
13+
gql = "==3.5.3"
14+
requests-toolbelt = "==1.0.0"
15+
certifi = ">=2025.4.26"
16+
werkzeug = ">=3.1.3"
17+
urllib3 = ">=2.4.0"
18+
jinja2 = ">=3.1.6"
19+
idna = ">=3.10"
20+
anyio = ">=4.9.0"
21+
zipp = ">=3.21.0"
22+
23+
[dev-packages]
24+
pytest = "==8.4.0"
25+
pytest-cov = "==6.1.1"
26+
pytest-dotenv = "==0.5.2"
27+
28+
[requires]
29+
python_version = "3.13"

Pipfile.lock

Lines changed: 868 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ A summary message containing all details about the change will be sent to a spec
4444

4545
## Requirements
4646
- Python 3.13
47-
- VirtualEnv
47+
- VirtualEnv - `pip install virtualenv`
48+
- Pipenv - `pip install pipenv`
4849
- Ngrok (Slack Apps requires HTTPS endpoint)
4950

5051
## Create Slack App

docker-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ version: '3.8'
1111

1212
services:
1313
switcherslackapp:
14-
image: trackerforce/switcher-slack-app:latest
14+
image: trackerforce/switcher-slack-app:dev
1515
container_name: switcherslackapp
16-
command: gunicorn --bind 0.0.0.0:5000 --chdir /home/app app:flask_app
16+
command: gunicorn --bind 0.0.0.0:5000 --chdir /home/app app:slack_app
1717
# TLS Enabled
1818
# command: [
1919
# "gunicorn",
2020
# "--certfile=/etc/certs/[replace].crt", "--keyfile=/etc/certs/[replace].key",
2121
# "--bind", "0.0.0.0:5000",
22-
# "--chdir", "/home/app", "app:flask_app"]
22+
# "--chdir", "/home/app", "app:slack_app"]
2323
ports:
2424
- 5000:5000
2525
environment:

0 commit comments

Comments
 (0)