Skip to content

Commit 165dd0d

Browse files
committed
Cleanup project files and update configuration
Remove unused project files including Copier, archival, and CD workflow files. Simplify CI workflow, update pre-commit hooks, and clean up README badges and installation instructions. Bump project version to 1.0.0 and streamline pyproject.toml dependencies and configuration.
1 parent 8fbb524 commit 165dd0d

File tree

8 files changed

+9
-259
lines changed

8 files changed

+9
-259
lines changed

.copier-answers.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

.git_archival.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

.gitattributes

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/workflows/cd.yml

Lines changed: 0 additions & 60 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 6 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ concurrency:
1212
cancel-in-progress: true
1313

1414
env:
15-
# Many color libraries just need this variable to be set to any value.
16-
# Set it to 3 to support 8-bit color graphics (256 colors per channel)
17-
# for libraries that care about the value set.
1815
FORCE_COLOR: 3
1916

2017
jobs:
@@ -27,51 +24,27 @@ jobs:
2724
fetch-depth: 0
2825
- uses: actions/setup-python@v6
2926
with:
30-
python-version: "3.x"
31-
27+
python-version: "3.12"
3228
- uses: astral-sh/setup-uv@v7
33-
3429
- uses: pre-commit/action@v3.0.1
35-
with:
36-
extra_args: --hook-stage manual --all-files
37-
- name: Run Pylint
38-
run: uvx nox -s pylint -- --output-format=github
3930

40-
checks:
41-
name: Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }}
42-
runs-on: ${{ matrix.runs-on }}
31+
test:
32+
name: Test
33+
runs-on: ubuntu-latest
4334
needs: [pre-commit]
44-
strategy:
45-
fail-fast: false
46-
matrix:
47-
python-version: ["3.9", "3.13"]
48-
runs-on: [ubuntu-latest, windows-latest, macos-14]
49-
50-
include:
51-
- python-version: "pypy-3.10"
52-
runs-on: ubuntu-latest
53-
5435
steps:
5536
- uses: actions/checkout@v6
5637
with:
5738
fetch-depth: 0
5839

5940
- uses: actions/setup-python@v6
6041
with:
61-
python-version: ${{ matrix.python-version }}
62-
allow-prereleases: true
42+
python-version: "3.12"
6343

6444
- uses: astral-sh/setup-uv@v7
6545

6646
- name: Install package
6747
run: uv sync
6848

6949
- name: Test package
70-
run: >-
71-
uv run pytest -ra --cov --cov-report=xml --cov-report=term
72-
--durations=20
73-
74-
- name: Upload coverage report
75-
uses: codecov/codecov-action@v5
76-
with:
77-
token: ${{ secrets.CODECOV_TOKEN }}
50+
run: uv run pytest code/test_moderation.py -v --cov --cov-report=term

.pre-commit-config.yaml

Lines changed: 1 addition & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,21 @@ ci:
22
autoupdate_commit_msg: "chore: update pre-commit hooks"
33
autofix_commit_msg: "style: pre-commit fixes"
44

5-
exclude: ^.cruft.json|.copier-answers.yml$
6-
75
repos:
86
- repo: https://github.com/astral-sh/uv-pre-commit
9-
# uv version.
107
rev: 0.8.14
118
hooks:
129
- id: pip-compile
1310
args: [pyproject.toml, --output-file, requirements.txt]
1411
files: ^(pyproject\.toml|requirements\.txt)$
1512

16-
- repo: https://github.com/adamchainz/blacken-docs
17-
rev: "1.19.1"
18-
hooks:
19-
- id: blacken-docs
20-
additional_dependencies: [black==24.*]
21-
2213
- repo: https://github.com/pre-commit/pre-commit-hooks
2314
rev: "v6.0.0"
2415
hooks:
2516
- id: check-added-large-files
26-
- id: check-case-conflict
2717
- id: check-merge-conflict
28-
- id: check-symlinks
2918
- id: check-yaml
30-
- id: debug-statements
3119
- id: end-of-file-fixer
32-
- id: mixed-line-ending
33-
- id: name-tests-test
34-
args: ["--pytest-test-first"]
3520
- id: trailing-whitespace
3621

3722
- repo: https://github.com/mwouts/jupytext
@@ -42,18 +27,11 @@ repos:
4227
args: [--sync]
4328
files: ^code/.*\.(ipynb|md)$
4429

45-
- repo: https://github.com/pre-commit/pygrep-hooks
46-
rev: "v1.10.0"
47-
hooks:
48-
- id: rst-backticks
49-
- id: rst-directive-colons
50-
- id: rst-inline-touching-normal
51-
5230
- repo: https://github.com/rbubley/mirrors-prettier
5331
rev: "v3.6.2"
5432
hooks:
5533
- id: prettier
56-
types_or: [yaml, html, css, scss, javascript, json]
34+
types_or: [yaml, html, css, javascript, json]
5735
args: [--prose-wrap=always]
5836

