Skip to content

Commit 08df1f6

Browse files
committed
fix: update tests/docs to use pyproject defs
1 parent 25f556b commit 08df1f6

File tree

7 files changed

+18
-142
lines changed

7 files changed

+18
-142
lines changed

.ci/native.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ echo $PYTHON_VERSION
4545
$PYTHON_VERSION --version
4646

4747
($PYTHON_VERSION -m pip freeze | grep black 1>/dev/null 2>&1) || $PYTHON_VERSION -m pip install black==21.7b0
48-
$PYTHON_VERSION -m pip install pylint==2.6.0 pytest==6.2.5
49-
$PYTHON_VERSION -m pip install -r rustfst-python/requirements-setup.txt
48+
$PYTHON_VERSION -m pip install -e '.[tests]'
5049

5150
cd rustfst-python
5251
$PYTHON_VERSION -m setup.py develop

.github/workflows/native.yml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -232,11 +232,9 @@ jobs:
232232
with:
233233
python-version: ${{ env.PYTHON_VERSION }} # Version range or exact version of a Python version to use, using SemVer's version range syntax
234234
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
235-
- name: Build rustfst-python
235+
- name: Build rustfst-python and install test tools
236236
run: |
237-
pip install pylint==2.6.0 pytest==6.2.5
238-
pip install -r rustfst-python/requirements-setup.txt
239-
pip install -e rustfst-python
237+
pip install -e ".[tests]"
240238
- name: Test rustfst-python
241239
run: python -m pytest -s --cache-clear --disable-warnings rustfst-python
242240

@@ -255,16 +253,13 @@ jobs:
255253
with:
256254
python-version: ${{ env.PYTHON_VERSION }} # Version range or exact version of a Python version to use, using SemVer's version range syntax
257255
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
258-
- name: Build rustfst-python
256+
- name: Build rustfst-python and install docs tools
259257
run: |
260-
pip install -r rustfst-python/requirements-setup.txt
261-
pip install -e rustfst-python
262-
- name: Install mkdocs
263-
run: pip install -r rustfst-python/requirements-mkdocs.txt
258+
pip install -e ".[docs]"
264259
- name: Test doc generation
265260
run: |
266261
cd rustfst-python
267-
mkdocs build -s
262+
mkdocs build
268263
269264
publish-python-doc:
270265
name: Publish rustfst-python's doc
@@ -290,13 +285,11 @@ jobs:
290285
- uses: actions/setup-python@v5
291286
with:
292287
python-version: ${{ env.PYTHON_VERSION }}
293-
- run: pip install -r rustfst-python/requirements-setup.txt
294-
- run: pip install -e rustfst-python
295-
- run: pip install -r rustfst-python/requirements-mkdocs.txt
288+
- run: pip install -e ".[docs]"
296289
- run: git config user.name ${{ env.GIT_COMMITTER_NAME }}
297290
- run: git config user.email ${{ env.GIT_COMMITTER_EMAIL }}
298291
- run: git fetch origin gh-pages --depth=1
299-
- run: cd rustfst-python && mkdocs build -s
292+
- run: cd rustfst-python && mkdocs build
300293
- name: Deploy Doc to latest
301294
if: github.ref == 'refs/heads/main'
302295
run: cd rustfst-python && mike deploy --push latest

pyproject.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,16 @@ classifiers = [
3131

3232
[project.optional-dependencies]
3333
tests = [ "pytest>=6,<7", "pylint" ]
34+
docs = [
35+
"mike",
36+
"mkdocstrings[python]",
37+
"mkdocs-material",
38+
"mkdocs-literate-nav",
39+
"mkdocs-gen-files",
40+
"mkdocs-section-index",
41+
"mkdocs-macros-plugin",
42+
]
43+
3444

3545
# This was in setup.py but is no longer relevant (it's not for Mac OS X)
3646
# options={"bdist_wheel": {"universal": True}},

rustfst-python/requirements-mkdocs.in

Lines changed: 0 additions & 8 deletions
This file was deleted.

rustfst-python/requirements-mkdocs.txt

Lines changed: 0 additions & 102 deletions
This file was deleted.

rustfst-python/requirements-setup.in

Lines changed: 0 additions & 1 deletion
This file was deleted.

rustfst-python/requirements-setup.txt

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)