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

Re-evaluate public API #8

Closed
rth opened this issue Jul 19, 2022 · 1 comment · Fixed by #14
Closed

Re-evaluate public API #8

rth opened this issue Jul 19, 2022 · 1 comment · Fixed by #14

Comments

@rth
Copy link
Member

rth commented Jul 19, 2022

Before making a public release of the package it might be good to re-evaluate what is exposed as the public API.

Looking at https://github.com/pyodide/pytest-pyodide/blob/main/pytest_pyodide/__init__.py generally, it looks OK, however,

  • I think we should probably not expose all the *Wrapper as the top-level import. Having them under pytest_pyodide.browser sounds more reasonable particularly given that users would use them via fixture and not directly
  • Actually maybe renaming them to,
     # private
      "_BrowserBaseRunner",
     "_SeleniumBaseRunner",
     "_PlaywrightBaseRunner",
     # public
     "SeleniumFirefoxRunner",
     "SeleniumChromeRunner",
     "PlaywrightChromeRunner",
     "PlaywrightFirefoxRunner",
     `NodeRunner`
    
    might be better? Wrapper is an odd name that could be improved IMO in this context. And if we do this rename browser.py to runner.py
  • not sure why we from fixtures import * but I would be +1 to remove it, and let users from pytest_pyodide.fixtues import .. explicitly

cc @ryanking13

@ryanking13
Copy link
Member

  • I think we should probably not expose all the *Wrapper as the top-level import. Having them under pytest_pyodide.browser sounds more reasonable particularly given that users would use them via fixture and not directly

Yes, that sounds reasonable to me.

  • Wrapper is an odd name that could be improved IMO in this context. And if we do this rename browser.py to runner.py

I'm +1 with it.

  • not sure why we from fixtures import * but I would be +1 to remove it,

I think we don't need that line anymore, that line was needed before we package pytest-pyodide, but now pytest11 entrypoint will register those fixtures automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants