Skip to content

Commit 35fca2d

Browse files
committedApr 29, 2022
Pull some other improvements from template-poetry
1 parent 7a7c656 commit 35fca2d

File tree

4 files changed

+182
-8
lines changed

4 files changed

+182
-8
lines changed
 

‎.vscode/extensions.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"recommendations": [
3+
"ms-python.python"
4+
]
5+
}

‎.vscode/settings.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"files.exclude": {
3+
".idea/": true,
4+
"**/*.iml": true,
5+
"**/.pytest_cache/": true,
6+
"**/__pycache__/": true,
7+
".venv/": true,
8+
"dist/": true,
9+
"out/": true,
10+
"poetry.lock": true,
11+
}
12+
}

‎Dockerfile

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
FROM python:3.10-bullseye AS metadata
1+
FROM python AS metadata
22
LABEL maintainer="Stefano Pigozzi <me@steffo.eu>"
3+
4+
FROM metadata AS workdir
35
WORKDIR /usr/src/rygforms
46

57
FROM metadata AS poetry
6-
RUN pip install "poetry==1.1.12"
8+
RUN pip install "poetry"
79

810
FROM poetry AS dependencies
911
COPY pyproject.toml ./pyproject.toml
@@ -19,4 +21,4 @@ ENV PYTHONUNBUFFERED=1
1921

2022
FROM environment AS entrypoint
2123
ENTRYPOINT ["poetry", "run"]
22-
CMD [ "gunicorn", "-b", "0.0.0.0:80", "rygforms.__main__:reverse_proxy_app" ]
24+
CMD [ "gunicorn", "-b", "0.0.0.0:80", "rygforms.__main__:reverse_proxy_app" ]

‎pyproject.toml

+160-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,138 @@
1+
[build-system]
2+
#######################
3+
# Python build system #
4+
#######################
5+
# The build system to use when installing this package.
6+
# Used when installing the package with `pip install .`.
7+
# See also: https://www.python.org/dev/peps/pep-0517/
8+
9+
requires = ["poetry-core>=1.0.0"]
10+
build-backend = "poetry.core.masonry.api"
11+
12+
13+
114
[tool.poetry]
15+
###################
16+
# Poetry settings #
17+
###################
18+
# See https://python-poetry.org/docs/pyproject/ for more details!
19+
20+
# The name of your project.
21+
# Ensure that it is available on PyPI: https://pypi.org/
222
name = "rygforms"
3-
version = "0.5.8"
23+
24+
# The version of the package.
25+
version = "0.5.9"
26+
27+
# A brief, one-sentence description about your project.
428
description = "OAuth2 Login for Typeform and Tripetto"
5-
authors = ["Stefano Pigozzi <me@steffo.eu>", "Lorenzo Balugani <lorenzo.balugani@gmail.com>"]
29+
30+
# A list of the authors of the project.
31+
authors = [
32+
"Stefano Pigozzi <me@steffo.eu>",
33+
"Lorenzo Balugani <lorenzo.balugani@gmail.com>",
34+
]
35+
36+
# A list of maintainers of the project.
37+
# Often, it is the same as the authors list.
38+
maintainers = [
39+
"Stefano Pigozzi <me@steffo.eu>",
40+
"Lorenzo Balugani <lorenzo.balugani@gmail.com>",
41+
]
42+
43+
# The license of the package.
44+
# Uses SPDX format: https://spdx.org/licenses/
45+
license = "AGPL-3.0-or-later"
46+
47+
# The README file.
48+
readme = "README.md"
49+
50+
# The URL of the project website.
51+
# Not the GitHub repository!
52+
homepage = "https://forms.ryg.one/"
53+
54+
# The URL of the project repository.
55+
repository = "https://github.com/RYGhub/rygforms"
56+
57+
# The URL of the project documentation location.
58+
# documentation = "https://example.org/docs"
59+
60+
# Up to five keywords related to your project.
61+
# See also: https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/#keywords
62+
keywords = [
63+
"oauth2",
64+
"tripetto",
65+
"typeform",
66+
"flask",
67+
"ryg",
68+
]
69+
70+
# Any number of trove classifiers that apply to your project.
71+
# See the list at: https://pypi.org/classifiers/
72+
classifiers = [
73+
"Programming Language :: Python :: 3",
74+
"Programming Language :: Python :: 3.7",
75+
]
76+
77+
# ADVANCED: specify the packages exported by your project
78+
# See also: https://python-poetry.org/docs/pyproject/#packages
79+
# packages = [
80+
# # Regular packages
81+
# { include = "OTHER_PACKAGE_NAME" },
82+
# # Namespace packages
83+
# { include = "EXTEND/OTHER/NAMESPACE/**/*.py" }
84+
# ]
85+
86+
# ADVANCED: include additional files in the build
87+
# include = [
88+
# "FILENAME.txt"
89+
# ]
90+
91+
# ADVANCED: exclude files from the build
92+
# exclude = [
93+
# "PACKAGE_NAME/test.py"
94+
# ]
95+
96+
97+
98+
[tool.poetry.urls]
99+
##################
100+
# URLs #
101+
##################
102+
# Additional project URLs in a name → link mapping.
103+
104+
105+
106+
[tool.poetry.scripts]
107+
#####################
108+
# Scripts #
109+
#####################
110+
# Poetry can create "binaries" to add to the PATH when the project is installed.
111+
# They are specified in the form of a mapping with the command name as key and the function to execute as value.
112+
113+
# If you are building a library, comment this.
114+
# If you are building an application, replace PACKAGE-NAME and PACKAGE_NAME with your package name in kebab-case and snake_case respectively.
115+
116+
PACKAGE-NAME = "PACKAGE_NAME.__main__:main"
117+
118+
6119

