Closed lukasschwab closed 1 year ago
It may be possible to go back to a package pattern where arxiv
is still available via import arxiv
(i.e. without breaking the usage forced by this change). Start by reverting this change, then introducing submodules. One could write
from arxiv import arxiv, query_helpers
directly accessing the modules arxiv.arxiv
and arxiv.query_helpers
, or just
import arxiv
using arxiv/__init__.py's import, which makes the API available without specifying the submodule. I suppose the real problem this PR tries to solve is that the package structure is unwieldy for a package containing a single module––we get usable, but unnecessarily verbose, documentation.
This PR may be closed in favor of #84, which introduces submodules––
query
is exported by default, so import arxiv
allows for the usage arxiv.Query(...)
.category
must be imported explicitly, i.e. with from arxiv import category
.Closing: stale.
Description
Rearranges package files and updates package scripts accordingly without changing package behavior.
import
pattern:import arxiv
.from arxiv import arxiv
pattern and docs/README inconsistency.Concern: we may want to add submodules to this package, e.g. to assist in query string construction. We shouldn't merge this change until we're confident it doesn't preclude or complicate adding submodules.
Breaking changes
from arxiv import arxiv
. This was an antipattern for a simple package;import arxiv
provided exactly the same functionality.Relevant issues
Discussed on #68: https://github.com/lukasschwab/arxiv.py/pull/68#issuecomment-855306345
Checklist
README.md
example usage has been updated.