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

Make test suite more random and add add_noise_to_params, move to Github Actions, etc.. #320

Merged
merged 31 commits into from
Feb 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
182c0c2
Preliminary commit.
tobiasraabe Jan 28, 2020
468be71
Added add_noise_to_params() and made test suite faster.
tobiasraabe Jan 28, 2020
dee80f8
Merge branch 'master' into random-tests
tobiasraabe Jan 28, 2020
bf45955
Fix msm tests.
tobiasraabe Jan 28, 2020
49b5c8a
Merge branch 'master' into random-tests
tobiasraabe Jan 28, 2020
1dd658f
Add auto-generative test function based on randomly-seed.
tobiasraabe Jan 29, 2020
c3bb365
Merge branch 'random-tests' of https://github.com/OpenSourceEconomics…
tobiasraabe Jan 29, 2020
42c466e
Fixed tox environment.
tobiasraabe Jan 29, 2020
94c2398
Fixed the test generation.
tobiasraabe Jan 29, 2020
77c3436
Merge branch 'master' into random-tests
tobiasraabe Jan 30, 2020
15841f0
temporary commit, unfinished add_noise....
tobiasraabe Jan 30, 2020
8eb882b
Refactored sorting of shock matrix to validation checks which works b…
tobiasraabe Jan 30, 2020
aaea444
Merge branch 'fix-sorting-shocks' into random-tests
tobiasraabe Jan 30, 2020
0be6c41
Probably finished add_noise_to_params.
tobiasraabe Feb 2, 2020
1c0bd69
Add codecov.
tobiasraabe Feb 11, 2020
572d73c
Updated paths in codecov.
tobiasraabe Feb 11, 2020
8b68919
Try out new flags.
tobiasraabe Feb 11, 2020
bc94332
Add github workflows and trimmed azure.
tobiasraabe Feb 11, 2020
cda2d36
new workflow [skip ci].
tobiasraabe Feb 11, 2020
c1795b3
new workflow [skip-ci].
tobiasraabe Feb 11, 2020
502a775
new workflow [skip-ci].
tobiasraabe Feb 11, 2020
62c9563
Actually copy repo.
tobiasraabe Feb 11, 2020
f014e31
Do not use 3.8.
tobiasraabe Feb 12, 2020
caa8e9f
Fix 3.7 on Windows:
tobiasraabe Feb 12, 2020
e34f53a
Fix 3.7 on Windows by adding scipy.
tobiasraabe Feb 12, 2020
6637674
Fix.
tobiasraabe Feb 12, 2020
7200105
Use codecov action.
tobiasraabe Feb 12, 2020
237432b
More badges.
tobiasraabe Feb 12, 2020
a1cd4d9
Some fixes.
tobiasraabe Feb 12, 2020
af46802
New posargs for pytest.
tobiasraabe Feb 13, 2020
ee4f0df
Fix codecov parsing.
tobiasraabe Feb 13, 2020
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
108 changes: 0 additions & 108 deletions .azure-pipelines.yml

This file was deleted.

15 changes: 15 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
codecov:
notify:
require_ci_to_pass: yes

coverage:
precision: 2
round: down
range: "50...100"

ignore:
- ".tox/**/*"
- "release.py"
- "setup.py"
- "respy/conftest.py"
- "respy/tests/**/*"
53 changes: 53 additions & 0 deletions .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Continuous Integration Workflow
on:
push:
branches:
- master
pull_request:
branches:
- '*'

jobs:
run-tests:
name: Run tests for ${{ matrix.os }} on ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
python-version: ['3.6', '3.7']
steps:
- uses: actions/checkout@v2
- uses: goanpeca/setup-miniconda@v1
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}

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

- name: Install fixes for Python 3.7 on Windows
if: runner.os == 'Windows' && matrix.python-version == '3.7'
shell: bash -l {0}
run: conda install -c conda-forge numpy scipy conda-build

