Skip to content

Commit

Permalink
Project cleanup
Browse files Browse the repository at this point in the history
* Adjusted README.md for standard pip installation. Added information
  on how to handle multiple envs. Used absolute paths instead of
  relative for documentation for when it gets uploaded to other sites

* Adjusted some of the information for uploading to PyPI, tweaked
  the version slightly

* Minor tweaks and nitpicky stuff
  • Loading branch information
tomice committed Sep 29, 2024
1 parent e4e6645 commit 3a4ccda
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 22 deletions.
3 changes: 2 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
include LICENSE
include README.md
include TODO.md
recursive-include git_py_stats *
recursive-include git_py_stats *.py
recursive-include man *
global-exclude *.pyc __pycache__/
prune git_py_stats/tests

22 changes: 14 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,12 @@ to the parent project:
You can check your Python version with:

```bash
python3 --version
python --version
```

If your `python` is symlinked to Python 2, you can use
[`pyenv`](https://github.com/pyenv/pyenv) to switch between Python versions.

- **Git**:
Git should be installed and available in your system's `PATH`.
Expand All @@ -132,11 +135,11 @@ to the parent project:
2. **Install the Package**:
You can install the package locally in editable mode.
You can install the package directly from PyPI.
This allows you to run `git-py-stats` from anywhere on your system.
```bash
pip install -e .
pip install git-py-stats
```
Or you can run it locally without `pip` by doing the following
Expand All @@ -158,7 +161,7 @@ to the parent project:
to be done in the following manner:
```bash
python3 -m git_py_stats.main --help
python -m git_py_stats.main --help
```
### Using `setup.py`
Expand All @@ -168,7 +171,7 @@ If you prefer using `setup.py` directly:
1. **Install the Package**:
```bash
python3 setup.py install
python setup.py install
```
2. **Verify the Installation**:
Expand Down Expand Up @@ -306,17 +309,20 @@ export _MENU_THEME="legacy"
## Contributing
We welcome contributions of all kinds! Please read our
[CONTRIBUTING.md](CONTRIBUTING.md) guide to learn how to get involved.
[CONTRIBUTING.md](https://github.com/tomice/git-py-stats/blob/main/CONTRIBUTING.md)
guide to learn how to get involved.
## Code of Conduct
To ensure a positive and inclusive community, please follow our
[Code of Conduct](CODE_OF_CONDUCT.md) during your interactions.
[Code of Conduct](https://github.com/tomice/git-py-stats/blob/main/CODE_OF_CONDUCT.md)
during your interactions.
## License
This project is licensed under the MIT License.
See the [LICENSE](LICENSE) file for more details.
See the [LICENSE](https://github.com/tomice/git-py-stats/blob/main/LICENSE)
file for more details.
## Author
Expand Down
4 changes: 2 additions & 2 deletions git_py_stats/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ def main() -> None:

# Check if we are inside a Git repository
if not check_git_repository():
print("This is not a Git repository.")
print("Please navigate to a Git repository and try again.")
print("This is not a git repository.")
print("Please navigate to a git repository and try again.")
sys.exit(1)

# Get env config
Expand Down
2 changes: 1 addition & 1 deletion man/git-py-stats.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH GIT-PY-STATS "1" "September 2024" "git-py-stats 0.1" "User Commands"
.TH GIT-PY-STATS "1" "September 2024" "git-py-stats 0.1.0" "User Commands"
.SH NAME
git-py-stats \- A Python implementation of git-quick-stats.

Expand Down
26 changes: 16 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,34 @@
from setuptools import setup, find_packages

# Read the long description from README
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()

setup(
name="git-py-stats",
version="0.1",
packages=find_packages(
exclude=["*.tests", "*.tests.*", "tests.*", "tests"]
), # Exclude test packages
version="0.1.0",
packages=find_packages(),
entry_points={
"console_scripts": [
"git-py-stats=git_py_stats.main:main",
],
},
install_requires=[
# Nothing
],
data_files=[
# Manpages
("share/man/man1", ["man/git-py-stats.1"]),
],
description="A Python Implementation of git-quick-stats",
long_description=open("README.md").read(),
long_description=long_description,
long_description_content_type="text/markdown",
author="Tom Ice",
author_email="contact@thomasice.com",
license="MIT",
url="https://github.com/tomice/git-py-stats",
python_requires=">=3.6",
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
python_requires=">=3.8",
include_package_data=True,
keywords="git stats statistics command-line",
)

0 comments on commit 3a4ccda

Please sign in to comment.