File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import argparse
2+ import tomllib
23import os
34
45
56def main ():
67 # First, find the current package version number from the setup.py file
7- with open ("pyproject.toml" , "r " ) as f :
8- setup = f . read ( )
9- version = setup . split ( " version = " )[ 1 ]. split ( "," )[ 0 ]. strip ( '"' )
8+ with open ("pyproject.toml" , "rb " ) as f :
9+ data = tomllib . load ( f )
10+ version = data [ "project" ][ "version" ]
1011 # Then, clone the https://github.com/policyengine/policyengine-api repo using the GitHub CLI
1112 pat = os .environ ["GITHUB_TOKEN" ]
1213 os .system (
@@ -18,7 +19,7 @@ def main():
1819 )
1920 # Repeat the above for https://github.com/policyengine/policyengine-household-api
2021 os .system (
21- f"git clone https://nikhilwodruff :{ pat } @github.com/policyengine/policyengine-household-api"
22+ f"git clone https://nikhilwoodruff :{ pat } @github.com/policyengine/policyengine-household-api"
2223 )
2324
2425 # Then, cd inside and run gcp/bump_country_package.py --country policyengine-uk --version {version}
Original file line number Diff line number Diff line change 1+ - bump : patch
2+ changes :
3+ changed :
4+ - Updated script to open automated API update PRs
You can’t perform that action at this time.
0 commit comments