- name: Run pytest.
shell: bash -l {0}
run: tox -e pytest -- -m "not slow" --cov-report=xml --cov=./

- name: Upload coverage report.
if: runner.os == 'Linux' && matrix.python-version == '3.7'
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}

- name: Run sphinx.
if: runner.os == 'Linux' && matrix.python-version == '3.7'
shell: bash -l {0}
run: tox -e sphinx

- name: Run pre-commits.
if: runner.os == 'Linux' && matrix.python-version == '3.7'
shell: bash -l {0}
run: tox -e linting
42 changes: 25 additions & 17 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,70 +9,78 @@ releases are available on `Anaconda.org
2.0.0 - 2019-
-------------

- :gh:`177` removes all Fortran files and ensures that all tests still run through.
- :gh:`193` continues on the removal of Fortran.
- :gh:`177` removes all Fortran files and ensures that all tests still run through
(:ghuser:`tobiasraabe`).
- :gh:`193` continues on the removal of Fortran (:ghuser:`tobiasraabe`).
- :gh:`199` makes the reward components modular (:ghuser:`janosg`).
- :gh:`200` implements the Kalman filter which allows to estimate measurement error in
wages (:ghuser:`janosg`).
- :gh:`201` implements a flexible state space which is first and foremost flexible in
the number of choices with experience and wages, but open to be extended.
- :gh:`204` adds more thesis proposals.
the number of choices with experience and wages, but open to be extended
(:ghuser:`tobiasraabe`).
- :gh:`204` adds more thesis proposals (:ghuser:`tobiasraabe`).
- :gh:`205` implements Azure Pipelines as the major CI, but we still rely on Travis-CI
for deploying the package to PyPI (:ghuser:`tobiasraabe`).
- :gh:`206` prepares estimation with `estimagic
<https://github.com/OpenSourceEconomics/estimagic>`_
- :gh:`208` implements parsing of choices from data frame.
<https://github.com/OpenSourceEconomics/estimagic>`_ (:ghuser:`tobiasraabe`).
- :gh:`208` implements parsing of choices from DataFrame (:ghuser:`tobiasraabe`).
- :gh:`209` adds parameterizations of Keane and Wolpin (1997) plus adaptive rescaling
step within the likelihood aggregation which prevents under- and overflows in the
contributions (:ghuser:`janosg`).
- :gh:`211` generalizes the construction of type probabilities with arbitrary
covariates.
- :gh:`221` implements a new interface for the simulation which is similar to the
estimation and reduces runtime for multiple simulations by a factor of four.
estimation and reduces runtime for multiple simulations by a factor of four
(:ghuser:`tobiasraabe`).
- :gh:`230` allows the model to include observed variables which are time-invariant
(:ghuser:`mo2561057`, :ghuser:`tobiasraabe`)
- :gh:`236` implements a periodic indexer.
- :gh:`240` makes previous choices in the state space optional.
- :gh:`245` create continuation values dynamically from value functions.
- :gh:`236` implements a periodic indexer (:ghuser:`tobiasraabe`).
- :gh:`240` makes previous choices in the state space optional (:ghuser:`tobiasraabe`).
- :gh:`245` create continuation values dynamically from value functions
(:ghuser:`tobiasraabe`).
- :gh:`256` implements quasi-random low discrepancy sequences for better Monte-Carlo
integrations (:ghuser:`rafaelsuchy`).
- :gh:`262` moves the distribution of previous choices, initial and maximum experience
to params.
to params (:ghuser:`tobiasraabe`).
- :gh:`268` makes seeding in ``respy`` a lot more robust by using incrementally
increasing sequences.
increasing sequences (:ghuser:`janosg`, :ghuser:`tobiasraabe`).
- :gh:`269` improves the generation of conditional draws with and without measurement
error in the likelihood calculation (:ghuser:`janosg`).
- :gh:`275` fixes a bug in calculation of wage probabilities.
- :gh:`275` fixes a bug in calculation of wage probabilities (:ghuser:`tobiasraabe`).
- :gh:`277` adds three different simulation methods: n-step-ahead simulation with
sampling or data and one-step-ahead simulation.
sampling or data and one-step-ahead simulation (:ghuser:`tobiasraabe`).
- :gh:`278`, :gh:`279`, and :gh:`280` implement three functions, log softmax, softmax,
and logsumexp, which reduce the likelihood of under- and overflows and save
information (:ghuser:`tobiasraabe`).
- :gh:`282` adds an interface for the estimation of models with the method of simulated
moments (:ghuser:`amageh`, :ghuser:`mo2561057`, :ghuser:`tobiasraabe`).
- :gh:`285` adds the ability to generate a set of constraint for example models.
- :gh:`285` adds the ability to generate a set of constraint for example models
(:ghuser:`tobiasraabe`).
- :gh:`288` fixes an error in the simulation of choice probabilities introduced by
:gh:`278` (:ghuser:`peisenha`).
- :gh:`296` contributes a new toy model to respy: The Robinson Crusoe Economy
(:ghuser:`tobiasraabe`, :ghuser:`peisenha`)
- :gh:`299` adds the information on the previous choice to individuals at age sixteen to
the original data from Keane and Wolpin (1997). Special thanks to :ghuser:`bekauf` for
the data preparation.
- :gh:`300` aligns respy functions with the new data in :gh:`299`.
- :gh:`300` aligns respy functions with the new data in :gh:`299`
(:ghuser:`tobiasraabe`).
- :gh:`314` fixes two parameters in KW97 and KW2000 (:ghuser:`tostenzel`,
:ghuser:`tobiasraabe`).
- :gh:`316` changes the invalid index value for the indexer to prevent silent errors
(:ghuser:`tobiasraabe`).
- :gh:`319` adds a page for projects using ``respy`` (:ghuser:`tobiasraabe`). :gh:`321`
adds more projects.
- :gh:`320` adds ``add_noise_to_params()`` and makes the test suite faster, tests more
random, moved to Github Actions, and more badges.
- :gh:`323` adds an informative message if simulated individuals cannot be mapped to
states in the state space (:ghuser:`mo2561057`, :ghuser:`tobiasraabe`).

