Skip to content

Commit

Permalink
Merge pull request #35 from asmeurer/build-backend
Browse files Browse the repository at this point in the history
Migrate to `hatch` and `hatch-vcs`
  • Loading branch information
Saransh-cpp authored Sep 4, 2023
2 parents d3ba3f9 + e10e009 commit 685b628
Show file tree
Hide file tree
Showing 13 changed files with 112 additions and 2,399 deletions.
1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ jobs:
run: |
ruff --select=A,B,E,F,PLC,PLE,PLW,SIM,W --ignore=B023,B904,E402,PLC1901,SIM115,B018 --line-length=263 --statistics .
python -We:invalid -We::SyntaxWarning -m compileall -f -q removestar/
- name: Test
run: |
pytest
- name: Install
run: |
python -m pip install .
- name: Test
run: |
pytest
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,9 @@ venv.bak/

# mypy
.mypy_cache/

# ruff
.ruff_cache/

# hatch-vcs
removestar/_version.py
3 changes: 0 additions & 3 deletions MANIFEST.in

This file was deleted.

5 changes: 0 additions & 5 deletions conftest.py

This file was deleted.

98 changes: 98 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"

[project]
name = "removestar"
readme = { file = "README.md", content-type = "text/markdown" }
dynamic = ["version"]
description = "A tool to automatically replace 'import *' imports with explicit imports in files"
license = "MIT"
requires-python = ">=3.7"
authors = [
{ name = "Aaron Meurer", email = "[email protected]" },
]
maintainers = [
{name = "Saransh Chopra", email = "[email protected]"}
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
dependencies = [
"pyflakes",
]

[project.optional-dependencies]
dev = [
"pytest>=6",
"pytest-cov>=3",
"pytest-doctestplus"
]


[project.scripts]
removestar = "removestar.__main__:main"

[project.urls]
"Bug Tracker" = "https://github.com/asmeurer/removestar/issues"
Homepage = "https://www.asmeurer.com/removestar/"
"Source Code" = "https://github.com/asmeurer/removestar"

[tool.hatch]
version.source = "vcs"
build.hooks.vcs.version-file = "removestar/_version.py"

[tool.hatch.build.targets.sdist]
include = [
"/removestar",
]

[tool.ruff]
select = [
"E", "F", "W", # flake8
"B", "B904", # flake8-bugbear
"I", # isort
"C4", # flake8-comprehensions
"ISC", # flake8-implicit-str-concat
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"RUF", # Ruff-specific
"SIM", # flake8-simplify
"T20", # flake8-print
"UP", # pyupgrade
"YTT", # flake8-2020
]
extend-ignore = [
"E501", # Line too long
]
src = ["src"]
unfixable = [
"T20", # Removes print statements
"F841", # Removes unused variables
]

[tool.pytest.ini_options]
minversion = "6.0"
xfail_strict = true
addopts = [
"--doctest-modules"
]
testpaths = [
"tests",
]
log_cli_level = "DEBUG"
filterwarnings = [
"error",
"ignore::DeprecationWarning",
"ignore::UserWarning",
]
2 changes: 0 additions & 2 deletions pytest.ini

This file was deleted.

4 changes: 1 addition & 3 deletions removestar/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
from ._version import __version__ # noqa: F401
Loading

0 comments on commit 685b628

Please sign in to comment.