generated from delameter/skeleton-python3
-
Notifications
You must be signed in to change notification settings - Fork 0
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
0 parents
commit 951974e
Showing
29 changed files
with
1,159 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 4 | ||
indent_style = space | ||
insert_final_newline = true | ||
max_line_length = 120 | ||
tab_width = 4 | ||
|
||
[*.py] | ||
max_line_length = 100 | ||
ij_visual_guides = 88,100 | ||
|
||
[*.rst] | ||
indent_size = 3 | ||
ij_visual_guides = 80 | ||
max_line_length = 80 | ||
|
||
[*.yml] | ||
indent_size = 2 |
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,3 @@ | ||
VERSION=0.1.0 | ||
HATCH_INDEX_USER=__token__ | ||
HATCH_INDEX_AUTH= #api token for primary repo |
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 @@ | ||
* @delameter |
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,11 @@ | ||
dist | ||
dist-dev | ||
**/__pycache__/** | ||
**/.pytest_cache | ||
*.egg-info | ||
.env | ||
venv | ||
.coverage | ||
docs/_build | ||
coverage | ||
.hatch |
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,34 @@ | ||
#🌱 NEW: | ||
#🐞 FIX: | ||
#💎 REFINE: | ||
|
||
#🔩 ADJUST: | ||
#🙈 BULK: | ||
#🍒 CHERRYPICK: | ||
#⌛ DRAFT: | ||
#📙 DOCS: | ||
#🚧 INIT | ||
#⛔ LOCAL: | ||
#🔧 MAINTAIN: | ||
#🚀 RELEASE: | ||
#❌ REMOVAL: | ||
#☢️ REVERT: | ||
#💡 RESEARCH: | ||
#💥 REWORK: | ||
#🔨 SQUASH: [00] | ||
#🆙 UPDATE: | ||
#⏫ UPGRADE: | ||
#🧪 TESTS: | ||
|
||
# closes #00 | ||
|
||
|
||
##----------------------------------------------------------------------------- | ||
#@ es7s/gitmessage rev. 15 es7s projects commit message templates | ||
## Apr-2022 A. Shavykin <0.delameter@gmail.com> | ||
##----------------------------------------------------------------------------- | ||
## To make git use new commit template run (in repo's directory): | ||
## | ||
## curl -s https://es7s.dlup.link/gitmessage > .gitmessage | ||
## git config --add commit.template .gitmessage | ||
##_____________________________________________________________________________ |
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,10 @@ | ||
v0.0.0 | ||
------ | ||
|
||
- no | ||
|
||
|
||
----- | ||
|
||
|
||
This project uses Semantic Versioning -- https://semver.org |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 Aleksandr Shavykin | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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 @@ | ||
include CHANGES.rst |
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,72 @@ | ||
## es7s/pysuncalc ## Library for sun timings calculations | ||
## (C) 2023 ## A. Shavykin <0.delameter@gmail.com> | ||
##---------------------------##------------------------------------------------------------- | ||
.ONESHELL: | ||
.PHONY: help test docs | ||
|
||
PROJECT_NAME = pysuncalc | ||
|
||
DOTENV = .env | ||
DOTENV_DIST = .env.dist | ||
OUT_BUILD_RELEASE_PATH = dist | ||
|
||
include ${DOTENV_DIST} | ||
-include ${DOTENV} | ||
export | ||
VERSION ?= 0.0.0 | ||
|
||
NOW := $(shell date '+%Y-%b-%0e.%H%M%S.%3N') | ||
BOLD := $(shell tput -Txterm bold) | ||
GREEN := $(shell tput -Txterm setaf 2) | ||
YELLOW := $(shell tput -Txterm setaf 3) | ||
DIM := $(shell tput -Txterm dim) | ||
RESET := $(shell printf '\e[m') | ||
# tput -Txterm sgr0 returns SGR-0 with | ||
# nF code switching esq, which displaces the columns | ||
## Common commands | ||
|
||
help: ## Show this help | ||
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v @fgrep | sed -Ee 's/^(##)\s?(\s*#?[^#]+)#*\s*(.*)/\1${YELLOW}\2${RESET}#\3/; s/(.+):(#|\s)+(.+)/## ${GREEN}\1${RESET}#\3/; s/\*(\w+)\*/${BOLD}\1${RESET}/g; 2~1s/<([*<@>.A-Za-z0-9_-]+)>/${DIM}\1${RESET}/gi' -e 's/(\x1b\[)33m#/\136m/' | column -ts# | sed -Ee 's/ {3}>/ >/' | ||
|
||
## | ||
## Pre-build | ||
|
||
demolish-build: ## Delete build output folders | ||
rm -f -v ${OUT_BUILD_RELEASE_PATH}/* | ||
|
||
show-version: ## Show current package version | ||
@echo "Current version: ${YELLOW}${VERSION}${RESET}" | ||
|
||
set-version: ## Set new package version | ||
set-version: show-version | ||
@read -p "New version (press enter to keep current): " VERSION | ||
if [ -z $$VERSION ] ; then echo "No changes" && return 0 ; fi | ||
sed -E -i "s/^VERSION.+/VERSION=$$VERSION/" ${DOTENV_DIST} ${DOTENV} | ||
sed -E -i "s/^__version__.+/__version__ = \"$$VERSION\"/" ${PROJECT_NAME}/_version.py | ||
echo "Updated version: ${GREEN}$$VERSION${RESET}" | ||
|
||
purge-cache: ## Clean up pycache | ||
find . -type d \( -name __pycache__ -or -name .pytest_cache \) -print -exec rm -rf {} + | ||
|
||
## | ||
## Testing | ||
|
||
test: ## Run pytest | ||
hatch run test:test | ||
|
||
cover: ## Run coverage and make a report | ||
hatch run test:cover | ||
|
||
## | ||
## Building / Packaging | ||
|
||
build: ## Create new *public* build | ||
build: demolish-build | ||
hatch --verbose -e build build | ||
|
||
publish: ## Upload last *public* build (=> PRIMARY registry) | ||
hatch --verbose -e build publish \ | ||
-u ${HATCH_INDEX_USER} \ | ||
-a ${HATCH_INDEX_AUTH} | ||
|
||
## |
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,54 @@ | ||
<h1 align="center"> | ||
<img src="https://user-images.githubusercontent.com/50381946/167810957-14b78013-00cf-436e-b535-d2b89f881c44.png"> | ||
<br> | ||
<code> | ||
pysuncalc | ||
</code> | ||
<br> | ||
</h1> | ||
|
||
Proin lacinia metus auctor est posuere, in ornare dui hendrerit. Aliquam eget est gravida, iaculis tortor a, aliquam ligula. | ||
|
||
Morbi semper metus at egestas vulputate: | ||
|
||
- Nullam viverra nisi vel tellus finibus tincidunt. | ||
- Pellentesque at velit placerat, gravida eros eu, blandit est. | ||
- Curabitur id odio et magna semper vestibulum. | ||
- Donec id lectus ut mi tincidunt commodo et eget risus. | ||
|
||
|
||
## Motivation | ||
|
||
<div align="center"> | ||
|
||
![image](https://user-images.githubusercontent.com/50381946/190855236-6804df02-7f64-46a7-890a-9e0b60df7969.png) | ||
|
||
</div> | ||
|
||
## Installation | ||
|
||
pipx install pysuncalc | ||
|
||
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. | ||
|
||
Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. | ||
|
||
Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur? | ||
|
||
## Usage | ||
|
||
make init | ||
|
||
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. | ||
|
||
Et harum quidem rerum facilis est et expedita distinctio. | ||
|
||
Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae. | ||
|
||
_Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat._ | ||
|
||
## Changelog | ||
|
||
### v0.0.0 | ||
|
||
- yes |
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,19 @@ | ||
# ============================================================================== | ||
# es7s/pysuncalc [Library for sun timings calculations] | ||
# (c) 2023. A. Shavykin <0.delameter@gmail.com> | ||
# Licensed under MIT License | ||
# ============================================================================== | ||
""" file responsible for doctest running and custom shared fixtures """ | ||
|
||
from doctest import ELLIPSIS | ||
|
||
from sybil import Sybil | ||
from sybil.parsers.codeblock import PythonCodeBlockParser | ||
from sybil.parsers.doctest import DocTestParser | ||
|
||
pytest_plugins = [] | ||
|
||
pytest_collect_file = Sybil( | ||
parsers=[DocTestParser(optionflags=ELLIPSIS), PythonCodeBlockParser()], | ||
patterns=["*.rst", "*.py"], | ||
).pytest() |
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,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = . | ||
BUILDDIR = _build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
Oops, something went wrong.