Skip to content

Commit

Permalink
chore: update pyproject.toml (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
Snoopy1866 authored Nov 10, 2024
1 parent 74147e9 commit e5f35eb
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 71 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: "requirements-dev.txt"
cache-dependency-path: "pyproject.toml"

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
pip install .[dev]
- name: Run pytest and capture output
run: |
Expand Down
5 changes: 4 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ build:
# Declare the Python requirements required
python:
install:
- requirements: docs/requirements.txt
- method: pip
path: .
extra_requirements:
- docs

# Build documentation in the "docs/" directory with Sphinx
sphinx:
Expand Down
5 changes: 3 additions & 2 deletions README-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Size(41.59499160228066)
2. Install dependencies

```bash
pip install -r requirements.txt
pip install .[docs]
```

3. Change to the documentation directory
Expand All @@ -66,7 +66,8 @@ Size(41.59499160228066)
4. Build the documentation

```bash
make clean && make html
make clean
make html
```

You can view the generated documentation in the `docs/build/html` directory by opening `index.html` in your browser.
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Size(41.59499160228066)
2. 安装依赖

```bash
pip install -r requirements.txt
pip install .[docs]
```

3. 安装 pre-commit
Expand All @@ -73,7 +73,8 @@ Size(41.59499160228066)
5. 构建文档

```bash
make clean && make html
make clean
make html
```

你可以在 `docs/build/html` 目录下看到生成的文档,双击 `index.html` 即可在浏览器中查看。
Expand Down
11 changes: 0 additions & 11 deletions docs/requirements.txt

This file was deleted.

93 changes: 50 additions & 43 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,53 +1,21 @@
# pytest configuration
[tool.pytest.ini_options]
minversion = "8.0"
addopts = "-ra -q -l --tb=auto --color=yes"
testpaths = [
"tests"
]
pythonpath = ["src"]
verbosity_test_cases = 2
verbosity_assertions = 2

# isort configuration
[tool.isort]
profile = "black"
skip_gitignore = true

# black configuration
[tool.black]
line-length = 120
target-version = [
"py310",
"py311",
"py312",
"py313"
]
required-version = "24"


# build configuration
[build-system]
requires = [
"setuptools"
]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "pystatpower"
description = "A Power Analysis Toolkit for Python"
license = { text = "GPL-3.0" }
requires-python = ">=3.10"
authors = [
{ name = "Snoopy1866", email = "[email protected]" }
]
authors = [{ name = "Snoopy1866", email = "[email protected]" }]
keywords = [
"mathematics",
"statistics",
"power analysis",
"sample size",
"power",
"hypothesis"
"hypothesis",
]
classifiers = [
"Development Status :: 3 - Alpha",
Expand All @@ -58,16 +26,35 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Mathematics"
]
dependencies = [
"scipy>=1.12.0"
"Topic :: Scientific/Engineering :: Mathematics",
]
dependencies = ["scipy>=1.12.0"]
readme = { file = "README.md", content-type = "text/markdown" }
dynamic = [
"version"
]
dynamic = ["version"]

[project.optional-dependencies]
dev = [
"scipy>=1.12.0",
"black==24.10.0",
"esbonio==0.16.5",
"isort==5.13.2",
"pre-commit==4.0.1",
"pytest==8.3.3",
"pytest-cov==6.0.0",
]
docs = [
"jieba==0.42.1",
"myst-parser==4.0.0",
"sphinx==8.1.3",
"sphinx-autobuild==2024.10.3",
"sphinx-autodoc2==0.5.0",
"sphinx-book-theme==1.1.3",
"sphinx-copybutton==0.5.2",
"sphinx-issues==5.0.0",
"sphinx-notfound-page==1.0.4",
"sphinx-togglebutton==0.3.2",
"sphinx_tippy==0.4.3",
]

[project.urls]
Homepage = "https://github.com/PyStatPower/PyStatPower"
Expand All @@ -76,6 +63,26 @@ Repository = "https://github.com/PyStatPower/PyStatPower.git"
Issues = "https://github.com/PyStatPower/PyStatPower/issues"
Changelog = "https://github.com/PyStatPower/PyStatPower/blob/main/CHANGELOG.md"


# setuptools configuration
[tool.setuptools.dynamic]
version = { attr = "pystatpower.__version__" }

# pytest configuration
[tool.pytest.ini_options]
minversion = "8.0"
addopts = "-ra -q -l --tb=auto --color=yes"
testpaths = ["tests"]
pythonpath = ["src"]
verbosity_test_cases = 2
verbosity_assertions = 2

# isort configuration
[tool.isort]
profile = "black"
skip_gitignore = true

# black configuration
[tool.black]
line-length = 120
target-version = ["py310", "py311", "py312", "py313"]
required-version = "24"
9 changes: 0 additions & 9 deletions requirements-dev.txt

This file was deleted.

1 change: 0 additions & 1 deletion requirements.txt

This file was deleted.

0 comments on commit e5f35eb

Please sign in to comment.