Skip to content

Commit

Permalink
Rename to precommend
Browse files Browse the repository at this point in the history
  • Loading branch information
dokempf committed Mar 8, 2024
1 parent d04b473 commit 4cf9855
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Ignore setuptools_scm generated version file
precommit_recommendations/_version.py
precommend/_version.py

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
# Welcome to precommit-recommendations
# Welcome to precommend

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

This a small utility that creates a `.pre-commit-config.yaml` based on the files
in your current working directory and the recommendations of the Scientific Software Center.
`precommend` bootstraps [pre-commit](https://pre-commit.com) configurations based
on the content of your project and the recommendations of the [Scientific Software Center](https://ssc.uni-heidelberg.de)

## Installation

The Python package can be installed with

```
git clone https://github.com/ssciwr/precommit-recommendations.git
cd precommit-recommendations
python -m pip install .
python -m pip install precommend
```

## Usage

Head to a directory that you want to add a config file to and run

```bash
precommit_recommendations
precommend
```

## Acknowledgments
Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions precommend/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# The version file is generated automatically by setuptools_scm
from precommend._version import version as __version__
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from precommit_recommendations.core import (
from precommend.core import (
collect_hooks,
generate_config,
GenerationContext,
Expand Down
2 changes: 1 addition & 1 deletion precommit_recommendations/core.py → precommend/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def directory_exists(self, directory):


def collect_hooks(ctx):
from precommit_recommendations.rules import _rules
from precommend.rules import _rules

hooks = []
for rule in _rules:
Expand Down
File renamed without changes.
2 changes: 0 additions & 2 deletions precommit_recommendations/__init__.py

This file was deleted.

10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ build-backend = "setuptools.build_meta"
# a variety of build tools. Notably, the version specified here is the
# single source of truth for precommit_recommendations's version
[project]
name = "precommit_recommendations"
description = "Add short description here"
name = "precommend"
description = "Opinionated initialization of pre-commit configurations"
readme = "README.md"
maintainers = [
{ name = "Dominic Kempf", email = "[email protected]" },
Expand All @@ -40,14 +40,14 @@ tests = [

# Command line scripts installed as part of the installation
[project.scripts]
precommit_recommendations = "precommit_recommendations.__main__:main"
precommend = "precommend.__main__:main"

# The following section contains setuptools-specific configuration
# options. For a full reference of available options, check the overview
# at https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
[tool.setuptools]
packages = [
"precommit_recommendations",
"precommend",
]

# Configure setuptools_scm, which extracts the version number from
Expand All @@ -56,7 +56,7 @@ packages = [
[tool.setuptools_scm]
version_scheme = "post-release"
local_scheme = "node-and-date"
write_to = "precommit_recommendations/_version.py"
write_to = "precommend/_version.py"

# The following is the configuration for the pytest test suite
[tool.pytest.ini_options]
Expand Down
2 changes: 1 addition & 1 deletion tests/test_core.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from precommit_recommendations.core import *
from precommend.core import *


def test_collect_hooks_python(monkeypatch, python_data):
Expand Down

0 comments on commit 4cf9855

Please sign in to comment.