Skip to content
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

Prepare for R #115

Merged
merged 93 commits into from
Nov 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
0765225
Fix Python version regex
timmens Jan 13, 2022
d74d1d0
Update Python version in GHA
timmens Jan 13, 2022
027d313
Merge branch 'master' into fix-python-version-regex
hmgaudecker Jan 13, 2022
cf30391
Fix a couple of version numbers.
hmgaudecker Jan 13, 2022
9c76ead
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 13, 2022
1ddfe54
Update environment.yml
timmens Jan 15, 2022
cd62463
Return to pip:kaleido
timmens Jan 15, 2022
d5586ef
Fix typo on PYTHONVERSION_REGEX
timmens Jan 15, 2022
2014745
Make sure paths are represented in the same way everywhere.
hmgaudecker Jan 20, 2022
2b4d51b
Fix typo.
hmgaudecker Jan 20, 2022
2bde0af
Started from pytask-dev/cookiecutter-pytask-project and adjusted stru…
hmgaudecker Feb 4, 2022
51c1568
Change paths so that compilation of tex-file is possible also from ed…
hmgaudecker Feb 7, 2022
2082d9c
Further harmonisation with cookiecutter-pytask-project.
hmgaudecker Feb 10, 2022
e499d03
Harmonize with cookiecutter-pytask test suite
timmens Feb 16, 2022
9e1bdc7
Update docs and remove mypy
timmens Feb 16, 2022
23fa823
Skip notebooks in codespell hook
timmens Feb 16, 2022
af69d09
Update docs
timmens Feb 16, 2022
fd5766a
Delete old example code
timmens Feb 16, 2022
a7561d6
Add missing cookiecutter specifier
timmens Feb 16, 2022
7a8d48a
Update pre-commit errors from project
timmens Feb 16, 2022
5a811e4
Remove interrogate hook
timmens Feb 16, 2022
ff6141c
Remove CI html build
timmens Feb 16, 2022
2008d01
Make biber default
timmens Feb 17, 2022
492223b
Merge pull request #99 from OpenSourceEconomics/new-structure-tests
timmens Feb 17, 2022
765a8a9
Update continuous-integration-workflow.yml
timmens Apr 4, 2022
30d82fa
Update black version
timmens Apr 4, 2022
f2d03af
Update .pre-commit-config.yaml
timmens Apr 4, 2022
31f7006
New example for templates (#100)
timmens Apr 13, 2022
29bd6e1
Fix latex tasks (#104)
timmens Apr 19, 2022
9ae8b42
Added r channel to environment.
carolinalvarez Apr 20, 2022
e25a39f
Added additional R dependencies.
carolinalvarez Apr 26, 2022
483b754
Added R script which contains translated code for the file clean_data.py
carolinalvarez Apr 26, 2022
49a619f
Added task that runs the R script for data cleaning. The json file op…
carolinalvarez Apr 26, 2022
86f6821
Added empty R scripts that correspond to the Python files.
carolinalvarez Apr 26, 2022
0c01c46
Modified data cleaning and added model.r code.
carolinalvarez May 1, 2022
2c27907
Added initial code for predict.r
carolinalvarez May 1, 2022
bb49149
Documentation Updates (#102)
Maxie02 May 11, 2022
1a44016
Move to MyST
timmens Jul 14, 2022
1145355
Merge branch 'master' into new-structure
timmens Jul 14, 2022
a5f2858
Fix environments
timmens Jul 14, 2022
9106955
Fix GHA
timmens Jul 14, 2022
afa05f8
Fix Windows tests
timmens Jul 15, 2022
0ab3cf2
Environment fix
timmens Jul 19, 2022
6927278
Environment fix
timmens Jul 19, 2022
f0c1ed0
Fix environment in tox.ini
timmens Jul 19, 2022
704b8a7
Add estimation table to paper.pdf
timmens Jul 22, 2022
0abba5e
Merge branch 'new-structure' into translate-example-to-R
timmens Sep 3, 2022
c70ce78
Update R examples
timmens Sep 13, 2022
00e8937
Improve multi-language management
timmens Sep 13, 2022
f923b9d
Merge branch 'master' into translate-example-to-R
timmens Nov 15, 2022
f550304
Merge branch 'master' into translate-example-to-R
timmens Nov 16, 2022
7000f57
Move to different architecture
timmens Nov 16, 2022
eaac5c2
Make it work
timmens Nov 17, 2022
8d1d85b
Use correct conda executable in test
timmens Nov 17, 2022
828d078
Remove R task-files
timmens Nov 18, 2022
df0714c
Cosmetics.
hmgaudecker Nov 18, 2022
a1bc962
Based on branch 'translate-example-to-R', but delete all things R so …
hmgaudecker Nov 18, 2022
aedb491
Forgot to save, use elif for cookiecutter._is_ci where useful.
hmgaudecker Nov 18, 2022
7f59b8d
So cookiecutter does not like variables starting with an underscore...
hmgaudecker Nov 18, 2022
596dd52
Reproduce DAG and other figures.
hmgaudecker Nov 19, 2022
20b4fd0
Run a test with all environments and one with Python only.
hmgaudecker Nov 19, 2022
0840c27
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Nov 21, 2022
59f4f30
Merge 'pre-commit-ci-update-config' into prepare_for_r
hmgaudecker Nov 22, 2022
553e059
Rename master -> main in README, docs.
hmgaudecker Nov 22, 2022
1d3e325
Remove test to check whether it is length of runtime causing failures.
hmgaudecker Nov 22, 2022
4544c74
Comment out the other test.
hmgaudecker Nov 22, 2022
661635f
Do not use conda-build in environment, add micromamba.
hmgaudecker Nov 22, 2022
ae8e49c
Seems like test failures were indeed due to long-running conda.
hmgaudecker Nov 22, 2022
ccc658b
Speed-up testing
timmens Nov 25, 2022
f1daba8
Delete pre-commit test and run all tests
timmens Nov 25, 2022
4678bba
Test with pytest
timmens Nov 25, 2022
7b91b61
Micromamba
timmens Nov 25, 2022
83fd2e6
Don't use environment.yml in micromamba env creation
timmens Nov 26, 2022
7a10001
Provide environment-name to micromamba provision
timmens Nov 26, 2022
3c1da08
Install mamba into environment
timmens Nov 26, 2022
0c0334a
Update tests
timmens Nov 26, 2022
912047a
Trying to fix test failures (https://github.com/mamba-org/mamba/issue…
hmgaudecker Nov 28, 2022
1e8b27f
Use standard conda incubator
timmens Nov 28, 2022
e300de7
Merge branch 'prepare_for_r' of https://github.com/OpenSourceEconomic…
timmens Nov 28, 2022
ae3706f
Fix invalid workflow file
timmens Nov 28, 2022
216657c
Remove parallelization of pytest
timmens Nov 28, 2022
ac9bb6d
Fix codecov and add parallelization
timmens Nov 28, 2022
e2c2e18
Install pytest-xdist on runner
timmens Nov 28, 2022
0c0ef6d
Don't run tests in parallel
timmens Nov 28, 2022
188ad35
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Nov 28, 2022
2ea20f3
Finish docs.
hmgaudecker Nov 29, 2022
623e48b
Merge branch main into prepare_for_r
hmgaudecker Nov 29, 2022
22eca1a
Remove remaining traces of RST.
hmgaudecker Nov 29, 2022
18d3a15
Seriously the last traces of rst.
hmgaudecker Nov 29, 2022
126bf8f
Merge branch pre-commit-ci-update-config into prepare_for_r
hmgaudecker Nov 29, 2022
ca85080
Typo, align pre-commit configuration of inner project with outer one.
hmgaudecker Nov 29, 2022
f85a943
Remove mdformat due to complaints in tests.
hmgaudecker Nov 29, 2022
e0774d8
Codespell complaint.
hmgaudecker Nov 29, 2022
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
52 changes: 19 additions & 33 deletions .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ concurrency:
on:
push:
branches:
- master
- main
pull_request:
branches:
- "*"
Expand All @@ -30,44 +30,30 @@ jobs:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-tinytex@v1
if: runner.os != 'Windows'

- uses: conda-incubator/setup-miniconda@v2

- name: Setup miniconda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
channels: conda-forge,defaults
channel-priority: true
python-version: ${{ matrix.python-version }}

- name: Install core dependencies.
mamba-version: "*"
channels: conda-forge, nodefaults

- name: Install test dependencies
shell: bash -l {0}
run: conda install -c conda-forge tox-conda coverage

- name: Run end-to-end tests.
run: mamba install pip cookiecutter pytest pytest-cov
- name: Install pytest-cookies
shell: bash -l {0}
run: tox -e pytest -- tests -m end_to_end --cov=./ --cov-report=xml -n auto

- name: Upload coverage reports of end-to-end tests.
if: runner.os == 'Linux' && matrix.python-version == '3.11'
run: pip install git+https://github.com/andriihomiak/pytest-cookies.git@fix/quotes_in_user_config

- name: Run tests
shell: bash -l {0}
run: bash <(curl -s https://codecov.io/bash) -F end_to_end -c

pre-commit:
name: Run pre-commit.
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Python 3.11
uses: actions/setup-python@v1
with:
python-version: 3.11

- name: Install dependencies
run: pip install tox
run: pytest tests --cov=hooks --cov=tests --cov-report=xml

- name: Upload coverage reports
if: runner.os == 'Linux' && matrix.python-version == '3.11'
uses: codecov/codecov-action@v3

- name: Run pre-commit
run: tox -e pre-commit

docs:
name: Run documentation.
Expand Down
21 changes: 11 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ exclude: ^(\.|{{cookiecutter\.project_slug}}/.+)

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
- id: check-added-large-files
args: ['--maxkb=25']
Expand Down Expand Up @@ -32,25 +32,25 @@ repos:
- id: python-use-type-annotations
- id: text-unicode-replacement-char
- repo: https://github.com/asottile/pyupgrade
rev: v2.37.1
rev: v3.2.2
hooks:
- id: pyupgrade
args: [--py37-plus]
- repo: https://github.com/asottile/reorder_python_imports
rev: v3.8.1
rev: v3.9.0
hooks:
- id: reorder-python-imports
- repo: https://github.com/psf/black
rev: 22.6.0
rev: 22.10.0
hooks:
- id: black
- repo: https://github.com/myint/docformatter
rev: v1.3.1
- repo: https://github.com/PyCQA/docformatter
rev: v1.5.0
hooks:
- id: docformatter
args: [--in-place, --wrap-summaries, "88", --wrap-descriptions, "88", --blank]
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
rev: 5.0.4
hooks:
- id: flake8
additional_dependencies: [
Expand Down Expand Up @@ -84,7 +84,7 @@ repos:
]
pass_filenames: false
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.14
rev: 0.7.16
hooks:
- id: mdformat
additional_dependencies: [
Expand All @@ -94,7 +94,7 @@ repos:
args: [--wrap, "88"]
files: (README\.md)
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.14
rev: 0.7.16
hooks:
- id: mdformat
additional_dependencies: [
Expand All @@ -109,9 +109,10 @@ repos:
# path/to/file.py
# )$
- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
rev: v2.2.2
hooks:
- id: codespell
args: [--skip="**.ipynb"]
- repo: https://github.com/guilatrova/tryceratops
rev: v1.1.0
hooks:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
[![image](https://zenodo.org/badge/14557543.svg)](https://zenodo.org/badge/latestdoi/14557543)
[![Documentation Status](https://readthedocs.org/projects/econ-project-templates/badge/?version=stable)](https://econ-project-templates.readthedocs.io/en/stable/)
[![image](https://github.com/OpenSourceEconomics/econ-project-templates/actions/workflows/continuous-integration-workflow.yml/badge.svg)](https://github.com/OpenSourceEconomics/econ-project-templates/actions/workflows/continuous-integration-workflow.yml)
[![image](https://codecov.io/gh/OpenSourceEconomics/econ-project-templates/branch/master/graph/badge.svg)](https://codecov.io/gh/OpenSourceEconomics/econ-project-templates)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/OpenSourceEconomics/econ-project-templates/master.svg)](https://results.pre-commit.ci/latest/github/OpenSourceEconomics/econ-project-templates/master)
[![image](https://codecov.io/gh/OpenSourceEconomics/econ-project-templates/branch/main/graph/badge.svg)](https://codecov.io/gh/OpenSourceEconomics/econ-project-templates)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/OpenSourceEconomics/econ-project-templates/main.svg)](https://results.pre-commit.ci/latest/github/OpenSourceEconomics/econ-project-templates/main)
[![image](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

This project aims to provide project templates for economists that make it easy to
Expand All @@ -29,7 +29,7 @@ this is a small team so there is no need for a detailed formal process.

## Contributors

@hmgaudecker @timmens @tobiasraabe
@hmgaudecker @timmens @tobiasraabe @mj023

## Former Contributors

Expand Down
16 changes: 2 additions & 14 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,8 @@ coverage:
project:
default:
threshold: 1%
unit:
threshold: 1%
flags:
- unit
integration:
threshold: 1%
flags:
- integration
end_to_end:
threshold: 1%
flags:
- end_to_end

ignore:
- "{{cookiecutter.project_slug}}/**/*"
- ".tox/**/*"
- "{{cookiecutter.project_slug}}"
- ".tox"
- "setup.py"
49 changes: 24 additions & 25 deletions cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,59 +8,58 @@
"github_username": "{{ cookiecutter.author.lower().replace(' ', '') }}",
"github_email": "{{ cookiecutter.email }}",
"git_remote_url": "",
"version": "0.0.1",
"python_version": "3.11",
"is_ci": ["no", "yes"],
"add_tox": [
"make_initial_commit": [
"yes",
"no"
],
"add_github_actions": [
"yes",
"no"
"version": "0.0.1",
"python_version": "3.11",
"conda_environment_name": "{{ cookiecutter.project_slug }}",
"create_conda_environment_at_finish": [
"no",
"yes"
],
"add_mypy": [
"add_python_example": [
"yes",
"no"
],
"add_codecov": [
"add_r_example": [
"yes",
"no"
],
"create_changelog": [
"add_julia_example": [
"yes",
"no"
],
"open_source_license": [
"MIT",
"BSD",
"ISC",
"Apache Software License 2.0",
"GNU General Public License v3",
"Not open source"
],
"make_initial_commit": [
"add_stata_example": [
"yes",
"no"
],
"add_python_example": [
"add_tox": [
"yes",
"no"
],
"add_julia_example": [
"add_github_actions": [
"yes",
"no"
],
"add_r_example": [
"add_codecov": [
"yes",
"no"
],
"add_stata_example": [
"create_changelog": [
"yes",
"no"
],
"conda_environment_name": "{{ cookiecutter.project_slug }}",
"create_conda_environment_at_finish": [
"open_source_license": [
"MIT",
"BSD",
"ISC",
"Apache Software License 2.0",
"GNU General Public License v3",
"Not open source"
],
"is_ci": [
"no",
"yes"
],
Expand Down
Binary file added docs/scripts/latex/root_bld_src.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading