Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Commit

Permalink
Release: 0.3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
BobaZooba committed Sep 30, 2023
1 parent fbedeba commit 9d583e5
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 11 deletions.
33 changes: 24 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ endif
#* Variables
PYTHON := python3
PYTHON_RUN := $(PYTHON) -m
VERSION := 0.1.0

#* Docker variables
IMAGE := xllm
VERSION := latest
DOCKER_VERSION := latest

help: ## Display this help
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z0-9_-]+:.*?##/ { printf " \033[36m%-25s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
Expand All @@ -35,21 +36,21 @@ pre-commit-install: ## Install pre-commit hooks
pre-commit install

#* Docker
# Example: make docker-build VERSION=latest
# Example: make docker-build IMAGE=some_name VERSION=0.0.1
# Example: make docker-build DOCKER_VERSION=latest
# Example: make docker-build IMAGE=some_name DOCKER_VERSION=0.0.1
.PHONY: docker-build
docker-build: ## Build docker image
@echo Building Docker $(IMAGE):$(VERSION) ...
@echo Building Docker $(IMAGE):$(DOCKER_VERSION) ...
docker build \
-t $(IMAGE):$(VERSION) . \
-t $(IMAGE):$(DOCKER_VERSION) . \
-f ./docker/production/Dockerfile --no-cache

# Example: make docker-remove VERSION=latest
# Example: make docker-remove IMAGE=some_name VERSION=0.0.1
# Example: make docker-remove DOCKER_VERSION=latest
# Example: make docker-remove IMAGE=some_name DOCKER_VERSION=0.0.1
.PHONY: docker-remove
docker-remove: ## Remove docker image
@echo Removing Docker $(IMAGE):$(VERSION) ...
docker rmi -f $(IMAGE):$(VERSION)
@echo Removing Docker $(IMAGE):$(DOCKER_VERSION) ...
docker rmi -f $(IMAGE):$(DOCKER_VERSION)

#* Formatters
.PHONY: codestyle
Expand Down Expand Up @@ -102,6 +103,13 @@ mypy: ## Run static code analyzer
lint: check-codestyle mypy unit-test ## Run all checks

#* Develop
.PHONY: push-new-version
push-new-version: ## Push new version to the GitHub
git add .
git commit -m "Release: $(VERSION)"
git tag $(VERSION) -m 'Adds tag $(VERSION) for pypi'
git push --tags origin main

.PHONY: delete-dist
delete-dist: ## Delete all dist builds
rm -rf /dist
Expand All @@ -118,3 +126,10 @@ test-pypi-upload: ## Upload package to the test pypi
.PHONY: pypi-upload
pypi-upload: ## Upload package to the pypi
twine upload dist/* -r pypi

.PHONY: test-pypi-release
test-pypi-release: ## Release test pypi
make push-new-version
make delete-dist
make build-dist
make test-pypi-upload
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
# Setup
setup(
name="xllm",
version="0.3.7",
version="0.3.8",
description="Simple & Cutting Edge LLM Finetuning",
license_files=["LICENSE"],
long_description=open("README.md", "r", encoding="utf-8").read(),
Expand Down
2 changes: 1 addition & 1 deletion src/xllm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

# ruff: noqa: F401

__version__ = "0.3.7"
__version__ = "0.3.8"

from . import enums, types
from .core.config import HuggingFaceConfig
Expand Down

0 comments on commit 9d583e5

Please sign in to comment.