Skip to content

Commit 84413e8

Browse files
authored
Merge pull request #2 from rickecon/init
Merging
2 parents cc0023e + c38f75d commit 84413e8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1365
-2
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Thanks for filing an issue. Please consider including the following information in your issue. This will help us efficiently respond to the issue and incorporate its valuable components into the repository. Please delete this paragraph, and feel free to include any of the following content that you think is relevant.
2+
3+
# Clear and concise title
4+
Please give this issue a clear and concise title that directly references the key point in your issue.
5+
6+
# Problem or Error
7+
Please characterize the problem concisely and precisely. You may want to include error message output, other terminal output, your environment characteristics, and a way to replicate the issue. Let us know what solutions you have tried. You may also want to include a minimal reproducible example (MRE; see [this Stackoverflow tutorial](https://stackoverflow.com/help/minimal-reproducible-example) and this [Wikipedia page](https://en.wikipedia.org/wiki/Minimal_reproducible_example)). These types of examples are referred to in other coding cotexts as "minimal,complete, and verifiable example (MCVE)", "minimal workable example (MWE)", "reprex", and "short, self-contained correct example (SSCCE)".
8+
9+
# Question
10+
Please ask the question with clear context and any potential answer directions you can think of.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Thanks for contributing! Please remove any top-level sections that do not apply to your changes.
2+
3+
- [ ] `make documentation`, `make format`, and `make test` have been run locally on my machine.
4+
5+
## What's changed
6+
7+
Description of the changes here. Link any issues this PR fixes.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Build and test [Python 3.10, 3.11]
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
os: [ubuntu-latest, macos-latest, windows-latest]
11+
python-version: ["3.10", "3.11"]
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
with:
17+
persist-credentials: false
18+
19+
- name: Setup Miniconda using Python ${{ matrix.python-version }}
20+
uses: conda-incubator/setup-miniconda@v2
21+
with:
22+
miniforge-variant: Mambaforge
23+
auto-update-conda: true
24+
activate-environment: compmethods-dev
25+
environment-file: environment.yml
26+
python-version: ${{ matrix.python-version }}
27+
auto-activate-base: false
28+
29+
- name: Build
30+
shell: bash -l {0}
31+
run: |
32+
pip install -e .
33+
pip install pytest-cov
34+
pip install pytest-pycodestyle
35+
- name: Test
36+
shell: bash -l {0}
37+
working-directory: ./
38+
run: |
39+
pytest -m 'not local' --cov=./ --cov-report=xml
40+
- name: Upload coverage to Codecov
41+
uses: codecov/codecov-action@v3
42+
with:
43+
files: ./coverage.xml
44+
flags: unittests
45+
name: codecov-umbrella
46+
fail_ci_if_error: true
47+
verbose: true

.github/workflows/check_format.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
name: Check code formatting
3+
4+
on: [push, pull_request]
5+
6+
jobs:
7+
lint:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: actions/setup-python@v4
12+
- uses: psf/black@stable
13+
with:
14+
options: "-l 79 --check"
15+
src: "."

.github/workflows/deploy_docs.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Build and Deploy Jupyter Book documentation
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
build-and-deploy:
8+
if: github.repository == 'OpenSourceEcon/CompMethods'
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
with:
14+
persist-credentials: false
15+
16+
- name: Setup Miniconda
17+
uses: conda-incubator/setup-miniconda@v2
18+
with:
19+
miniforge-variant: Mambaforge
20+
activate-environment: compmethods-dev
21+
environment-file: environment.yml
22+
python-version: "3.10"
23+
auto-activate-base: false
24+
25+
- name: Build # Build Jupyter Book
26+
shell: bash -l {0}
27+
run: |
28+
pip install -e .
29+
python -m ipykernel install --user --name=compmethods-dev
30+
cd docs
31+
jb build ./book
32+
33+
- name: Deploy
34+
uses: JamesIves/github-pages-deploy-action@v4
35+
with:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
BRANCH: gh-pages # The branch the action should deploy to.
38+
FOLDER: docs/book/_build/html # The folder the action should deploy.

.github/workflows/docs_check.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Check that docs build
2+
on: [push, pull_request]
3+
4+
jobs:
5+
build:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Checkout
9+
uses: actions/checkout@v4
10+
with:
11+
persist-credentials: false
12+
13+
- name: Setup Miniconda
14+
uses: conda-incubator/setup-miniconda@v2
15+
with:
16+
miniforge-variant: Mambaforge
17+
activate-environment: compmethods-dev
18+
environment-file: environment.yml
19+
python-version: "3.10"
20+
auto-activate-base: false
21+
22+
- name: Build # Build Jupyter Book
23+
shell: bash -l {0}
24+
run: |
25+
pip install -e .
26+
python -m ipykernel install --user --name=compmethods-dev
27+
cd docs
28+
jb build ./book

.gitignore

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
*.pyc
2+
MANIFEST
3+
build/*
4+
dist/*
5+
*.aux
6+
*.bbl
7+
*.blg
8+
*.fdb_latexmk
9+
*.idx
10+
*.ilg
11+
*.ind
12+
*.lof
13+
*.log
14+
*.lot
15+
*.out
16+
*.pdfsync
17+
*.synctex.gz
18+
*.toc
19+
*.swp
20+
*.asv
21+
*.nav
22+
*.snm
23+
*.gz
24+
*.bib.bak
25+
*.fls
26+
*.m~
27+
*.sublime*
28+
.DS_Store
29+
*puf.csv
30+
*/OUTPUT/*
31+
*/__pycache__/*
32+
*.coverage*
33+
*.pytest*
34+
Icon?
35+
.ipynb_checkpoints/*
36+
37+
# Built Jupyter-book documentation
38+
docs/book/_build
39+
40+
# Backup docs
41+
pdfs/*
42+

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [0.0.0] - 2023-09-28 17:00:00
9+
10+
### Added
11+
12+
- Created CompMethods repository at GitHub.com/OpenSourceEcon/CompMethods

Makefile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
format:
2+
black . -l 79
3+
linecheck . --fix
4+
install:
5+
pip install -e .
6+
test:
7+
pytest -m 'not local'
8+
documentation:
9+
jupyter-book clean docs/book
10+
jupyter-book build docs/book
11+
changelog:
12+
build-changelog changelog.yaml --output changelog.yaml --update-last-date --start-from 0.0.0 --append-file changelog_entry.yaml
13+
build-changelog changelog.yaml --org OpenSourceEcon --repo CompMeths --output CHANGELOG.md --template .github/changelog_template.md
14+
bump-version changelog.yaml setup.py
15+
rm changelog_entry.yaml || true
16+
touch changelog_entry.yaml

README.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,24 @@
1-
# CompMethods
2-
"Computational Methods for Economists using Python", by Richard W. Evans. Tutorials and executable code in Python for the most commonly used computational methods in economics.
1+
# *Computational Methods for Economists using Python*, by Richard W. Evans
2+
3+
| | |
4+
| --- | --- |
5+
| Org | [![OSE Lab cataloged](https://img.shields.io/badge/OSE%20Lab-catalogued-critical)](https://github.com/OpenSourceEcon) [![OS License: AGPL-3.0](https://img.shields.io/badge/OS%20License-AGPL%203.0-yellow)](https://github.com/OpenSourceEcon/CompMethods/blob/main/LICENSE) |
6+
| Package | [![Python 3.10](https://img.shields.io/badge/python-3.10-blue.svg)](https://www.python.org/downloads/release/python-31013/) [![PyPI Latest Release](https://img.shields.io/pypi/v/compmethods.svg)](https://pypi.org/project/compmethods/) [![PyPI Downloads](https://img.shields.io/pypi/dm/compmethods.svg?label=PyPI%20downloads)](https://pypi.org/project/compmethods/) |
7+
| Testing | ![example event parameter](https://github.com/OpenSourceEcon/CompMethods/actions/workflows/build_and_test.yml/badge.svg?branch=main) ![example event parameter](https://github.com/OpenSource/CompMethods/actions/workflows/deploy_docs.yml/badge.svg?branch=main) ![example event parameter](https://github.com/OpenSourceEcon/CompMethods/actions/workflows/check_format.yml/badge.svg?branch=main) [![Codecov](https://codecov.io/gh/OpenSourceEcon/CompMethods/branch/main/graph/badge.svg)](https://codecov.io/gh/OpenSourceEcon/compmethods) |
8+
9+
This repository contains the source material, code, and data for the book, [*Computational Methods for Economists using Python*](https://opensourceecon.github.io/CompMethods/), by Richard W. Evans (2023). This book is freely available online as an executable Jupyter Book at [url to book](https://opensourceecon.github.io/CompMethods/).
10+
11+
The materials for the book are constantly being updated. The version number listed in the [Releases](https://github.com/OpenSourceEcon/CompMethods/releases) section of the repository tracks the updates, as well as the [`CHANGELOG.md`](CHANGELOG.md) file.
12+
13+
As an open executable book project, this book is happy to receive, address, and incorporate collaborative additions, corrections, suggestions, and questions. Please see the [Contributor Guide]() in the book for how to best collaborate with the project.
14+
15+
[Richard W. Evans, Phd](https://sites.google.com/site/rickecon) ([@rickecon](https://github.com/rickecon)) is the author of the book and the core maintainer of this repository.
16+
17+
## Citing this book
18+
Please use the following citation form for this book.
19+
20+
General citation to the book:
21+
* Evans, Richard W., *Computational Methods for Economists using Python*, Open access Jupyter Book, v#.#.#, 2023, https://opensourceecon.github.io/CompMethods/.
22+
23+
Citation to a chapter in the book:
24+
* Evans, Richard W., "[insert chapter name]", in *Computational Methods for Economists using Python*, Open access Jupyter Book, v#.#.#, 2023, https://opensourceecon.github.io/CompMethods/[chapter path].

0 commit comments

Comments
 (0)