-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #95 from mmngreco/master
Refactor for Python Standardization and CLI Isolation
- Loading branch information
Showing
21 changed files
with
245 additions
and
144 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
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 |
---|---|---|
|
@@ -12,3 +12,5 @@ i3_agenda/__pycache__ | |
.mypy_cache/ | ||
__pycache__ | ||
|
||
.autoenv | ||
.coverage |
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
help: | ||
@cat ./Makefile | grep -E '^[a-zA-Z_-]+:.*?## .*$$' | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}' | ||
|
||
install: ## Install dependencies | ||
pip install . -r requirements.txt | ||
|
||
dev: ## Install dependencies for development | ||
pip install -e . | ||
pip install -r requirements-dev.txt | ||
|
||
test: ## Run tests | ||
pytest tests --doctest-modules --cov=src | ||
|
||
lint: ## Check code style | ||
flake8 src --count --select=E9,F63,F7,F82 --show-source --statistics | ||
flake8 src --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
|
||
fix: ## Format code | ||
black -l79 src | ||
|
||
release: ## Create a release: make release v=0.1.0 | ||
@if [ -z "$(v)" ]; then echo "Missing version number:\nUse: make release v=0.1"; exit 1; fi | ||
@sed -i -e "s/version = \".*\"/version = \"$(v)\"/" pyproject.toml | ||
@sed -i -e "s/__version__ = \".*\"/__version__ = \"$(v)\"/" src/i3_agenda/__init__.py | ||
@sed -i -e "s/archive\/[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?\.tar\.gz/archive\/$(v).tar.gz/" pyproject.toml | ||
@git diff | ||
@# Ideally, we would use the following | ||
@# git add pyproject.toml src/i3_agenda/__init__.py | ||
@# git commit -m "Release v$(v)" | ||
@# git tag -a v$(v) -m "Release v$(v)" | ||
@# git push | ||
@# git push --tags |
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
[build-system] | ||
requires = ["setuptools", "wheel", "build"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "i3-agenda" | ||
version = "1.8" | ||
description = "Show your next google calendar event in polybar or i3-bar" | ||
readme = "README.md" | ||
authors = [{ name = "Tomer Rosenfeld", email = "[email protected]" }] | ||
license = {text = "Unlicense"} | ||
classifiers = ["Programming Language :: Python :: 3"] | ||
requires-python = ">=3.3" | ||
dependencies = [ | ||
"aiohttp", | ||
"google-api-python-client", | ||
"google-auth-httplib2", | ||
"google-auth-oauthlib", | ||
"python-bidi", | ||
"typing_extensions" | ||
] | ||
|
||
[project.urls] | ||
Download = "https://github.com/rosenpin/i3-agenda/archive/1.8.tar.gz" | ||
|
||
[project.scripts] | ||
i3-agenda = "i3_agenda.main:main" | ||
|
||
[metadata] | ||
url = "https://github.com/rosenpin/i3-agenda" | ||
author = "Tomer Rosenfeld" | ||
author_email = "[email protected]" | ||
|
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
flake8 | ||
pytest | ||
freezegun | ||
pytest-cov | ||
black | ||
isort |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
__version__ = "1.8" | ||
__all__ = [ | ||
"__version__", | ||
] |
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
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
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from typing_extensions import Final | ||
|
||
DAYS_PER_WEEK: Final = 7 | ||
HOURS_PER_DAY: Final = 24 | ||
SECONDS_PER_DAY: Final = 86400 | ||
SECONDS_PER_HOUR: Final = 3600 | ||
SECONDS_PER_MINUTE: Final = 60 | ||
|
||
URGENT_DELAY_MN: Final = 5 | ||
|
||
MIN_CHARS: Final = -1 | ||
MIN_DELAY: Final = -1 | ||
|
||
LEFT_MOUSE_BUTTON: Final = "1" | ||
RIGHT_MOUSE_BUTTON: Final = "3" |
Oops, something went wrong.