Skip to content
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
59 changes: 23 additions & 36 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.18.0
hooks:
- id: yamlfix
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v6.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
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 25.9.0
hooks:
- id: black
language_version: python3.10
- repo: https://github.com/asottile/blacken-docs
rev: 1.13.0
rev: 1.20.0
hooks:
- id: blacken-docs
- repo: https://github.com/PyCQA/docformatter
rev: v1.5.1
rev: v1.7.7
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.13.3
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]
2 changes: 2 additions & 0 deletions 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 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
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"]
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