Skip to content

Commit

Permalink
Merge pull request #4 from falkben/rem_setup_py
Browse files Browse the repository at this point in the history
switch to pyproject.toml
  • Loading branch information
falkben authored Oct 20, 2022
2 parents 94efd6f + 9c981dd commit d2ec6f2
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 17 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ jobs:
with:
python-version: "3.10"
cache: "pip"
cache-dependency-path: "**/dev-requirements.txt"

- name: install
run: |
pip install . -r requirements.txt
pip install . -r dev-requirements.txt
- name: pytest
run: pytest
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,17 @@ With this hook installed, when you commit, if a Jira issue is found in your bran
## Developer Notes
todo
### Install for local dev
Create virtual environment then install:
```bash
pip install -r dev-requirements.txt
pip install -e ".[dev]"
```
## Create dev dependency lock file
```bash
pip-compile --extra dev -o dev-requirements.txt pyproject.toml
```
4 changes: 2 additions & 2 deletions requirements.txt → dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is autogenerated by pip-compile with python 3.10
# To update, run:
#
# pip-compile
# pip-compile --extra=dev --output-file=dev-requirements.txt pyproject.toml
#
attrs==22.1.0
# via pytest
Expand All @@ -17,6 +17,6 @@ py==1.11.0
pyparsing==3.0.9
# via packaging
pytest==7.1.3
# via -r requirements.in
# via prepend_jira_issue (pyproject.toml)
tomli==2.0.1
# via pytest
29 changes: 29 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "prepend_jira_issue"
version = "0.0.1"
authors = [
{ name="Benjamin Falk", email="[email protected]" },
]
description = "A small example package"
readme = "README.md"
requires-python = ">=3.8"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]

[project.urls]
"Homepage" = "https://github.com/falkben/pre-commit-prepend-jira-issue"

[project.scripts]
prepend_jira_issue = "prepend_jira_issue:main"

[project.optional-dependencies]
dev = [
"pytest",
]
1 change: 0 additions & 1 deletion requirements.in

This file was deleted.

12 changes: 0 additions & 12 deletions setup.py

This file was deleted.

0 comments on commit d2ec6f2

Please sign in to comment.