Skip to content

Commit

Permalink
Update project name to splitme.
Browse files Browse the repository at this point in the history
  • Loading branch information
eli64s committed Jan 22, 2025
1 parent 796c1c2 commit a05b6b0
Show file tree
Hide file tree
Showing 107 changed files with 4,623 additions and 2,269 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
-vv \
--tb=short \
--durations=5 \
--cov=src/splitme_ai \
--cov=src/splitme \
--cov-branch \
--cov-fail-under=0 \
--cov-report=term-missing:skip-covered \
Expand Down Expand Up @@ -153,7 +153,7 @@ jobs:
if: success() && startsWith(github.ref, 'refs/tags/v')
environment:
name: pypi
url: https://pypi.org/p/splitme-ai
url: https://pypi.org/p/splitme
permissions:
id-token: write

Expand Down
11 changes: 6 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ ENV/
.mypy_cache/
.pytest_cache/
.ruff_cache/
.splitme-ai/
.reports/
notebooks/
site/
.continuerules

# wip
# Splitme
.splitme/
docs/*.md
docs/features/
docs/integrations/
docs/notes.md
docs/roadmap.md
tests/data/readme-ai.html
src/splitme/ai/
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 Eli Salamie
Copyright (c) 2024 to present Splitme and individual contributors.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
46 changes: 25 additions & 21 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ SHELL := /bin/bash
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules

PYPROJECT_TOML := pyproject.toml
PYPI_VERSION := 0.1.11
PYTHON_VERSION := 3.11
PYPROJECT := pyproject.toml
TARGET := splitme_ai tests
TARGET := splitme tests
TARGET_TEST := tests


# -- Clean Up ------------------------------------------------------------------
# -- Clean ---------------------------


.PHONY: clean
clean: ## Clean build and virtual environment directories
Expand All @@ -21,30 +23,31 @@ clean: ## Clean build and virtual environment directories
-find . -name "*.pyc" -type f -exec rm -f {} +


# -- Dependencies ------------------------------------------------------------
# -- Dev ---------------------------


.PHONY: build-hatch
build-hatch: ## Build the distribution package using hatch
hatch build
pip show splitme-ai
pip show splitme

.PHONY: build
build: ## Build the distribution package using uv
uv build
uv pip install dist/splitme_ai-0.1.0-py3-none-any.whl
uv pip install dist/splitme-$(PYPI_VERSION)-py3-none-any.whl

.PHONY: install
install: ## Install all dependencies from pyproject.toml
uv sync --dev --group test --group docs --group lint --all-extras

.PHONY: lock
lock: ## Lock dependencies declared in pyproject.toml
uv pip compile pyproject.toml --all-extras
uv pip compile $(PYPROJECT_TOML) --all-extras

.PHONY: requirements
requirements: ## Generate requirements files from pyproject.toml
uv pip compile pyproject.toml -o requirements.txtiu
uv pip compile pyproject.toml --all-extras -o requirements-dev.txt
uv pip compile $(PYPROJECT_TOML) -o requirements.txtiu
uv pip compile $(PYPROJECT_TOML) --all-extras -o requirements-dev.txt

.PHONY: sync
sync: ## Sync environment with pyproject.toml
Expand All @@ -59,16 +62,15 @@ venv: ## Create a virtual environment
uv venv --python $(PYTHON_VERSION)


# -- Documentation --------------------------------------------------------------
# -- Docs ---------------------------

.PHONY: docs
docs: ## Build documentation site using mkdocs
cd docs && \
uv run mkdocs build --clean
uv run mkdocs serve


# -- Linting ---------------------------------------------------------------
# -- Lint ---------------------------

.PHONY: format-toml
format-toml: ## Format TOML files using pyproject-fmt
Expand Down Expand Up @@ -96,26 +98,28 @@ typecheck-pyright: ## Type-check Python files using Pyright
uv run pyright $(TARGET)


# -- Testing -------------------------------------------------------------------
# -- Tests ----------------------------


.PHONY: test
test: ## Run test suite using Pytest
poetry run pytest $(TARGET_TEST) --config-file $(PYPROJECT)
uv run pytest $(TARGET_TEST) --config-file $(PYPROJECT_TOML)


# -- Utils ---------------------------

# -- Utilities ------------------------------------------------------------------

.PHONY: run-pypi
run-pypi:
uvx --isolated splitme-ai --split.i tests/data/readme-ai.md --split.settings.o .splitme-ai/pypi-h2/ --split.settings.hl "##"
uvx --isolated splitme-ai --split.i tests/data/readme-ai.md --split.settings.o .splitme-ai/pypi-h3/ --split.settings.hl "###"
uvx --isolated splitme-ai --split.i tests/data/readme-ai.md --split.settings.o .splitme-ai/pypi-h4/ --split.settings.hl "####"
uvx --isolated splitme --split.i tests/data/markdown/readme-ai.md --split.o .splitme/pypi-h2/ --split.level "##"
uvx --isolated splitme --split.i tests/data/markdown/readme-ai.md --split.o .splitme/pypi-h3/ --split.level "###"
uvx --isolated splitme --split.i tests/data/markdown/readme-ai.md --split.o .splitme/pypi-h4/ --split.level "####"

.PHONY: run-splitter
run-splitter: ## Run the main application
uv run splitme-ai --split.i tests/data/readme-ai.md --s.settings.o .splitme-ai/test-docs-h2/ --s.settings.hl "##" --s.settings.mkdocs
uv run splitme-ai --split.i tests/data/readme-ai.md --s.settings.o .splitme-ai/test-docs-h3/ --s.settings.hl "###"
uv run splitme-ai --split.i tests/data/readme-ai.md --s.settings.o .splitme-ai/test-docs-h4/ --s.settings.hl "####"
uv run splitme --split.i tests/data/markdown/readme-ai.md --split.o docs/examples/split-sections-h2 --split.level "##" --mkdocs.dir docs/examples/split-sections-h2
uv run splitme --split.i tests/data/markdown/readme-ai.md --split.o docs/examples/split-sections-h3/ --split.level "###"
uv run splitme --split.i tests/data/markdown/readme-ai.md --split.o docs/examples/split-sections-h4/ --split.level "####"

.PHONY: help
help: ## Display this help
Expand Down
Loading

0 comments on commit a05b6b0

Please sign in to comment.