Skip to content

Commit bdefe0c

Browse files
vsysoevSysoev, VladimirИван Горбунов
authored
add .readthedocs.yaml file with default build approach (#166)
* add .readthedocs.yaml file with default build approach * move files out source dir in docs * add requirements sphinx-rtd-theme in docs * moved documentation files to source back * remove pre_build. no target doc found * move conf.py in docs directory * regenerated conf.py * added extenstion to doc gen * add _static to build docs * fixed issue with autodoc * fixed path to sources of pygats * fix for conf.py * add make html * debug building online * playing with path to src of pygats * changed theme * debug of path to module * fix recog * debug module path * debugging pygats.pygats * another debug * more debug * fix recog module * +1 debug * fix misc module * test for pygats docs * test for pygats docs * test for pygats docs * return pygats * change path in conf.py * clear cash * revert Makefile * revert path * test for pygats docs * revert doc pygats and add clean for build * revert * change imports * change imports * change imports for pygats * change imports for pygats * change imports for misc * change imports for pygats * revert imports * add new path for requirements * add new path for requirements * change imports * change imports * change imports * change imports for pygats * change path for conf.py * change path for conf.py * change path for conf.py * change path for conf.py + add imports in init * change imports in formatters, pygats, recog * remove imports init * remove imports init * revert path in conf.py * test with requirements fix * test with requirements fix * clear up docs/requirements * add new depen in pyproject.toml * fix path in conf.py * fix path in conf.py * fix path in conf.py * add new depend in requirements * fix pygats in docs * mock pyautogui * add depend.. * change levenshtein * return python_Levenshtein and mock it * change python version for docs * add class ROI for recog * add functions for recog docs * add functions for misc docs * revert misc * add functions for misc docs * add functions for formatters docs * add functions for pygats and recog docs * remove double pygats for all files * change path * change path * change path 2 remove double pygats * would like to check logs * change path 2 remove double pygats * test with rename folder * test with rename folder * revert name folder * revert name folder * change path in conf.py * change import in recog * revert import in recog and docs path * change path in api.rst * revert imports * change imports in misc and recog * remove double pygats * remove double pygats * revert imports * remove double pygat * remove double pygats * try to prohibit full module names * try to fix double path * revert all * try to prohibit full module names * add functions in init * remove ban on modules * change imports for recog and misc * change imports for recog and misc * revert all * add whitespace for init.py in pygats * test Google-style support docstring --------- Co-authored-by: Sysoev, Vladimir <i@vsysoev.ru> Co-authored-by: Иван Горбунов <muervos@muervos.muervos>
1 parent fc6f616 commit bdefe0c

10 files changed

Lines changed: 86 additions & 119 deletions

File tree

.readthedocs.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Read the Docs configuration file for Sphinx projects
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
4+
# Required
5+
version: 2
6+
7+
# Set the OS, Python version and other tools you might need
8+
build:
9+
os: ubuntu-22.04
10+
tools:
11+
python: "3.10"
12+
# You can also specify other tool versions:
13+
# nodejs: "20"
14+
# rust: "1.70"
15+
# golang: "1.20"
16+
#
17+
# Build documentation in the docs/ directory with Sphinx
18+
sphinx:
19+
configuration: docs/source/conf.py
20+
21+
# Optionally build your docs in additional formats such as PDF and ePub
22+
# formats:
23+
# - pdf
24+
# - epub
25+
26+
# Optional but recommended, declare the Python requirements required
27+
# to build your documentation
28+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
29+
python:
30+
install:
31+
- requirements: docs/requirements.txt

docs/_static/.placeholder

Whitespace-only changes.

docs/requirements.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
sphinx-rtd-theme
2+
pyautogui
3+
hdbscan
4+
numpy>=1.21.6
5+
Pillow==10.3.0
6+
pyautogui==0.9.54
7+
pyperclip==1.8.2
8+
pytesseract==0.3.10
9+
pytest==7.2.2
10+
hdbscan==0.8.40
11+
python_Levenshtein==0.20.9
12+
colorama==0.4.6
13+
opencv-python==4.10.0.84
14+
mss==9.0.1
15+
qat==1.1.2
16+
pyyaml==5.3.1
17+
pyscreeze==0.1.21

docs/source/conf.py

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
1+
2+
# Configuration file for the Sphinx documentation builder.
3+
#
4+
# For the full list of built-in configuration values, see the documentation:
5+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
6+
7+
# -- Project information -----------------------------------------------------
8+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
9+
import os
10+
import sys
11+
from pathlib import Path
12+
sys.path.insert(0, os.path.abspath('../../src'))
13+
14+
autodoc_mock_imports = ['pyautogui', 'mouseinfo']
15+
116
project = 'pyGATs'
2-
copyright = '2023, Vladimir Sysoev'
17+
copyright = '2025, Vladimir Sysoev'
318
author = 'Vladimir Sysoev'
19+
release = '0.1.0'
420

5-
release = '0.0'
6-
version = '0.1.0'
7-
8-
# -- General configuration
21+
# -- General configuration ---------------------------------------------------
22+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
923

1024
extensions = [
1125
'sphinx.ext.duration',
@@ -14,20 +28,18 @@
1428
'sphinx.ext.autosummary',
1529
'sphinx.ext.intersphinx',
1630
'sphinx.ext.viewcode',
17-
'sphinx.ext.todo'
31+
'sphinx.ext.todo',
32+
'sphinx.ext.napoleon'
1833
]
1934

20-
intersphinx_mapping = {
21-
'python': ('https://docs.python.org/3/', None),
22-
'sphinx': ('https://www.sphinx-doc.org/en/master/', None),
23-
}
24-
intersphinx_disabled_domains = ['std']
25-
2635
templates_path = ['_templates']
36+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
2737

28-
# -- Options for HTML output
38+
root_doc = 'index'
2939

30-
html_theme = 'sphinx_rtd_theme'
3140

32-
# -- Options for EPUB output
33-
epub_show_urls = 'footnote'
41+
# -- Options for HTML output -------------------------------------------------
42+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
43+
44+
html_theme = 'sphinx_rtd_theme'
45+
html_static_path = ['_static']

docs/source/formatters.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,4 @@ formatters
33
##########
44

55
.. automodule:: pygats.formatters
6-
7-
.. autoclass:: pygats.formatters.MarkdownFormatter
8-
:members:
6+
:members:

docs/source/misc.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
##########
2-
formatters
2+
misc. functions
33
##########
44

55
.. automodule:: pygats.misc
6+
:members:

docs/source/pygats.rst

Lines changed: 2 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,6 @@
11
##########
2-
pygats
2+
Main functions and classes
33
##########
44

55
.. automodule:: pygats.pygats
6-
7-
.. autoclass:: pygats.pygats.Context
8-
:members:
9-
10-
.. autoclass:: pygats.pygats.TestException
11-
:members:
12-
13-
.. autofunction:: platform_specific_image
14-
15-
.. autofunction:: begin_test
16-
17-
.. autofunction:: check
18-
19-
.. autofunction:: suite
20-
21-
.. autofunction:: step
22-
23-
.. autofunction:: screenshot
24-
25-
.. autofunction:: log_image
26-
27-
.. autofunction:: passed
28-
29-
.. autofunction:: failed
30-
31-
.. autofunction:: check_image
32-
33-
.. autofunction:: locate_on_screen
34-
35-
.. autofunction:: move_to_coord
36-
37-
.. autofunction:: move_to
38-
39-
.. autofunction:: click_right_button
40-
41-
.. autofunction:: click_left_button
42-
43-
.. autofunction:: click
44-
45-
.. autofunction:: ctrl_with_key
46-
47-
.. autofunction:: alt_with_key
48-
49-
.. autofunction:: drag_to
50-
51-
.. autofunction:: move
52-
53-
.. autofunction:: keyboard
54-
55-
.. autofunction:: press
56-
57-
.. autofunction:: typewrite
58-
59-
.. autofunction:: print_test_summary
60-
61-
.. autofunction:: repeater
62-
63-
.. autofunction:: filter_rect_sorted
64-
65-
.. autofunction:: find_contours
66-
67-
.. autofunction:: draw_contours
68-
69-
.. autofunction:: random_string
70-
71-
.. autofunction:: run
6+
:members:

docs/source/recog.rst

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,6 @@
11
##########
2-
pygats
2+
Recognition functions
33
##########
44

55
.. automodule:: pygats.recog
6-
7-
.. autoclass:: pygats.recog.SearchedText
8-
:members:
9-
10-
.. autofunction:: step
11-
12-
.. autofunction:: check_text
13-
14-
.. autofunction:: check_text_on_screen
15-
16-
.. autofunction:: click_text
17-
18-
.. autofunction:: recognize_text_with_data
19-
20-
.. autofunction:: combine_words_in_lines
21-
22-
.. autofunction:: combine_lines
23-
24-
.. autofunction:: find_text
25-
26-
.. autofunction:: recognize_text
27-
28-
.. autofunction:: find_fuzzy_text
29-
30-
.. autofunction:: find_regexp_text
31-
32-
.. autofunction:: find_cropped_text
33-
34-
.. autofunction:: find_text_on_screen
6+
:members:

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ dependencies = [
2424
'opencv-python',
2525
'numpy',
2626
'colorama',
27-
'mss'
27+
'mss',
28+
'hdbscan'
2829
]
2930
license = {file = "LICENSE"}
3031

src/pygats/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
testing.
55
"""
66

7-
__all__ = ["formatters", "pygats", "misc"]
7+
__all__ = ["formatters", "pygats", "misc", "recog"]

0 commit comments

Comments
 (0)