A CLI tool for extracting and outlining the structure of Python code.
Project description
PyCodeMap
Version: 1.0.0
Description
PyCodeMap is a command-line tool to extract and outline the structure of Python code. It helps developers visualize the organization of classes, methods, functions, and attributes in their projects, providing a clear and detailed overview.
Installation
You can install PyCodeMap directly from PyPI:
pip install pycodemap
Usage
After installation, you can run the tool using the pycodemap command.
Basic Commands
-
Analyze the current directory:
pycodemap . -
Save the output to a file:
pycodemap . -o structure.txt pycodemap . --output structure.txt
-
Show only functions:
pycodemap . -c pycodemap . --functions-only
-
Show only classes:
pycodemap . -c pycodemap . --classes-only
-
Exclude attributes from the output:
pycodemap . -a pycodemap . --no-attributes
-
Minimalistic output:
pycodemap . -m pycodemap . --minimalistic
-
Exclude specific directories or files:
pycodemap . -i "dir_to_ignore|file_to_ignore" pycodemap . --ignore "dir_to_ignore|file_to_ignore"
You can combine multiple options to get the desired output.
pycodemap . -cam -i "dir_to_ignore|file_to_ignore"
pycodemap . --classes-only --no-attributes --minimalistic --ignore "dir_to_ignore|file_to_ignore"
Вы правы, в раздел для контрибьюторов обычно включают инструкции по созданию форка репозитория, так как контрибьюторы не всегда имеют прямой доступ для записи в основной репозиторий. Вот исправленная версия с учётом процесса форка и создания pull request:
Contributing
How to contribute
Follow these steps to set up your development environment and submit your changes:
-
Fork the repository:
- Go to the PyCodeMap repository on GitHub.
- Click the "Fork" button in the top-right corner to create your own copy of the repository.
-
Clone your forked repository:
git clone https://github.com/your_username/PyCodeMap.git cd PyCodeMap
-
Install pycodemap in editable mode from source code:
pip install -e .
Now you can develop and test your changes locally by running
pycodemap. All changes will be automatically reflected in your local installation. -
Create a new branch for your feature or bugfix:
git checkout -b your-feature-branch
-
Set up
pre-committo ensure code quality:pip install pre-commit pre-commit install
Before committing your changes,
pre-commitchecks your code for formatting. If issues are found, the commit process halts, andpre-commitautomatically resolves them. You'll need to stage these changes and try to commit again. -
Make your changes and write tests.
-
Run all tests:
pytest
-
Commit your changes and push them to your forked repository:
git push origin your-feature-branch
-
Create a pull request:
- Go to the original PyCodeMap repository.
- Click "Pull Requests" and then "New Pull Request."
- Select your branch from your forked repository and create the pull request.
Guidelines
- Ensure your code is formatted with
black. - Use
isortfor imports andautoflaketo remove unused imports. - Check your code with
pylintusing configuration from.pylintrc. - Write tests for any new features or bug fixes.
- Provide a clear description of the changes in your pull request.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pycodemap-1.0.0.tar.gz.
File metadata
- Download URL: pycodemap-1.0.0.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c57ed47608c5541705ef7b53fc60ad1691174bb9953fb794a07dd8a111e985e
|
|
| MD5 |
28edd9ee677f78a420077288fbed8adb
|
|
| BLAKE2b-256 |
7e4e3574298d37f08285a6a0632dc05591803f5e4e2501def1af00b880eb2c2b
|
File details
Details for the file pycodemap-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pycodemap-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8dc67451034e871edb5110b4477ede0f32069922d17e5dbf13197bbed0eada6
|
|
| MD5 |
7ef04863536e2cd674f03a007cf9b9e7
|
|
| BLAKE2b-256 |
0e0bced44388b5f1b3c32458bca83141eca00860897c9756b218a6b0f221f157
|