-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
10 changed files
with
196 additions
and
110 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,12 @@ | ||
.git | ||
.github | ||
.mypy_cache | ||
.pre-commit-config.yaml | ||
.pytest_cache | ||
.venv | ||
.tox | ||
*.egg-info | ||
build | ||
dist | ||
requirements-dev.txt | ||
test |
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
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 @@ | ||
FROM python:3.12-slim-bullseye | ||
|
||
ENV PYTHONUNBUFFERED 1 | ||
|
||
LABEL maintainer="deejaynof@gmail.com" | ||
|
||
RUN : \ | ||
&& groupadd --gid 1001 timezone-converter \ | ||
&& useradd --uid 1001 --gid timezone-converter --system --create-home --home-dir /home/timezone-converter timezone-converter \ | ||
&& : | ||
USER timezone-converter | ||
|
||
WORKDIR /opt | ||
COPY --chown=timezone-converter:timezone-converter . . | ||
|
||
ENV PATH="/home/timezone-converter/.local/bin:$PATH" | ||
RUN : \ | ||
&& python3 -m pip --no-cache-dir install . \ | ||
&& : | ||
|
||
ENTRYPOINT [ "timezone-converter" ] |
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,106 @@ | ||
[build-system] | ||
requires = [ | ||
"hatchling>=1.10.0", | ||
] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "timezone-converter" | ||
version = "0.12.1" | ||
description = "Compare your local timezone with foreign ones." | ||
license = "MIT" | ||
license-files = { paths = ["LICENSE"] } | ||
readme = "README.md" | ||
authors = [ | ||
{ name = "Iago Alonso", email = "deejaynof@gmail.com" }, | ||
] | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Environment :: Console", | ||
"Intended Audience :: End Users/Desktop", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: MacOS", | ||
"Operating System :: Microsoft :: Windows", | ||
"Operating System :: POSIX :: Linux", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Topic :: Terminals", | ||
"Topic :: Utilities", | ||
"Typing :: Typed", | ||
] | ||
requires-python = ">=3.8" | ||
dependencies = [ | ||
"importlib-metadata", | ||
"pytz>=2022.6", | ||
"rich>=12.6.0", | ||
] | ||
|
||
[project.scripts] | ||
timezone-converter = "timezone_converter.main:main" | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/ibLeDy/timezone-converter" | ||
|
||
[tool.hatch.build.targets.sdist] | ||
include = [ | ||
"timezone_converter", | ||
] | ||
exclude = [ | ||
"tests*", | ||
] | ||
|
||
[tool.hatch.build.targets.wheel] | ||
packages = [ | ||
"timezone_converter", | ||
] | ||
|
||
[tool.mypy] | ||
check_untyped_defs = true | ||
warn_redundant_casts = true | ||
warn_unused_ignores = true | ||
disallow_any_generics = true | ||
disallow_incomplete_defs = true | ||
disallow_untyped_defs = true | ||
no_implicit_optional = true | ||
no_implicit_reexport = true | ||
|
||
[[tool.mypy.overrides]] | ||
module = "tests.*" | ||
disallow_untyped_defs = false | ||
|
||
[tool.coverage.run] | ||
plugins = "covdefaults" | ||
|
||
[tool.tox] | ||
legacy_tox_ini = """ | ||
[tox] | ||
envlist = py38, py39, py310, py311, py312 | ||
isolated_build = True | ||
[gh-actions] | ||
python = | ||
3.8: py38 | ||
3.9: py39 | ||
3.10: py310 | ||
3.11: py311 | ||
3.12: py312 | ||
[testenv] | ||
commands = | ||
timezone-converter | ||
timezone-converter --help | ||
timezone-converter tijuana | ||
timezone-converter tijuana --single | ||
timezone-converter tijuana --single 14 | ||
timezone-converter tijuana new_york | ||
timezone-converter tijuana new_york --single | ||
timezone-converter tijuana --zone | ||
timezone-converter tijuana --list | ||
timezone-converter tijuana --list tbd | ||
""" |
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,8 +1,3 @@ | ||
import sys | ||
|
||
if sys.version_info < (3, 8): | ||
import importlib_metadata as metadata | ||
else: | ||
from importlib import metadata | ||
from importlib import metadata | ||
|
||
VERSION = metadata.version('timezone-converter') |