7120
[tool.poetry.dependencies]
121+
##########################
122+
# Dependencies #
123+
##########################
124+
# A mapping of dependencies of the project
125+
# It should be maintained by `poetry add` / `poetry remove`, but it currently adds things after all comments...
126+
# You can manually specify allowed version numbers:
127+
# * means "any release"
128+
# * → any
129+
# ^X.X.X means "newer releases with this major version"
130+
# ^3.10.1 → == 3 && >= 3.10.1
131+
# ~X.X.X means "newer releases with this minor version"
132+
# ~3.10.1 → == 3.10 && >= 3.10.1
133+
# nothing means "this specific release"
134+
# 3.10.1 → == 3.10.1
135+
8136
python = "^3.7"
9137
flask = "^2.0.3"
10138
authlib = "^1.0.0"
@@ -14,8 +142,35 @@ click = "^8.0.3"
14142
itsdangerous = "^2.1.2"
15143
gunicorn = "^20.1.0"
16144

145+
146+
17147
[tool.poetry.dev-dependencies]
148+
##############################
149+
# Development dependencies #
150+
##############################
151+
# Same as above, but these dependencies are installed only if the project is being installed in development mode.
152+
# They are excluded from the final build.
18153

19-
[build-system]
20-
requires = ["poetry>=0.12"]
21-
build-backend = "poetry.masonry.api"
154+
Sphinx = "^4.3.2"
155+
sphinx-rtd-theme = "^1.0.0"
156+
pytest = "^6.2.5"
157+
pytest-github-actions-annotate-failures = "^0.1.6"
158+
pytest-cov = "^3.0.0"
159+
160+
161+
162+
[tool.poetry.extras]
163+
####################
164+
# Package extras #
165+
####################
166+
# ADVANCED: specify optional dependency groups.
167+
# See: https://python-poetry.org/docs/pyproject/#extras
168+
169+
170+
171+
[tool.poetry.plugins]
172+
#####################
173+
# Poetry plugins #
174+
#####################
175+
# ADVANCED: extend Poetry's functionality.
176+
# See: https://python-poetry.org/docs/pyproject/#plugins

0 commit comments

Comments
 (0)
Please sign in to comment.