From 02bec3da5bc4d8b287bd5ecfa196fb2aed2b185b Mon Sep 17 00:00:00 2001 From: SylviaDu99 Date: Mon, 30 Sep 2024 12:35:57 -0700 Subject: [PATCH 1/3] chore: updated README.md fixes: issue #276 --- README.md | 108 +++++++++++++++++++++++++++++++++++++++++++ changelog_entry.yaml | 4 ++ 2 files changed, 112 insertions(+) diff --git a/README.md b/README.md index 836677ed..066146a3 100644 --- a/README.md +++ b/README.md @@ -5,3 +5,111 @@ [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) This package, a fork of [OpenFisca-Core](https://github.com/OpenFisca/OpenFisca-Core), powers PolicyEngine country models and apps. + +# Prerequisites + +Python 3.9 or beyond is required. + +# Setting Up + +## 1. Fork the repo + +``` +https://github.com/PolicyEngine/policyengine-core/fork +``` + +## 2. Clone your own fork + +## 3. Install dependencies + +``` +make install +``` + +If you are using Windows (not recommended), please install `make` first. +You can either directly download from [Make for Windows](https://gnuwin32.sourceforge.net/packages/make.htm); +or install [Chocolatey](https://chocolatey.org/install), and simply install `make` with + +``` +choco install make +``` + +(See **Acknowledgements** for credit) + +# Contributing + +## Choosing an Issue + +All of our code changes are made against a GitHub issue. If you're new to the project, go to **Issues** and search for good first issues `label: "good first issue"`. If you see an open issue that no one's opened a PR against, it's all yours! Feel free to make some edits, then open a PR, as described below. + +## Developing + +Keep your fork's `master` branch in sync with the original repo by pulling the original repo's code at times; typically (if the original repo is called "upstream" by Git) this means running `git pull upstream master`, then `git push origin master` to sync the code to your local repo. + +Create branches on your fork off of your master or main branch. Periodically, if you're working on something for a while, you might also run `git rebase master` within your feature branch to sync your code with any new changes. + +## Testing, Formatting, Changelogging + +You've finished your contribution, but now what? Before opening a PR, we ask contributors to do three things. + +### Step 1: Testing + +To test your changes against our series of automated tests, run + +``` +make test +``` + +We also ask that you add tests for any new features or bug-fixes you add, so we can gradually build up the code coverage. Our tests are written in the Python standard, [Pytest](https://docs.pytest.org/en/7.1.x/getting-started.html), and will be run again against the production environment, as well. + +### Step 2: Formatting + +In addition to the tests, we use [Black](https://github.com/psf/black) to lint our codebase, so before opening a pull request, Step 2 is to lint the code by running + +``` +make format +``` + +This will automatically format the code for you; no need to do anything else. + +### Step 3: Changelogging + +Finally, we ask contributors to make it clear for our users what changes have been made by contributing to a changelog. This changelog is formatted in YAML and describes the changes you've made to the code. This should follow the below format: + +``` +- bump: {major, minor, patch} + changes: + {added, removed, changed, fixed}: + - +``` + +For more info on the syntax, check out the [semantic versioning docs](https://www.semver.org) and [keep a changelog](https://www.keepachangelog.com). + +Write your changelog info into the empty file called `changelog_entry.yaml`. When you open your PR, this will automatically be added to the overall changelog. + +## Opening a Pull Request + +Now you've finished your contribution! Please open a pull request (PR) from your branch to the live `master` branch and request review. At times, it may take some time for the team to review your PR, especially for larger contributions, so please be patient--we will be sure to get to it. + +In the first line of your PR, please make sure to include the following: + +``` +Fixes {issue_number} +``` + +This makes it much easier for us to maintain and prune our issue board. + +Please try to be detailed in your PRs about the changes you made and why you made them. You may find yourself looking back at them for reference in the future, or needing insight about someone else's changes. Save yourself a conversation and write it all in the PR! + +Here are some [best practices](https://deepsource.io/blog/git-best-practices/) for using Git. + +When you're ready for review, switch the PR from `Draft` to `Ready for review`. + +# License + +Distributed under the AGPL License. See `LICENSE` for more info. + +# Acknowledgements + +- Thanks to Othneil Drew for his [README template](https://github.com/othneildrew/Best-README-Template). +- [Installing make on Windows](https://stackoverflow.com/questions/32127524/how-to-install-and-use-make-in-windows) diff --git a/changelog_entry.yaml b/changelog_entry.yaml index e69de29b..8f5d775a 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -0,0 +1,4 @@ +- bump: patch + changes: + changed: + - Updated README.md \ No newline at end of file From f7877c282004c051745fa58b97cd45baf5962eeb Mon Sep 17 00:00:00 2001 From: SylviaDu99 Date: Mon, 30 Sep 2024 18:18:31 -0700 Subject: [PATCH 2/3] chore: updated README.md, which now suggesting that python version 3.10 or beyond is required. fixes: issue #276 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 066146a3..c67bd756 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This package, a fork of [OpenFisca-Core](https://github.com/OpenFisca/OpenFisca- # Prerequisites -Python 3.9 or beyond is required. +Python 3.10 or beyond is required. # Setting Up From d6cb9fbdad1ffc182d80956a4eb11e4bef366aac Mon Sep 17 00:00:00 2001 From: SylviaDu99 Date: Tue, 1 Oct 2024 12:29:03 -0700 Subject: [PATCH 3/3] chore: removed python 3.9 support in setup.py fixes: issue #244 --- setup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 8954b634..4a8c2e8d 100644 --- a/setup.py +++ b/setup.py @@ -55,7 +55,6 @@ "License :: OSI Approved :: GNU Affero General Public License v3", "Operating System :: POSIX", "Programming Language :: Python", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -73,7 +72,7 @@ "policyengine-core=policyengine_core.scripts.policyengine_command:main", ], }, - python_requires=">=3.9", + python_requires=">=3.10", extras_require={ "dev": dev_requirements, },