Skip to content

Commit 882ecd9

Browse files
committed
Rename my_app to embeddings
How this addresses that need: The root module will be called 'embeddings', and the entrypoint executable will be called 'embeddings'. Side effects of this change: * None Relevant ticket(s): * https://mitlibraries.atlassian.net/browse/USE-111
1 parent fc7df3e commit 882ecd9

File tree

11 files changed

+14
-39
lines changed

11 files changed

+14
-39
lines changed

.aws-architecture

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
linux/arm64

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ WORKDIR /app
1313
COPY pyproject.toml uv.lock* ./
1414

1515
# Copy CLI application
16-
COPY my_app ./my_app
16+
COPY embeddings ./embeddings
1717

1818
# Install package into system python, includes "marimo-launcher" script
1919
RUN uv pip install --system .
2020

21-
ENTRYPOINT ["my-app"]
21+
ENTRYPOINT ["embeddings"]

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=embeddings -m pytest -vv
3838
uv run coverage report -m
3939

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

README.md

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,6 @@
1-
# python-cli-template
1+
# timdex-embeddings
22

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" and "python-cli-template" 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
3+
A CLI application for creating embeddings for TIMDEX.
264

275
## Development
286

@@ -31,7 +9,7 @@ Description of the app
319
- To update dependencies: `make update`
3210
- To run unit tests: `make test`
3311
- To lint the repo: `make lint`
34-
- To run the app: `uv run my-app --help` (Note the hyphen `-` vs underscore `_` that matches the `project.scripts` in `pyproject.toml`)
12+
- To run the app: `my-app --help` (Note the hyphen `-` vs underscore `_` that matches the `project.scripts` in `pyproject.toml`)
3513

3614
## Environment Variables
3715

@@ -44,11 +22,7 @@ WORKSPACE=### Set to `dev` for local development, this will be set to `stage` an
4422

4523
### Optional
4624

47-
_Delete this section if it isn't applicable to the PR._
48-
49-
```shell
50-
<OPTIONAL_ENV>=### Description for optional environment variable
51-
```
25+
_None yet at this time._
5226

5327

5428

embeddings/__init__.py

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

my_app/cli.py renamed to embeddings/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 embeddings.config import configure_logger, configure_sentry
88

99
logger = logging.getLogger(__name__)
1010

my_app/config.py renamed to embeddings/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("embeddings"))
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+
embeddings = "embeddings.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 embeddings.cli import main
22

33

44
def test_cli_no_options(caplog, runner):

0 commit comments

Comments
 (0)