1.2.1 - 2019-05-19
------------------

- :gh:`170` adds a test for inadmissible states in the state space.
- :gh:`180` adds a long description to the PYPi package.
- :gh:`180` adds a long description to the PyPI package.
- :gh:`181` implements `nbsphinx <https://nbsphinx.readthedocs.io/en/latest/>`_ for a
documentation based on notebooks and reworks structure and graphics.
- :gh:`183` adds a small set of regression tests.
Expand Down
12 changes: 9 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,17 @@ respy
.. image:: https://readthedocs.org/projects/respy/badge/?version=latest
:target: https://respy.readthedocs.io/en/latest

.. image:: https://dev.azure.com/OpenSourceEconomics/respy/_apis/build/status/OpenSourceEconomics.respy?branchName=master
:target: https://dev.azure.com/OpenSourceEconomics/respy/_build/latest?definitionId=1&branchName=master
.. image:: https://img.shields.io/badge/License-MIT-yellow.svg
:target: https://opensource.org/licenses/MIT

.. image:: https://github.com/OpenSourceEconomics/respy/workflows/Continuous%20Integration%20Workflow/badge.svg?branch=master
:target: https://github.com/OpenSourceEconomics/respy/actions?query=branch%3Amaster

.. image:: https://codecov.io/gh/OpenSourceEconomics/respy/branch/master/graph/badge.svg
:target: https://codecov.io/gh/OpenSourceEconomics/respy

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/python/black
:target: https://github.com/psf/black

``respy`` is an open-source Python package for the simulation and estimation of a
prototypical finite-horizon discrete choice dynamic programming model. We build on the
Expand Down
4 changes: 0 additions & 4 deletions development/documentation/cloc/cloc_lang_def.txt

This file was deleted.

Loading