Skip to content

Commit

Permalink
Make test suite more random and add add_noise_to_params, move to Gith…
Browse files Browse the repository at this point in the history
…ub Actions, etc.. (#320)
  • Loading branch information
tobiasraabe authored Feb 13, 2020
1 parent d3298d9 commit 187bad3
Show file tree
Hide file tree
Showing 33 changed files with 521 additions and 990 deletions.
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

0 comments on commit 187bad3

Please sign in to comment.