Skip to content

Commit 4200640

Browse files
authored
Rename infra/ to bin/ (#91)
* Rename infra/ to bin/ * Move local_dev.env in config/, since it's config * Do not gitignore hidden useless .isort * Lint YAML files only * Update paths in secrets baseline
1 parent 4e33881 commit 4200640

17 files changed

+28
-31
lines changed

.github/workflows/build-image.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
"$IMAGE_TAG" \
7272
"$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" \
7373
"$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" > ./version.json
74-
docker build --file infra/Dockerfile -t $GITHUB_REPOSITORY:$IMAGE_TAG .
74+
docker build --file Dockerfile -t $GITHUB_REPOSITORY:$IMAGE_TAG .
7575
docker image tag $GITHUB_REPOSITORY:$IMAGE_TAG $GITHUB_REPOSITORY:latest
7676
docker push $GITHUB_REPOSITORY:$IMAGE_TAG
7777
docker push $GITHUB_REPOSITORY:latest

.github/workflows/lint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ jobs:
1515
cache: "poetry"
1616
- name: Install dependencies
1717
run: poetry install
18-
- run: infra/lint.sh
18+
- run: bin/lint.sh

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ jobs:
1616
- name: Install dependencies
1717
run: poetry install
1818
- name: Run tests
19-
run: infra/test.sh
19+
run: bin/test.sh

.gitignore

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,5 @@ dmypy.json
128128
# Pyre type checker
129129
.pyre/
130130

131-
# iSort - Pre-Commit
132-
.isort.cfg
133-
134131
# Don't check in your own Env
135-
*local_dev.env
132+
/config/local_dev.env

.pre-commit-config.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,53 +12,53 @@ repos:
1212
'--indent', '4',
1313
'--no-sort-keys',
1414
]
15-
exclude: "infra/k8s/secret.json"
15+
exclude: "bin/k8s/secret.json"
1616
- id: trailing-whitespace
1717
- repo: local
1818
hooks:
1919
- id: pylint
2020
name: pylint
21-
entry: infra/lint.sh pylint
21+
entry: bin/lint.sh pylint
2222
language: script
2323
types: [python]
2424
- repo: local
2525
hooks:
2626
- id: mypy
2727
name: mypy
28-
entry: infra/lint.sh mypy
28+
entry: bin/lint.sh mypy
2929
language: script
3030
types: [python]
3131
- repo: local
3232
hooks:
3333
- id: bandit
3434
name: bandit
35-
entry: infra/lint.sh bandit
35+
entry: bin/lint.sh bandit
3636
language: script
3737
types: [python]
3838
- repo: local
3939
hooks:
4040
- id: detect-secrets
4141
name: detect-secrets
42-
entry: infra/lint.sh detect-secrets
42+
entry: bin/lint.sh detect-secrets
4343
language: script
4444
- repo: local
4545
hooks:
4646
- id: isort
4747
name: isort
48-
entry: infra/lint.sh isort
48+
entry: bin/lint.sh isort
4949
language: script
5050
types: [python]
5151
- repo: local
5252
hooks:
5353
- id: black
5454
name: black
55-
entry: infra/lint.sh black
55+
entry: bin/lint.sh black
5656
language: script
5757
types: [python]
5858
- repo: local
5959
hooks:
6060
- id: yamllint
6161
name: yamllint
62-
entry: infra/lint.sh yamllint
62+
entry: bin/lint.sh yamllint
6363
language: script
6464
types: [yaml]

.secrets.baseline

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,17 +109,17 @@
109109
"line_number": 152
110110
}
111111
],
112-
"infra/config/local_dev.env": [
112+
"config/local_dev.env": [
113113
{
114114
"type": "Secret Keyword",
115-
"filename": "infra/config/local_dev.env",
115+
"filename": "config/local_dev.env",
116116
"hashed_secret": "4b9a4ce92b6a01a4cd6ee1672d31c043f2ae79ab",
117117
"is_verified": false,
118118
"line_number": 5
119119
},
120120
{
121121
"type": "Secret Keyword",
122-
"filename": "infra/config/local_dev.env",
122+
"filename": "config/local_dev.env",
123123
"hashed_secret": "77ea6398f252999314d609a708842a49fc43e055",
124124
"is_verified": false,
125125
"line_number": 8

.yamllint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ extends: default
55
ignore: |
66
src/
77
tests/
8-
infra/
8+
bin/
99
.github/
1010
docker-compose.yaml
1111
.pre-commit-config.yaml

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ COPY --from=builder-base $POETRY_HOME $POETRY_HOME
6565
COPY --from=builder-base $PYSETUP_PATH $PYSETUP_PATH
6666

6767
# Copying in our entrypoint
68-
COPY --chown=app:app ./infra/docker-entrypoint.sh /docker-entrypoint.sh
68+
COPY --chown=app:app ./bin/docker-entrypoint.sh /docker-entrypoint.sh
6969
RUN chmod +x /docker-entrypoint.sh
7070

7171
# venv already has runtime deps installed we get a quicker install
@@ -88,9 +88,9 @@ ENV FASTAPI_ENV=production \
8888
PROMETHEUS_MULTIPROC=1
8989

9090
COPY --from=builder-base $VENV_PATH $VENV_PATH
91-
COPY ./infra/gunicorn_conf.py /gunicorn_conf.py
91+
COPY ./bin/gunicorn_conf.py /gunicorn_conf.py
9292

93-
COPY ./infra/docker-entrypoint.sh /docker-entrypoint.sh
93+
COPY ./bin/docker-entrypoint.sh /docker-entrypoint.sh
9494
RUN chmod +x /docker-entrypoint.sh
9595

9696
COPY . /app

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ build:
3131

3232
.PHONY: format
3333
format:
34-
infra/lint.sh black --fix
35-
infra/lint.sh isort --fix
34+
bin/lint.sh black --fix
35+
bin/lint.sh isort --fix
3636

3737
.PHONY: lint
3838
lint:
39-
docker-compose run --rm web infra/lint.sh
39+
docker-compose run --rm web bin/lint.sh
4040

4141
.PHONY: shell
4242
shell:
@@ -48,7 +48,7 @@ start:
4848

4949
.PHONY: test
5050
test:
51-
docker-compose run --rm web infra/test.sh
51+
docker-compose run --rm web bin/test.sh
5252

5353
.PHONY: test-shell
5454
test-shell:
File renamed without changes.

0 commit comments

Comments
 (0)