Skip to content

[pre-commit.ci] pre-commit autoupdate #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 22 additions & 35 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@ repos:
- id: check-useless-excludes
# - id: identity # Prints all files passed to pre-commits. Debugging.
- repo: https://github.com/lyz-code/yamlfix
rev: 1.2.0
rev: 1.17.0
hooks:
- id: yamlfix
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v5.0.0
hooks:
- id: check-added-large-files
args:
- --maxkb=25
args: [--maxkb=25]
- id: check-case-conflict
- id: check-merge-conflict
- id: check-vcs-permalinks
Expand All @@ -23,30 +22,27 @@ repos:
- id: debug-statements
- id: end-of-file-fixer
- id: fix-byte-order-marker
types:
- text
types: [text]
- id: forbid-submodules
- id: mixed-line-ending
args:
- --fix=lf
args: [--fix=lf]
description: Forces to replace line ending by the UNIX 'lf' character.
- id: name-tests-test
args:
- --pytest-test-first
args: [--pytest-test-first]
- id: trailing-whitespace
- id: check-ast
- id: check-docstring-first
- repo: https://github.com/psf/black
rev: 22.12.0
rev: 25.1.0
hooks:
- id: black
language_version: python3.10
- repo: https://github.com/asottile/blacken-docs
rev: 1.13.0
rev: 1.19.1
hooks:
- id: blacken-docs
- repo: https://github.com/PyCQA/docformatter
rev: v1.5.1
rev: v1.7.8-rc1
hooks:
- id: docformatter
args:
Expand All @@ -56,54 +52,45 @@ repos:
- --wrap-descriptions
- '88'
- --blank
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.230
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.7
hooks:
- id: ruff
# args:
# - --verbose
- repo: https://github.com/kynan/nbstripout
rev: 0.6.1
rev: 0.8.1
hooks:
- id: nbstripout
args:
- --extra-keys
- metadata.kernelspec metadata.language_info.version metadata.vscode
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.6.1
rev: 1.9.1
hooks:
- id: nbqa-black
- id: nbqa-ruff
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.16
rev: 0.7.22
hooks:
- id: mdformat
additional_dependencies:
- mdformat-gfm
- mdformat-black
args:
- --wrap
- '88'
additional_dependencies: [mdformat-gfm, mdformat-black]
args: [--wrap, '88']
files: (README\.md)
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.16
rev: 0.7.22
hooks:
- id: mdformat
additional_dependencies:
- mdformat-myst
- mdformat-black
args:
- --wrap
- '88'
additional_dependencies: [mdformat-myst, mdformat-black]
args: [--wrap, '88']
files: (docs/.)
- repo: https://github.com/codespell-project/codespell
rev: v2.2.2
rev: v2.4.1
hooks:
- id: codespell
args:
- --skip="**.ipynb"
args: [--skip="**.ipynb"]
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.2.0
rev: v2.8.0
hooks:
- id: setup-cfg-fmt
ci:
Expand Down
11 changes: 3 additions & 8 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
---
# Manual steps after creating environment:
# - switch to improve_estimation_table branch in estimagic source
# - pip install -e ../relative/path/to/estimagic

name: estimagic_tables_examples
channels:
- conda-forge
- nodefaults

channels: [conda-forge, nodefaults]
dependencies:
- conda-lock
- ipykernel
Expand All @@ -24,6 +21,4 @@ dependencies:
- setuptools_scm
- statsmodels
- toml
- pip:
- -e .
- kaleido
- pip: [-e ., kaleido]
1 change: 1 addition & 0 deletions paper/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
"""Code for the paper and presentation(s)."""

3 changes: 2 additions & 1 deletion paper/task_paper.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
"""Tasks for compiling the paper and presentation(s)."""

import shutil

import pytask
from pytask_latex import compilation_steps as cs

from estimagic_tables_examples.config import BLD, PAPER_DIR

documents = ["estimagic_tables_examples"]
Expand All @@ -19,7 +21,6 @@
@pytask.mark.task(id=document)
def task_compile_document():
"""Compile the document specified in the latex decorator."""

kwargs = {
"depends_on": BLD / "latex" / f"{document}.pdf",
"produces": BLD.parent.resolve() / f"{document}.pdf",
Expand Down
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ url = https://github.com/OpenSourceEconomics/estimagic_tables_examples
author = Christian Zimpelmann
author_email = [email protected]
license = MIT
license_file = LICENSE
license_files = LICENSE
platforms = unix, linux, osx, cygwin, win32
classifiers =
Intended Audience :: Science/Research
License :: OSI Approved :: MIT License
Operating System :: MacOS :: MacOS X
Operating System :: Microsoft :: Windows
Operating System :: POSIX
Expand Down
1 change: 1 addition & 0 deletions src/estimagic_tables_examples/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
"""Code for producing the results of the Reproducible Research Template project."""

3 changes: 2 additions & 1 deletion src/estimagic_tables_examples/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""All the general configuration of the project."""

from pathlib import Path

SRC = Path(__file__).parent.resolve()
Expand All @@ -9,4 +10,4 @@

GROUPS = ["marital_status", "qualification"]

__all__ = ["BLD", "SRC", "TEST_DIR", "GROUPS"]
__all__ = ["BLD", "GROUPS", "SRC", "TEST_DIR"]
1 change: 1 addition & 0 deletions src/estimagic_tables_examples/create_tables/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
"""Functions for creating tables."""

Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def task_descriptives_table(
)

# formatting
# ToDo: Provide (part of) this function in estimagic?
# TODO: Provide (part of) this function in estimagic?
descriptive_stats = apply_custom_number_format(
descriptive_stats,
int_cols=["N subj."],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ def task_two_step_table(
models,
return_type="render_inputs",
custom_param_names={"Intercept": "Constant", "Age": "Age of respondent"},
# ToDo: A bit confusing why I need to use custom_col_groups instead of
# ToDo: custom_col_names here.
# TODO: A bit confusing why I need to use custom_col_groups instead of
# TODO: custom_col_names here.
custom_col_groups={"target": "Output"},
)
# Remove rows from footer.
Expand Down
Loading