-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
22 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,19 @@ | ||
# Makefile for HOSA (Higher Order Spectral Analysis) package | ||
.DEFAULT_GOAL := help | ||
SHELL := /bin/bash | ||
|
||
# Python interpreter to use | ||
PYTHON := python3 | ||
setup: ## Install dependencies | ||
@pip install -r ./requirements.txt | ||
|
||
# Poetry for dependency management and packaging | ||
POETRY := poetry | ||
test: ## Run tests (note: requires imports) | ||
@coverage run -m pytest -vv --log-cli-level=ERROR ./tests | ||
|
||
.PHONY: help install dev-install clean lint test coverage build publish | ||
publish: ## Publish to pypi | ||
@rm -rf dist build | ||
@python setup.py sdist bdist_wheel | ||
@twine upload dist/* --verbose | ||
|
||
help: | ||
@echo "Available commands:" | ||
@echo " install : Install the package" | ||
@echo " dev-install : Install the package in editable mode with development dependencies" | ||
@echo " clean : Remove build artifacts and cache files" | ||
@echo " lint : Run linter (flake8) on the code" | ||
@echo " test : Run tests using pytest" | ||
@echo " coverage : Run tests and generate a coverage report" | ||
@echo " build : Build source and wheel distributions" | ||
@echo " publish : Publish the package to PyPI" | ||
|
||
install: | ||
$(POETRY) install | ||
|
||
dev-install: | ||
$(POETRY) install --dev | ||
|
||
clean: | ||
rm -rf build dist .eggs *.egg-info | ||
find . -name '*.pyc' -exec rm -f {} + | ||
find . -name '*.pyo' -exec rm -f {} + | ||
find . -name '*~' -exec rm -f {} + | ||
find . -name '__pycache__' -exec rm -rf {} + | ||
|
||
lint: | ||
$(POETRY) run flake8 hosa tests | ||
|
||
test: | ||
$(POETRY) run pytest | ||
|
||
coverage: | ||
$(POETRY) run pytest --cov=hosa --cov-report=term-missing --cov-report=xml | ||
|
||
build: | ||
$(POETRY) build | ||
|
||
publish: | ||
$(POETRY) publish | ||
|
||
# Local development server for documentation (if using Sphinx) | ||
docs-serve: | ||
cd docs && $(MAKE) html && cd _build/html && $(PYTHON) -m http.server 8000 | ||
|
||
# Generate requirements.txt from poetry.lock | ||
requirements: | ||
$(POETRY) export -f requirements.txt --output requirements.txt --without-hashes | ||
help: ## Dislay this help | ||
@IFS=$$'\n'; for line in `grep -h -E '^[a-zA-Z_#-]+:?.*?## .*$$' $(MAKEFILE_LIST)`; do if [ "$${line:0:2}" = "##" ]; then \ | ||
echo $$line | awk 'BEGIN {FS = "## "}; {printf "\n\033[33m%s\033[0m\n", $$2}'; else \ | ||
echo $$line | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'; fi; \ | ||
done; unset IFS; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
numpy | ||
scipy | ||
matplotlib | ||
torch | ||
matplotlib>=3.7.0 | ||
scipy>=1.12.1 | ||
numpy>=1.22.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters