Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix up metadata #176

Merged
merged 41 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
dcce807
Fix up metadata
ayjayt Jan 2, 2025
bcbcf3c
Fix poorly formed toml
ayjayt Jan 2, 2025
3b0a876
Apply automatic fixes to increased ruff strictness
ayjayt Jan 2, 2025
f59535c
Lint import order
ayjayt Jan 2, 2025
0c7864f
Reorganize directories
ayjayt Jan 2, 2025
4b8cd94
Add README about directories
ayjayt Jan 2, 2025
694c6d8
Turns folders in subpackages
ayjayt Jan 2, 2025
b561b95
Rename directories
ayjayt Jan 2, 2025
61bfe44
Resolve linting in _browser.py
ayjayt Jan 2, 2025
cf4708d
Fix script directory path
ayjayt Jan 2, 2025
a959abd
Move diagnose() to un-qa'ed file
ayjayt Jan 2, 2025
f78cf64
Lint _protocol.py
ayjayt Jan 2, 2025
14d02a4
Lint _session.py
ayjayt Jan 2, 2025
97932e5
Lint _target.py
ayjayt Jan 2, 2025
4199182
Lint _pipe.py
ayjayt Jan 2, 2025
625688b
Lint _chrome_wrapper.py
ayjayt Jan 2, 2025
f527787
Lint _system_utils/
ayjayt Jan 2, 2025
698653d
Remove conflicting import sorter
ayjayt Jan 2, 2025
81206c7
Format
ayjayt Jan 2, 2025
755f2f2
Fix bad import syntax
ayjayt Jan 2, 2025
97e44c4
Fix path to chromewrapper
ayjayt Jan 2, 2025
caabce7
Fix some poor access syntax
ayjayt Jan 2, 2025
eadbe96
Fix import to not break __name__
ayjayt Jan 2, 2025
ba36287
Change importation strategy
ayjayt Jan 2, 2025
3901e28
Make protocol available through exports
ayjayt Jan 2, 2025
8160e03
Remove erroneus .py from module
ayjayt Jan 3, 2025
4f7b0c7
Export errors from pipe
ayjayt Jan 3, 2025
2ae6b39
Fix bad lit dict syntax
ayjayt Jan 3, 2025
0e628d1
Move attributes to top of _pipe
ayjayt Jan 3, 2025
aac0d7b
Disable ruff's desire for implicit scope
ayjayt Jan 3, 2025
0f64b18
Basic lint of tests/
ayjayt Jan 3, 2025
84530dc
Add more debugs to _pipe.py
ayjayt Jan 3, 2025
0a13e38
Export more errors
ayjayt Jan 3, 2025
6f4cd04
Fix datetime expression exp. value
ayjayt Jan 3, 2025
b0dc378
Fix up key checker
ayjayt Jan 3, 2025
b6a57e1
Remove positional bool param
ayjayt Jan 3, 2025
2f98811
Run through and fix up tests for changes
ayjayt Jan 3, 2025
c2d4290
Fix script name in cli_utils
ayjayt Jan 3, 2025
ddbe6b4
Fix get_browser()'s use of pathlib
ayjayt Jan 3, 2025
e9b63b3
Fix bad os argument pass (position/name)
ayjayt Jan 3, 2025
f7f6e23
Add await to coroutine
ayjayt Jan 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ repos:
rev: v3.1.0
hooks:
- id: add-trailing-comma
# alternative: isort
# optional comments: # noreorder
- repo: https://github.com/asottile/reorder-python-imports
rev: v3.14.0
hooks:
- id: reorder-python-imports
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.8.2
Expand Down
31 changes: 31 additions & 0 deletions choreographer/DIR_INDEX.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Files
-----

_browser.py

A behemoth: contains process control, future storage, and user's primary interface.

_cli_utils.py

Functions to be used as scripts from commandline.

_pipe.py

The communication layer between choreographer and the browser.

_tab.py

Also part of user's primary interface. Intuitive, the user interacts with a "Browser"
which has "Tabs".

Directories
-----------

_devtools_protocol_layer/

The browser-tab interface is intuitive, but here we have the interface that Chrome's
Devtools Protocol actually provides.

_system_utils/

Some utilities we use to encourage cross-platform compatibility.
35 changes: 21 additions & 14 deletions choreographer/__init__.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
from .browser import Browser
from .browser import browser_which
from .browser import get_browser_path
from .cli_utils import get_browser
from .cli_utils import get_browser_sync
from .tempfile import TempDirectory
from .tempfile import TempDirWarning
"""choreographer is a browser controller for python."""

import choreographer._devtools_protocol_layer as protocol

from ._browser import Browser, BrowserClosedError, browser_which, get_browser_path
from ._cli_utils import get_browser, get_browser_sync
from ._pipe import BlockWarning, PipeClosedError
from ._system_utils._tempfile import TempDirectory, TempDirWarning
from ._tab import Tab

__all__ = [
Browser,
get_browser,
get_browser_sync,
browser_which,
get_browser_path,
TempDirectory,
TempDirWarning,
"BlockWarning",
"Browser",
"BrowserClosedError",
"PipeClosedError",
"Tab",
"TempDirWarning",
"TempDirectory",
"browser_which",
"get_browser",
"get_browser_path",
"get_browser_sync",
"protocol",
]
Loading
Loading