Skip to content

Commit 77a6792

Browse files
authored
setup.cfg -> pyproject.toml (posit-dev#1625)
1 parent 1651445 commit 77a6792

File tree

11 files changed

+173
-183
lines changed

11 files changed

+173
-183
lines changed

.github/workflows/build-docs.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ jobs:
2020

2121
steps:
2222
- uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
2325

2426
- name: Setup py-shiny
2527
uses: ./.github/py-shiny/setup

.github/workflows/deploy-tests.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ jobs:
2020

2121
steps:
2222
- uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
2325
- name: Setup py-shiny
2426
uses: ./.github/py-shiny/setup
2527
with:

.github/workflows/pytest.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ jobs:
3030

3131
steps:
3232
- uses: actions/checkout@v4
33+
with:
34+
fetch-depth: 0
3335
- name: Setup py-shiny
3436
id: install
3537
uses: ./.github/py-shiny/setup
@@ -63,6 +65,8 @@ jobs:
6365
needs: [check]
6466
steps:
6567
- uses: actions/checkout@v4
68+
with:
69+
fetch-depth: 0
6670
- name: "Set up Python 3.10"
6771
uses: actions/setup-python@v4
6872
with:
@@ -117,6 +121,8 @@ jobs:
117121

118122
steps:
119123
- uses: actions/checkout@v4
124+
with:
125+
fetch-depth: 0
120126
- name: Setup py-shiny
121127
uses: ./.github/py-shiny/setup
122128
with:
@@ -159,6 +165,8 @@ jobs:
159165

160166
steps:
161167
- uses: actions/checkout@v4
168+
with:
169+
fetch-depth: 0
162170
- name: Setup py-shiny
163171
uses: ./.github/py-shiny/setup
164172
with:
@@ -205,6 +213,8 @@ jobs:
205213

206214
steps:
207215
- uses: actions/checkout@v4
216+
with:
217+
fetch-depth: 0
208218
- name: Setup py-shiny
209219
uses: ./.github/py-shiny/setup
210220
with:

.github/workflows/verify-js-built.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ jobs:
1111

1212
steps:
1313
- uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
1416

1517
- name: Extract node version from .nvmrc
1618
id: nvm

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,6 @@ docs/source/reference/
115115
_dev/
116116
tests/playwright/deploys/**/requirements.txt
117117
test-results/
118+
119+
# setuptools_scm
120+
shiny/_version.py

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,9 @@ release: dist ## package and upload a release
188188
twine upload dist/*
189189

190190
dist: clean ## builds source and wheel package
191-
pip install setuptools
192-
python setup.py sdist
193-
python setup.py bdist_wheel
191+
pip install build
192+
python -m build --sdist
193+
python -m build --wheel
194194
ls -l dist
195195

196196

pyproject.toml

+148
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
[build-system]
2+
requires = ["setuptools>=60", "wheel", "setuptools_scm>=8.0"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[tool.setuptools]
6+
packages = {find = {include = ["shiny", "shiny.*"]}}
7+
8+
[tool.setuptools_scm]
9+
write_to = "shiny/_version.py"
10+
local_scheme = "no-local-version"
11+
12+
[project]
13+
name = "shiny"
14+
dynamic = ["version"]
15+
authors = [
16+
{name = "Winston Chang", email = "[email protected]"},
17+
]
18+
description = "A web development framework for Python."
19+
readme = "README.md"
20+
requires-python = ">=3.8"
21+
license = {text = "MIT"}
22+
classifiers = [
23+
"Development Status :: 5 - Production/Stable",
24+
"Intended Audience :: Developers",
25+
"License :: OSI Approved :: MIT License",
26+
"Natural Language :: English",
27+
"Programming Language :: Python :: 3.8",
28+
"Programming Language :: Python :: 3.9",
29+
"Programming Language :: Python :: 3.10",
30+
"Programming Language :: Python :: 3.11",
31+
"Programming Language :: Python :: 3.12",
32+
]
33+
dependencies = [
34+
"typing-extensions>=4.10.0",
35+
"uvicorn>=0.16.0;platform_system!='Emscripten'",
36+
"starlette",
37+
"websockets>=10.0",
38+
"python-multipart",
39+
"htmltools>=0.5.2",
40+
"click>=8.1.4;platform_system!='Emscripten'",
41+
"markdown-it-py>=1.1.0",
42+
"mdit-py-plugins>=0.3.0",
43+
"linkify-it-py>=1.0",
44+
"appdirs>=1.4.4",
45+
"asgiref>=3.5.2",
46+
"packaging>=20.9",
47+
"watchfiles>=0.18.0;platform_system!='Emscripten'",
48+
"questionary>=2.0.0;platform_system!='Emscripten'",
49+
"prompt-toolkit;platform_system!='Emscripten'",
50+
"python-multipart>=0.0.7;platform_system!='Emscripten'",
51+
"setuptools;python_version>='3.12'",
52+
]
53+
54+
[project.optional-dependencies]
55+
theme = ["libsass>=0.23.0"]
56+
test = [
57+
"pytest>=6.2.4",
58+
"pytest-asyncio>=0.17.2",
59+
"pytest-playwright>=0.3.0",
60+
"playwright>=1.43.0",
61+
"pytest-xdist",
62+
"pytest-timeout",
63+
"pytest-rerunfailures",
64+
"pytest-cov",
65+
"coverage",
66+
"syrupy>=4.7.1",
67+
"psutil",
68+
"astropy",
69+
"suntime",
70+
"timezonefinder",
71+
"ipyleaflet",
72+
"shinywidgets",
73+
"seaborn",
74+
"plotnine",
75+
"plotly",
76+
"duckdb",
77+
"holoviews",
78+
"bokeh",
79+
"xarray",
80+
"geopandas",
81+
"geodatasets",
82+
"missingno",
83+
"rsconnect-python",
84+
"scikit-learn",
85+
"folium",
86+
"palmerpenguins",
87+
"faicons",
88+
"ridgeplot",
89+
"great_tables",
90+
]
91+
dev = [
92+
"black>=24.0",
93+
"flake8>=6.0.0",
94+
"flake8-bugbear>=23.2.13",
95+
"Flake8-pyproject>=1.2.3",
96+
"isort>=5.10.1",
97+
"libsass>=0.23.0",
98+
"pyright==1.1.369",
99+
"pre-commit>=2.15.0",
100+
"wheel",
101+
"matplotlib",
102+
"pandas",
103+
"pandas-stubs",
104+
"polars",
105+
"numpy",
106+
"shinyswatch>=0.7.0",
107+
"python-dotenv",
108+
"anthropic",
109+
"google-generativeai;python_version>='3.9'",
110+
"langchain_core",
111+
"openai",
112+
"ollama",
113+
"tokenizers",
114+
"aiohttp",
115+
"beautifulsoup4",
116+
]
117+
doc = [
118+
"jupyter",
119+
"jupyter_client < 8.0.0",
120+
"tabulate",
121+
"shinylive",
122+
"pydantic>=2.7.4",
123+
"quartodoc==0.7.5",
124+
"griffe<1.0.0",
125+
]
126+
127+
[project.urls]
128+
Homepage = "https://github.com/posit-dev/py-shiny"
129+
Documentation = "https://shiny.posit.co/py/"
130+
Repository = "https://github.com/posit-dev/py-shiny"
131+
"Bug Tracker" = "https://github.com/posit-dev/py-shiny/issues"
132+
133+
[project.scripts]
134+
shiny = "shiny._main:main"
135+
136+
[project.entry-points.pytest11]
137+
shiny-test = "shiny.pytest._pytest"
138+
139+
[tool.pytest.ini_options]
140+
testpaths = ["tests"]
141+
142+
[tool.flake8]
143+
extend-exclude = ["docs", ".venv", "venv", "typings", "build", "_dev"]
144+
ignore = ["E302", "E501", "F403", "F405", "W503", "E203", "E701", "E704"]
145+
146+
[tool.isort]
147+
profile = "black"
148+
skip = ["__init__.py", "typings/", "_dev/", ".venv", "venv", ".tox", "build"]

0 commit comments

Comments
 (0)