Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ilkersigirci committed Aug 6, 2024
1 parent 66fa5b6 commit 042e18a
Show file tree
Hide file tree
Showing 16 changed files with 36 additions and 176 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "python_template",
"name": "bert_score_api",
"dockerComposeFile": [
"../docker-compose.yml",
"docker-compose.yml"
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ repos:
# rev: v0.991
# hooks:
# - id: mypy
# files: python_template
# files: bert_score_api
# additional_dependencies: [types-PyYAML, rich]
# args: [
# "--strict",
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
# chain commands together with semicolon
.ONESHELL:
SHELL=/bin/bash
ROOT_DIR=python-template
PACKAGE=src/python_template
ROOT_DIR=bert-score-api
PACKAGE=src/bert_score_api
PYTHON = python
PYTHON_VERSION=3.11
DOC_DIR=./docs
TEST_DIR=./tests
TEST_MARKER=placeholder
TEST_OUTPUT_DIR=tests_outputs
PRECOMMIT_FILE_PATHS=./python_template/__init__.py
PROFILE_FILE_PATH=./python_template/__init__.py
DOCKER_IMAGE=python-template
PRECOMMIT_FILE_PATHS=./bert_score_api/__init__.py
PROFILE_FILE_PATH=./bert_score_api/__init__.py
DOCKER_IMAGE=bert-score-api
DOCKER_TARGET=development

# TODO: add source for rye
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Python Template
# BERT Score API

## Project Structure

Expand Down Expand Up @@ -33,19 +33,19 @@ make -s install

```bash
# Development build (800 MB)
docker build --tag python-template --file docker/Dockerfile --target development .
docker build --tag bert-score-api --file docker/Dockerfile --target development .

# Production build (145 MB)
docker build --tag python-template --file docker/Dockerfile --target production .
docker build --tag bert-score-api --file docker/Dockerfile --target production .
```

- To run command inside the container:

```bash
docker run -it python-template:latest bash
docker run -it bert-score-api:latest bash

# Temporary container
docker run --rm -it python-template:latest bash
docker run --rm -it bert-score-api:latest bash
```

## IDE Setings
Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
version: "3.9"

services:
python-template-dev:
image: python-template-dev:latest
bert-score-api-dev:
image: bert-score-api-dev:latest
build:
context: .
dockerfile: docker/Dockerfile
target: development
# ports:
# - 8080:8080
python-template-prod:
image: python-template-prod:latest
bert-score-api-prod:
image: bert-score-api-prod:latest
build:
context: .
dockerfile: docker/Dockerfile
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
This site contains the project documentation for the
`python_template` project.
`bert_score_api` project.

## Table Of Contents

Expand Down
4 changes: 2 additions & 2 deletions docs/reference.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
This part of the project documentation focuses on
an **information-oriented** approach. Use it as a
reference for the technical implementation of the
`python_template` project code.
`bert_score_api` project code.

::: python_template
::: bert_score_api
8 changes: 4 additions & 4 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
site_name: Python Template
site_name: Bert Score Api
site_dir: public
site_url: https://github.com/ilkersigirci/python-template
# repo_url: https://gitlab.com/ilkersigirci/python-template # # For GitLab
repo_url: https://ilkersigirci.github.io/python-template/ # For GitHub
site_url: https://github.com/ilkersigirci/bert-score-api
# repo_url: https://gitlab.com/ilkersigirci/bert-score-api # # For GitLab
repo_url: https://ilkersigirci.github.io/bert-score-api/ # For GitHub
# repo_name: GitLab
repo_name: GitHub

Expand Down
23 changes: 12 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
[project]
name = "python_template"
name = "bert_score_api"
version = "0.0.0"
description = "Python Template"
description = "Bert Score API"

# NOTE: Overwrites .python-version
# requires-python = ">=3.11,<3.13"

authors = [
{name = "template", email = "template@github.com"},
{name = "Ilker SIGIRCI", email = "sigirci.ilker@gmail.com"},
]
maintainers = [
{name = "template", email = "template@github.com"},
{name = "Ilker SIGIRCI", email = "sigirci.ilker@gmail.com"},
]
readme = "README.md"

keywords = [
"template"
"bert",
"fastapi",
]

classifiers = [
Expand Down Expand Up @@ -63,7 +64,7 @@ name = "default"
url = "https://pypi.org/simple/"

[tool.rye.scripts]
placeholder = "python_template.scripts.placeholder:placeholder_script"
placeholder = "bert_score_api.scripts.placeholder:placeholder_script"

[tool.pytest.ini_options]
minversion = "7.0.0"
Expand All @@ -75,7 +76,7 @@ addopts = [
# "--strict-markers",
# "--doctest-modules",
# NOTE: cov is not working with pycharm debugger. Enable it later!
# "--cov python_template",
# "--cov bert_score_api",
# "--cov-report=xml",
# "--cov-report html",
]
Expand Down Expand Up @@ -107,7 +108,7 @@ extend-exclude = [
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["E402", "F401"]
# "path/to/file.py" = ["E402"]
# 'python_template/__init__.py' = ['F405', 'F403']
# 'bert_score_api/__init__.py' = ['F405', 'F403']

# [tool.ruff.flake8-quotes]
# inline-quotes = "single"
Expand Down Expand Up @@ -171,7 +172,7 @@ combine-as-imports = true
# Read more here: https://mypy.readthedocs.io/en/stable/config_file.html#using-a-pyproject-toml-file
[tool.mypy]
# python_version = "3.8"
files = ["src/python_template"]
files = ["src/bert_score_api"]
# exclude = ['^tests/']
strict = true
show_error_codes = true
Expand All @@ -184,7 +185,7 @@ ignore_missing_imports = true
check_untyped_defs = true

[tool.coverage.run]
source = ['src/python_template']
source = ['src/bert_score_api']
branch = true
context = '${CONTEXT}'

Expand All @@ -200,7 +201,7 @@ exclude_lines = [

# [tool.coverage.paths]
# source = [
# 'src/python_template/',
# 'src/bert_score_api/',
# ]

[tool.hatch.metadata]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
from importlib.metadata import version

# Fetches the version of the package as defined in pyproject.toml
__version__ = version("python_template")
__version__ = version("bert_score_api")
Empty file added src/bert_score_api/main.py
Empty file.
105 changes: 0 additions & 105 deletions src/python_template/placeholder.py

This file was deleted.

1 change: 0 additions & 1 deletion src/python_template/scripts/__init__.py

This file was deleted.

9 changes: 0 additions & 9 deletions src/python_template/scripts/placeholder.py

This file was deleted.

Empty file added tests/.gitkeep
Empty file.
26 changes: 0 additions & 26 deletions tests/test_placeholder.py

This file was deleted.

0 comments on commit 042e18a

Please sign in to comment.