5937
- repo: https://github.com/astral-sh/ruff-pre-commit
@@ -63,50 +41,7 @@ repos:
6341
args: ["--fix", "--show-fixes"]
6442
- id: ruff-format
6543

66-
# - repo: https://github.com/pre-commit/mirrors-mypy
67-
# rev: "v1.16.1"
68-
# hooks:
69-
# - id: mypy
70-
# files: src|tests
71-
# args: []
72-
# additional_dependencies:
73-
# - pytest
74-
75-
# - repo: https://github.com/codespell-project/codespell
76-
# rev: "v2.4.1"
77-
# hooks:
78-
# - id: codespell
79-
# additional_dependencies:
80-
# - tomli; python_version<'3.11'
81-
8244
- repo: https://github.com/shellcheck-py/shellcheck-py
8345
rev: "v0.11.0.1"
8446
hooks:
8547
- id: shellcheck
86-
87-
- repo: local
88-
hooks:
89-
- id: disallow-caps
90-
name: Disallow improper capitalization
91-
language: pygrep
92-
entry: PyBind|Numpy|Cmake|CCache|Github|PyTest
93-
exclude: .pre-commit-config.yaml
94-
- id: jupytext-sync-code
95-
name: Jupytext sync for notebooks in code/
96-
language: python
97-
additional_dependencies: [jupytext==1.17.2]
98-
entry: jupytext --sync
99-
files: ^code/.*\.ipynb$
100-
101-
- repo: https://github.com/abravalheri/validate-pyproject
102-
rev: "v0.24.1"
103-
hooks:
104-
- id: validate-pyproject
105-
additional_dependencies: ["validate-pyproject-schema-store[all]"]
106-
107-
- repo: https://github.com/python-jsonschema/check-jsonschema
108-
rev: "0.33.2"
109-
hooks:
110-
- id: check-dependabot
111-
- id: check-github-workflows
112-
- id: check-readthedocs

README.md

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
# The Method of Moderation
22

33
[![Actions Status][actions-badge]][actions-link]
4-
[![Documentation Status][rtd-badge]][rtd-link]
5-
6-
[![PyPI version][pypi-version]][pypi-link]
7-
[![Conda-Forge][conda-badge]][conda-link]
8-
[![PyPI platforms][pypi-platforms]][pypi-link]
9-
104
[![GitHub Discussion][github-discussions-badge]][github-discussions-link]
115
[![REMARK](https://img.shields.io/badge/REMARK-v1.0.0-blue)](https://github.com/econ-ark/REMARK)
126

@@ -52,20 +46,6 @@ In a risky world, a pessimist assumes the worst will happen. Someone who ignores
5246

5347
## Installation
5448

55-
### For Users (when published)
56-
57-
```bash
58-
pip install moderation
59-
```
60-
61-
or
62-
63-
```bash
64-
conda install -c conda-forge moderation
65-
```
66-
67-
### For Development
68-
6949
This project uses [uv](https://github.com/astral-sh/uv) for dependency management:
7050

7151
```bash
@@ -76,7 +56,7 @@ uv run pytest # Run tests
7656
uv run myst build --html # Build documentation
7757
```
7858

79-
See [REMARK reproduction](#reproducibility) section above for full reproduction instructions.
59+
See [Reproducibility](#reproducibility) section above for full reproduction instructions.
8060

8161
## Citation
8262

@@ -103,19 +83,9 @@ This work was supported by the Alfred P. Sloan Foundation under grant G-2017-983
10383
- **Content**: [CC-BY-SA-3.0](https://creativecommons.org/licenses/by-sa/3.0/)
10484
- **Code**: [MIT](LICENSE)
10585

106-
<!-- SPHINX-START -->
107-
10886
<!-- prettier-ignore-start -->
10987
[actions-badge]: https://github.com/econ-ark/method-of-moderation/workflows/CI/badge.svg
11088
[actions-link]: https://github.com/econ-ark/method-of-moderation/actions
111-
[conda-badge]: https://img.shields.io/conda/vn/conda-forge/moderation
112-
[conda-link]: https://github.com/conda-forge/moderation-feedstock
11389
[github-discussions-badge]: https://img.shields.io/static/v1?label=Discussions&message=Ask&color=blue&logo=github
11490
[github-discussions-link]: https://github.com/econ-ark/method-of-moderation/discussions
115-
[pypi-link]: https://pypi.org/project/moderation/
116-
[pypi-platforms]: https://img.shields.io/pypi/pyversions/moderation
117-
[pypi-version]: https://img.shields.io/pypi/v/moderation
118-
[rtd-badge]: https://readthedocs.org/projects/moderation/badge/?version=latest
119-
[rtd-link]: https://moderation.readthedocs.io/en/latest/?badge=latest
120-
12191
<!-- prettier-ignore-end -->

0 commit comments

Comments
 (0)