-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from PolicyEngine/docs-book
Add Jupyter Book documentation
- Loading branch information
Showing
37 changed files
with
275 additions
and
532 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## Updating data | ||
|
||
If your changes present a non-bugfix change to one or more datasets which are cloud-hosted (FRS and EFRS), then please change both the filename and URL (in both the class definition file and in `storage/upload_completed_datasets.py`). This enables us to store historical versions of datasets separately and reproducibly. | ||
|
||
## Updating the versioning | ||
|
||
Please add to `changelog.yaml` and then run `make changelog` before committing the results ONCE in this PR. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
{{changelog}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from policyengine_us_data.__version__ import __version__ | ||
|
||
|
||
def fetch_version(): | ||
try: | ||
return __version__ | ||
except Exception as e: | ||
print(f"Error fetching version: {e}") | ||
return None | ||
|
||
|
||
if __name__ == "__main__": | ||
print(fetch_version()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
last_tagged_commit=`git describe --tags --abbrev=0 --first-parent` | ||
git --no-pager diff $last_tagged_commit -- CHANGELOG.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#! /usr/bin/env bash | ||
|
||
IGNORE_DIFF_ON="README.md CONTRIBUTING.md Makefile docs/* .gitignore LICENSE* .github/* data/*" | ||
|
||
last_tagged_commit=`git describe --tags --abbrev=0 --first-parent` # --first-parent ensures we don't follow tags not published in master through an unlikely intermediary merge commit | ||
|
||
if git diff-index --name-only --exit-code $last_tagged_commit -- . `echo " $IGNORE_DIFF_ON" | sed 's/ / :(exclude)/g'` # Check if any file that has not be listed in IGNORE_DIFF_ON has changed since the last tag was published. | ||
then | ||
echo "No functional changes detected." | ||
exit 1 | ||
else echo "The functional files above were changed." | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#! /usr/bin/env bash | ||
|
||
if [[ ${GITHUB_REF#refs/heads/} == master ]] | ||
then | ||
echo "No need for a version check on master." | ||
exit 0 | ||
fi | ||
|
||
if ! $(dirname "$BASH_SOURCE")/has-functional-changes.sh | ||
then | ||
echo "No need for a version update." | ||
exit 0 | ||
fi | ||
|
||
current_version=`python .github/fetch_version.py` | ||
|
||
if git rev-parse --verify --quiet $current_version | ||
then | ||
echo "Version $current_version already exists in commit:" | ||
git --no-pager log -1 $current_version | ||
echo | ||
echo "Update the version number in setup.py before merging this branch into master." | ||
echo "Look at the CONTRIBUTING.md file to learn how the version number should be updated." | ||
exit 1 | ||
fi | ||
|
||
if ! $(dirname "$BASH_SOURCE")/has-functional-changes.sh | grep --quiet CHANGELOG.md | ||
then | ||
echo "CHANGELOG.md has not been modified, while functional changes were made." | ||
echo "Explain what you changed before merging this branch into master." | ||
echo "Look at the CONTRIBUTING.md file to learn how to write the changelog." | ||
exit 2 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#! /usr/bin/env bash | ||
|
||
git tag `python .github/fetch_version.py` # create a new tag | ||
git push --tags || true # update the repository version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [1.1.0] - 2024-09-17 18:05:27 | ||
|
||
### Changed | ||
|
||
- Lightened dependency list. | ||
|
||
## [1.0.0] - 2024-09-09 17:29:10 | ||
|
||
### Added | ||
|
||
- Initialized changelogging | ||
|
||
|
||
|
||
[1.1.0]: https://github.com/PolicyEngine/policyengine-us-data/compare/1.0.0...1.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
- changes: | ||
added: | ||
- Initialized changelogging | ||
date: 2024-09-09 17:29:10 | ||
version: 1.0.0 | ||
- bump: minor | ||
changes: | ||
changed: | ||
- Lightened dependency list. | ||
date: 2024-09-17 18:05:27 |
Empty file.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
title: PolicyEngine UK data | ||
author: PolicyEngine | ||
copyright: "2024" | ||
logo: logo.png | ||
|
||
execute: | ||
execute_notebooks: off | ||
|
||
repository: | ||
url: https://github.com/policyengine/policyengine-uk-data | ||
branch: master | ||
path_to_book: docs | ||
|
||
sphinx: | ||
config: | ||
html_js_files: | ||
- https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.7/require.min.js | ||
html_theme: furo | ||
pygments_style: default | ||
html_css_files: | ||
- style.css | ||
nb_remove_code_source: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@import url('https://fonts.googleapis.com/css2?family=Roboto+Serif:[email protected]&family=Roboto:wght@300&display=swap'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
format: jb-book | ||
root: intro | ||
chapters: | ||
- file: methodology.ipynb | ||
- file: validation.ipynb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.