ped

:mans_shoe: Quickly open Python modules in your text editor

https://github.com/sloria/ped

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.2%) to scientific vocabulary

Keywords

cli command-line editing python python3

Keywords from Contributors

serializer yolov5s mesh packaging pypi reaction energy-systems rdf energy-system-model hydrology
Last synced: 6 months ago · JSON representation

Repository

:mans_shoe: Quickly open Python modules in your text editor

Basic Info
Statistics
  • Stars: 45
  • Watchers: 3
  • Forks: 3
  • Open Issues: 0
  • Releases: 0
Topics
cli command-line editing python python3
Created over 10 years ago · Last pushed 6 months ago
Metadata Files
Readme License Notice

README.rst

===
ped
===

.. image:: https://badgen.net/pypi/v/ped
  :alt: pypi badge
  :target: https://pypi.org/project/ped/

.. image:: https://github.com/sloria/ped/actions/workflows/build-release.yml/badge.svg
    :alt: build status
    :target: https://github.com/sloria/ped/actions/workflows/build-release.yml
    
Quickly open Python modules in your text editor.

.. code-block:: bash

    $ ped django
    $ ped django.core.urlresolvers
    $ ped django.views.generic.TemplateView

    # Partial name matching
    $ ped django.http.resp
    Editing django.http.response...
    ...Done.

    # Specify which editor to use
    $ PED_EDITOR=vim ped django.shortcuts


``ped`` will find your modules in the currently-active virtual environment.


Get it now
**********

From PyPI:

::

    $ pip install ped


Or, run it with `pipx `_:

::

    $ pipx run ped --help


Changing the default editor
***************************

``ped`` will try to use your favorite text editor. If you want to override the editor ``ped`` uses, set the ``PED_EDITOR`` environment variable.

.. code-block:: bash

    # .zshrc or .bashrc
    # Use vim with ped
    export PED_EDITOR=vim


Opening directories
*******************

By default, ``ped`` will open ``__init__.py`` files when a package name is passed.
If you would rather open the package's directory, set the ``PED_OPEN_DIRECTORIES`` environment variable.

.. code-block:: bash

    # .zshrc or .bashrc
    # Open package directories instead of __init__.py
    export PED_OPEN_DIRECTORIES=1


Tab-completion
**************

The ped package contains tab-completion scripts for bash and zsh. Place these files in your system's completion directories. The ``ped.install_completion`` module can be run as a script to output the files to a given location. It determines the correct completion file from
the ``$SHELL`` environment variable.

Bash completion
---------------

To install bash completion, run::

    # The path given here will depend on your OS
    $ python -m ped.install_completion > /usr/local/etc/bash_completion.d

Zsh completion
---------------

To install zsh completion, run::

    # The path given here will depend on your OS
    $ python -m ped.install_completion > /usr/local/share/zsh/site-functions/_ped

Editor integrations
*******************

- `vim-ped `_

Kudos
*****

This was inspired by `IPython's `_ ``%edit`` magic.


Changelog
*********

3.0.0 (2024-01-18)
------------------

- Publish type information.
- Test against Python 3.8-3.12. Older versions of Python are no longer supported.
- *Backwards-incompatible*: Remove ``ped.__version__`` attribute.
  Use ``importlib.metadata.version("ped")`` instead.

2.1.0 (2020-03-18)
------------------

- Set ``PED_OPEN_DIRECTORIES=1`` to open package directories instead of
  opening ``__init__.py`` files. Thanks `Alex Nordin `_.

2.0.1 (2018-01-27)
------------------

Bug fixes:

- Properly handle imports that don't correspond to a file.

2.0.0 (2019-01-22)
------------------

- Drop support for Python 2.7 and 3.5. Only Python>=3.6 is supported.
- ``ped`` can be run its own virtual environment separate from the
  user's virtual environment. Therefore, ped can be installed with
  pipsi or pipx.
- ``install_completion`` script writes to ``stdout`` and detemrmines
  script from ``$SHELL``.

1.6.0 (2019-01-14)
------------------

- Test against Python 3.7.

Note: This is the last version to support Python 2.

1.5.1
-----

- Minor code cleanups.
- Test against Python 2.7, 3.5, and 3.6. Support for older versions is dropped.

1.5.0
-----

- Support tab-completion in bash and zsh. Thanks `Thomas Kluyver `_.

1.4.0
-----

- Add ``--info`` argument for outputting name, file path, and line number of modules/functions/classes.
- Fix: Support line numbers in gvim.

1.3.0
-----

- If a class or function is passed, the editor will open up the file at the correct line number (for supported editors).

1.2.1
-----

- Fix for Py2 compatibility.

1.2.0
-----

- Add partial name matching.

1.1.0
-----

- Add support for editing functions and classes.

1.0.2
-----

- Fix for editing subpackages, e.g. ``ped pkg.subpkg``.

Owner

  • Name: Steven Loria
  • Login: sloria
  • Kind: user
  • Location: Brooklyn, NY

Always a student, forever a junior developer

GitHub Events

Total
  • Watch event: 2
  • Delete event: 12
  • Push event: 13
  • Pull request event: 21
  • Create event: 11
Last Year
  • Watch event: 2
  • Delete event: 12
  • Push event: 13
  • Pull request event: 21
  • Create event: 11

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 201
  • Total Committers: 8
  • Avg Commits per committer: 25.125
  • Development Distribution Score (DDS): 0.532
Past Year
  • Commits: 21
  • Committers: 2
  • Avg Commits per committer: 10.5
  • Development Distribution Score (DDS): 0.048
Top Committers
Name Email Commits
Steven Loria s****1@g****m 94
dependabot-preview[bot] 2****] 48
pre-commit-ci[bot] 6****] 34
dependabot[bot] s****t@d****m 17
Thomas Kluyver t****l@g****m 5
dependabot[bot] 4****] 1
Alexander Nordin a****n@b****m 1
Chad Smith c****d@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 3
  • Total pull requests: 150
  • Average time to close issues: 1 day
  • Average time to close pull requests: 7 days
  • Total issue authors: 2
  • Total pull request authors: 7
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.13
  • Merged pull requests: 145
  • Bot issues: 1
  • Bot pull requests: 138
Past Year
  • Issues: 0
  • Pull requests: 26
  • Average time to close issues: N/A
  • Average time to close pull requests: 1 day
  • Issue authors: 0
  • Pull request authors: 2
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 25
  • Bot issues: 0
  • Bot pull requests: 26
Top Authors
Issue Authors
  • sloria (2)
  • dependabot-preview[bot] (1)
Pull Request Authors
  • dependabot-preview[bot] (68)
  • pre-commit-ci[bot] (61)
  • dependabot[bot] (9)
  • sloria (9)
  • anordin95 (1)
  • takluyver (1)
  • cs01 (1)
Top Labels
Issue Labels
Pull Request Labels
dependencies (77) python (4) github_actions (4)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 60 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 3
  • Total versions: 17
  • Total maintainers: 1
pypi.org: ped

Quickly open Python modules in your text editor.

  • Versions: 17
  • Dependent Packages: 0
  • Dependent Repositories: 3
  • Downloads: 60 Last month
Rankings
Dependent repos count: 9.0%
Dependent packages count: 10.0%
Stargazers count: 10.2%
Average: 13.8%
Forks count: 16.8%
Downloads: 23.0%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/build-release.yml actions
  • actions/checkout v3.1.0 composite
  • actions/setup-python v4.3.0 composite
pyproject.toml pypi