Skip to content

Commit 6ed79b9

Browse files
committed
Update project configuration and add new examples
- Added for project metadata and dependencies. - Updated to include common editor files and build artifacts. - Introduced new example notebooks and markdown files for various models. - Updated existing notebooks to use Python 3.11. - Added new figures related to pension models and Gaussian process regression.
1 parent e6a1916 commit 6ed79b9

90 files changed

Lines changed: 111002 additions & 6187 deletions

File tree

Some content is hidden

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

.github/CONTRIBUTING.md

Lines changed: 101 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,101 @@
1-
See the [Scientific Python Developer Guide][spc-dev-intro] for a detailed
2-
description of best practices for developing scientific packages.
3-
4-
[spc-dev-intro]: https://learn.scientific-python.org/development/
5-
6-
# Quick development
7-
8-
The fastest way to start with development is to use nox. If you don't have nox,
9-
you can use `pipx run nox` to run it without installing, or `pipx install nox`.
10-
If you don't have pipx (pip for applications), then you can install with
11-
`pip install pipx` (the only case were installing an application with regular
12-
pip is reasonable). If you use macOS, then pipx and nox are both in brew, use
13-
`brew install pipx nox`.
14-
15-
To use, run `nox`. This will lint and test using every installed version of
16-
Python on your system, skipping ones that are not installed. You can also run
17-
specific jobs:
18-
19-
```console
20-
$ nox -s lint # Lint only
21-
$ nox -s tests # Python tests
22-
$ nox -s docs -- --serve # Build and serve the docs
23-
$ nox -s build # Make an SDist and wheel
24-
```
25-
26-
Nox handles everything for you, including setting up an temporary virtual
27-
environment for each run.
28-
29-
# Setting up a development environment manually
30-
31-
You can set up a development environment by running:
32-
33-
```bash
34-
python3 -m venv .venv
35-
source ./.venv/bin/activate
36-
pip install -v -e .[dev]
37-
```
38-
39-
If you have the
40-
[Python Launcher for Unix](https://github.com/brettcannon/python-launcher), you
41-
can instead do:
42-
43-
```bash
44-
py -m venv .venv
45-
py -m install -v -e .[dev]
46-
```
47-
48-
# Post setup
49-
50-
You should prepare pre-commit, which will help you by checking that commits pass
51-
required checks:
52-
53-
```bash
54-
pip install pre-commit # or brew install pre-commit on macOS
55-
pre-commit install # Will install a pre-commit hook into the git repo
56-
```
57-
58-
You can also/alternatively run `pre-commit run` (changes only) or
59-
`pre-commit run --all-files` to check even without installing the hook.
60-
61-
# Testing
62-
63-
Use pytest to run the unit checks:
64-
65-
```bash
66-
pytest
67-
```
68-
69-
# Coverage
70-
71-
Use pytest-cov to generate coverage reports:
72-
73-
```bash
74-
pytest --cov=SequentialEGM
75-
```
76-
77-
# Building docs
78-
79-
You can build the docs using:
80-
81-
```bash
82-
nox -s docs
83-
```
84-
85-
You can see a preview with:
86-
87-
```bash
88-
nox -s docs -- --serve
89-
```
90-
91-
# Pre-commit
92-
93-
This project uses pre-commit for all style checking. While you can run it with
94-
nox, this is such an important tool that it deserves to be installed on its own.
95-
Install pre-commit and run:
96-
97-
```bash
98-
pre-commit run -a
99-
```
100-
101-
to check all files.
1+
See the [Scientific Python Developer Guide][spc-dev-intro] for a detailed
2+
description of best practices for developing scientific packages.
3+
4+
[spc-dev-intro]: https://learn.scientific-python.org/development/
5+
6+
# Quick development
7+
8+
The fastest way to start with development is to use nox. If you don't have nox,
9+
you can use `pipx run nox` to run it without installing, or `pipx install nox`.
10+
If you don't have pipx (pip for applications), then you can install with
11+
`pip install pipx` (the only case were installing an application with regular
12+
pip is reasonable). If you use macOS, then pipx and nox are both in brew, use
13+
`brew install pipx nox`.
14+
15+
To use, run `nox`. This will lint and test using every installed version of
16+
Python on your system, skipping ones that are not installed. You can also run
17+
specific jobs:
18+
19+
```console
20+
$ nox -s lint # Lint only
21+
$ nox -s tests # Python tests
22+
$ nox -s docs -- --serve # Build and serve the docs
23+
$ nox -s build # Make an SDist and wheel
24+
```
25+
26+
Nox handles everything for you, including setting up an temporary virtual
27+
environment for each run.
28+
29+
# Setting up a development environment manually
30+
31+
You can set up a development environment by running:
32+
33+
```bash
34+
python3 -m venv .venv
35+
source ./.venv/bin/activate
36+
pip install -v -e .[dev]
37+
```
38+
39+
If you have the
40+
[Python Launcher for Unix](https://github.com/brettcannon/python-launcher), you
41+
can instead do:
42+
43+
```bash
44+
py -m venv .venv
45+
py -m install -v -e .[dev]
46+
```
47+
48+
# Post setup
49+
50+
You should prepare pre-commit, which will help you by checking that commits pass
51+
required checks:
52+
53+
```bash
54+
pip install pre-commit # or brew install pre-commit on macOS
55+
pre-commit install # Will install a pre-commit hook into the git repo
56+
```
57+
58+
You can also/alternatively run `pre-commit run` (changes only) or
59+
`pre-commit run --all-files` to check even without installing the hook.
60+
61+
# Testing
62+
63+
Use pytest to run the unit checks:
64+
65+
```bash
66+
pytest
67+
```
68+
69+
# Coverage
70+
71+
Use pytest-cov to generate coverage reports:
72+
73+
```bash
74+
pytest --cov=SequentialEGM
75+
```
76+
77+
# Building docs
78+
79+
You can build the docs using:
80+
81+
```bash
82+
nox -s docs
83+
```
84+
85+
You can see a preview with:
86+
87+
```bash
88+
nox -s docs -- --serve
89+
```
90+
91+
# Pre-commit
92+
93+
This project uses pre-commit for all style checking. While you can run it with
94+
nox, this is such an important tool that it deserves to be installed on its own.
95+
Install pre-commit and run:
96+
97+
```bash
98+
pre-commit run -a
99+
```
100+
101+
to check all files.

.github/workflows/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ permissions:
1818
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
1919
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
2020
concurrency:
21-
group: 'pages'
21+
group: "pages"
2222
cancel-in-progress: false
2323
jobs:
2424
deploy:
@@ -40,7 +40,7 @@ jobs:
4040
- name: Upload artifact
4141
uses: actions/upload-pages-artifact@v3
4242
with:
43-
path: './_build/html'
43+
path: "./_build/html"
4444
- name: Deploy to GitHub Pages
4545
id: deployment
4646
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)