Skip to content

Commit f8e7cbd

Browse files
committed
Clean up
1 parent 142b5a4 commit f8e7cbd

File tree

11 files changed

+12
-34
lines changed

11 files changed

+12
-34
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ RUN apt-get update && apt-get upgrade -y && apt-get install -y git
99
COPY Pipfile* /
1010
RUN pipenv install
1111

12-
ENTRYPOINT ["pipenv", "run", "my_app"]
12+
ENTRYPOINT ["pipenv", "run", "ecr_test"]

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ update: # Update Python dependencies
3434
######################
3535

3636
test: # Run tests and print a coverage report
37-
uv run coverage run --source=my_app -m pytest -vv
37+
uv run coverage run --source=ecr_test -m pytest -vv
3838
uv run coverage report -m
3939

4040
coveralls: test # Write coverage data to an LCOV report

Pipfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ pip-audit = "*"
2020
python_version = "3.12"
2121

2222
[scripts]
23-
my_app = "python -c \"from my_app.cli import main; main()\""
23+
ecr_test = "python -c \"from ecr_test.cli import main; main()\""

README.md

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,6 @@
1-
# python-cli-template
2-
3-
A template repository for creating Python CLI applications.
4-
5-
## App Setup (delete this section and above after initial application setup)
6-
7-
1. Rename "my_app" to the desired app name across the repo. (May be helpful to do a project-wide find-and-replace).
8-
2. Update Python version if needed.
9-
3. Install all dependencies with `make install` to create initial Pipfile.lock with latest dependency versions.
10-
4. Add initial app description to README and update initial required ENV variable documentation as needed.
11-
5. Update license if needed (check app-specific dependencies for licensing terms).
12-
6. Check Github repository settings:
13-
- Confirm repo branch protection settings are correct (see [dev docs](https://mitlibraries.github.io/guides/basics/github.html) for details)
14-
- Confirm that all of the following are enabled in the repo's code security and analysis settings:
15-
- Dependabot alerts
16-
- Dependabot security updates
17-
- Secret scanning
18-
7. Create a Sentry project for the app if needed (we want this for most apps):
19-
- Send initial exceptions to Sentry project for dev, stage, and prod environments to create them.
20-
- Create an alert for the prod environment only, with notifications sent to the appropriate team(s).
21-
- If *not* using Sentry, delete Sentry configuration from config.py and test_config.py, and remove sentry_sdk from project dependencies.
22-
23-
# my_app
24-
25-
Description of the app
1+
# ecr_test
2+
3+
Just for testing the ECR shared workflows. This app doesn't need to do anything other than build via Docker.
264

275
## Development
286

ecr_test/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""ecr_test package."""

my_app/cli.py renamed to ecr_test/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import click
66

7-
from my_app.config import configure_logger, configure_sentry
7+
from ecr_test.config import configure_logger, configure_sentry
88

99
logger = logging.getLogger(__name__)
1010

my_app/config.py renamed to ecr_test/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def configure_logger(logger: logging.Logger, *, verbose: bool) -> str:
1212
)
1313
logger.setLevel(logging.DEBUG)
1414
for handler in logging.root.handlers:
15-
handler.addFilter(logging.Filter("my_app"))
15+
handler.addFilter(logging.Filter("ecr_test"))
1616
else:
1717
logging.basicConfig(
1818
format="%(asctime)s %(levelname)s %(name)s.%(funcName)s(): %(message)s"

my_app/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ max-doc-length = 90
8585
convention = "google"
8686

8787
[project.scripts]
88-
my-app = "my_app.cli:main"
88+
my-app = "ecr_test.cli:main"
8989

9090
[build-system]
9191
requires = ["setuptools>=61"]

tests/test_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from my_app.cli import main
1+
from ecr_test.cli import main
22

33

44
def test_cli_no_options(caplog, runner):

0 commit comments

Comments
 (0)