Skip to content

Latest commit

 

History

History
382 lines (381 loc) · 32.9 KB

ToDo.md

File metadata and controls

382 lines (381 loc) · 32.9 KB
  • Create API similar to restcountries where user can input alpha2 or country and return country info and subdivisions.
  • CRON job that runs on schedule that polls iso3166-updates json on GCP to check for any updates in codes.
  • Add last updated section to readme.
  • Add latest updates section to reame - mention if they've been implemented or not.
  • Create software package via pypi.
  • Add demo of software using Python notebook, put on Google Colab.
  • Add front-end demo.
  • Check output of bandit and flake8 check.
  • Remove .DS_Store or pycache from repo.
  • Add code coverage.
  • Add green MIT logo to Readme (https://shields.io/category/license).
  • Add "python3 -m twine upload --repository testpypi dist/*" to test pypi workflow.
  • Update build/test workflow, similar to pySAR.
  • Add emojis to readme
  • Change "secrets.PY_PI..." to "secrets.PYPI...".
  • Add path-ignore keywords to GitHub Action.
  • Add type of subdivision to object.
  • Add alpha2 key to each entry in iso3166-2.json and min.json.
  • Go through iso3166 updates for 2019 - 2022 to double check they're included in json.
  • Add parent code to subdivison json
  • Reorder software metadata in setup.py to be in order of main func, create description var.
  • Add spcae in between ISO3166
  • Reorder subdivision codes in json output - alphabetically and or numerically.
  • In unit tests, reorder subdivision names/codes arrays into alphabetcal/numerical order.
  • In subdivisions in json, add link to flag in iso3166-flag-icons, if no flag then null, skip if status code != 200.
  • Check for updates by calling export function and comparing new and old jsons.
  • Mention size of 2 json's in readme.
  • Remove all camel casing function names/vars, change to underscores and lowercase (https://peps.python.org/pep-0008/#function-and-variable-names).
  • Function, getSubdivisionNames(alpha2) - returns list of subdivision names. import iso3166_2 as iso, iso.subdivisions.getListofSubdivisionNames()
  • Function, getSubdivisionCodes(alpha2) - returns list of subdivision codes. import iso3166_2 as iso, iso.subdivisions.getListofSubdivisionCodes()
  • Lowercase keys in min json.
  • Remove name and subdivisions key from min json.
  • Add tqdm progress bar to getISO3166-2.py
  • Need to recall getISO3166-2.py when flag icon repo is public so flag url can be added to JSONs.
  • When checking flag_url endpoints, try .svg then .jpg then .png then .gif. Need to update JSON file.
  • How long does getISO3166_2.py script take? 1h 56, 116 mins (update this on script rerun).
  • Fix pytest badge on readme.
  • Add lat and long for each subdivision using google maps api (https://github.com/googlemaps/google-maps-services-python). Recall script to implement.
  • Add latlng unit tests to check they are approximately correct - The latitude must be a number between -90 and 90 and the longitude between -180 and 180.
  • Add latlng examples and comments to readme.
  • Double check that no latlng of the jsons contain invalid values or []. Put any invalids to null.
  • Make ISO3166-2 info accessible via an API, similar to restcountries.
  • Create frontend API, hosted on Vercel.
  • Frontend will pull iso3166-2.json from GCP Storage backend.
  • Implement some sort of update functionality that updates the iso3166-2.json for API every so often, use a CRON scheduler to call this update func every 3 - 6 months etc.
  • Mention frontend API in Readme, create readme for API documentation.
  • Country names with spaces arent working on API.
  • Run vulture library to search package and remove any unused code/vars.
  • Go over check_for_updates function, remove any instances of min object as it derives from main object.
  • In api unit tests, change test_request var to something more intuitive .
  • Reorder subdivision codes such that order doesn't go e.g. PA-1, PA-10, PA-2, PA,3 etc is incorrect.
  • In getISO3166_2.py script, add parameter in main func allowing user to pass in one or more alpha-2 codes to get data for.
  • Update all unit tests for line: "Expected output object of API to contain only the BJ key"
  • Adding multiple alpha-2 codes or names seperated by comma doesnt't return space.
  • Add test cases comments to test class.
  • subdivision_names() and subdvision_codes() functions can accept multiple alpha-2 codes as input - add unit tests for testing multiple.
  • Update API.md file to include new /name path.
  • If specific updates are made to a country's subdivision data then raise issue in iso3166-flag-icons repo from Cloud Function.
  • Maybe move check_for_update functions from GCP to Vercel to save money.
  • Add comment in iso3166.py script mentioning total number of countries currently supported.
  • Allow for multiple codes to be passed in using dot notation in getitem func.
  • Go through attributes.md fields, see if can add more info to field description, e.g adding "(km^2)" to area field.
  • Set latlng attribute to 4 d.p for subdivisons.
  • Double check correct files are being uploaded to pacakge, use Manifest file.
  • In unit tests when testing languages, test against the list of all languages.
  • Split up build and test workflow into different sections such as build, linter etc.
  • Go through all unit tests, any tests that are wrapped in with.selfAssertRaises()... , remove var assignment and just call function.
  • Double check area attribute, should have no d.p, if so round up.
  • Finish messages with test case.
  • If <10 alpha-2 codes input to export_iso3166_2 function then append to filename.
  • Double check, if no subdivisons etc for country then min.json shouldn't be exported.
  • Create colab notebook demo for software and API as well as get_all script.
  • If exporting 5 or less countries in get_iso3166_2.py script, don't show progress bar or elapsed time.
  • Double check softwre keywords on pypi, should there be spaces between keywords?
  • Test check-for-updates using subset of alpha-2 codes.
  • Might need to switch from Cloud Function to Compute Engine/Cloud Run as check-for-updates script takes ~2 hours to execute.
  • Double check Pypi package only contains wanted files/folders.
  • Double check check-for-updates func checks the values of each key and doesnt just check if key is present etc.
  • Rerun get_all script.
  • Reorder output JSON keys into alphabetical order.
  • In check-for-updates, don't save files to archive folder, return from function and upload object directly.
  • In check-for-updates yml, create, call and delete cloud func each time since it's only called every 3-6 months.
  • In check-for-updates instead of seperate Github repo env vars, just pass in single string of comma seperated repos.
  • In create_iisue, show before and after for each attribute.
  • Add iso3166-2.json filesize to readme.
  • Create GCP_architecture for check_for_updates readme showing Cloud Function, scheduler and bucket.
  • In check-for-updates, upload archive blob first.
  • If country doesnt have an attribute, add it to the dict and set to [] or {} - will have to recall script. Also need to update tests that do the len of output keys.
  • Change all comment underlining from "------" to "=======".
  • Fix self.attributes attribute in class.
  • Rerun script and update Cloud Storage object as well
  • Add some unit tests in for some country attributes that = NA.
  • Mention 36 data attributes supported.
  • Add 🧪 to test folders and desc
  • Add link for API documentation.
  • Add API section to readme.
  • Be able to return all country's that match a particular attribute value - update API unit tests to test such and update API.md.
  • Update check-for-updates scripts with new code in get_iso3166_2.py script - test it again.
  • Update API.md.
  • Mention in readme and iso3166-2 readme that "subdivision can be used interachangably with states/regions/provinces etc".
  • Read over and run get_.. notebook demo.
  • Mention that the library contains the flag info for each - from iso3166-flag-icons repo. In readme, add bullet pointed list of additional attributes incldued in object.
  • Reorder attributes file - include nested attributes.
  • 36 attributes and 28 sub attributes.
  • Run check-for-updates with a more optimised machine to allow it to fully execute in max timeout allowed.
  • Look at latest pycountry dataset was updated, go through iso3166-updates from that time checking if the updates communicatied are implemented in the ISO 3166-2 objects: https://iso3166-updates.com/api/year/2022 - DZ (subdivisions added), ET (subdivison added), FI (subdivision name change), GB (subdision deletion, addition, amendment), ID (addition of 3 provinces), IQ (subdivison addition, parent code update), IS (deletion and addtion of subdivisions, change of full name?), KP, KZ, MX, NP, NZ, PA, SI, TR. https://iso3166-updates.com/api/year/2021 - https://iso3166-updates.com/api/year/2020 : up-to-date.
  • Add link to medium article on readme.
  • Add github release (need to make repo public first).
  • Check variable naming conventions.
  • Any references of other softwares, put in `` and add link to it.
  • GB-NIR, GB-ENG, GB-SCT and GB-WLS absent from GB subdivision entry.
  • Mention that repo only contains officially assigned code elements and XK. Doesn't contain exceptional and transitional reservetations. Doesn't contain exceptional reservations but some have been reassinged (AZ, GG, IM, JE).
  • Add wiki link to each country: https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes.
  • Update number of attributes - 36 -> 37.
  • Add more filter attribute unit tests for when dict of keys/vals passed in.
  • Make individual attributes per subdivision accessible via dot notation.
  • Update check-for-updates func.
  • Double check elapsed time for get_ function is correct.
  • Change latlng to latLng
  • Mention add_subdivision func allows you to add custom objects/subdivisions to object.
  • Reorder subdivision attributtes - name, type, parent_code, flag_url, latlng - reorder in add_subdivision_data.
  • Allow for a custom csv to be imported into add_subdivision function, allowing for adding a long list of subdivisions in one go (columns: country code, subdivision code, name, type, parent_code, latLng, flag_url). Creat custom folder to store all these, append date to csv file.
  • When adding object to main iso3166-2.json, should keep a copy of the object just in case, add to an archive folder. When running unit tests, if they all pass then we can delete the archive folder and iobjects.
  • iso3166-2/iso3166-2-data/iso3166-2-copy.json <- file being edited with additional iso3166-2 data.
  • Add subdivisions CSV, add delete column that flags if a subdivision is to be deleted.
  • Add functionality such that you can change an existing subdivision code - add new code in brackets? - issue since countries are indexed by their subdivision codes.
  • Double check when adding "IQ,IQ-KR,Iqlīm Kūrdistān,Region,"IQ-AR, IQ-DA, IQ-SU"" via csv that the "" aren't added to the parent code section.
  • Am i testing all flag URLs are valid rather than just subsection?
  • Unit test for testing a country's parent code is in the list of subdivison codes.
  • Add local name key to object.
  • Update camel caseing on attributes.
  • Go through each subdivision name and double check its localName isnt name.
  • When running get_all script, create some functionality that automatically runs the csv files in order, making any additions/deletions/amendments to the object.
  • Unit test to check that no subdivision latLng's are None.
  • If subdivison code and name are both changing, need to put them as 2 seperate changes in the CSV, subdivision code first then name, e.g KZ-AST -> KZ-71 + name change Nur-Sultan -> Astana.
  • Create localName.csv - a CSV of all country's localnames/variants - open and parse in get_all script.
  • Add notes tab to subdivisions.csv that outlines the changes being made.
  • Add date Issued column to each row in subdivisions.csv - add in excel. Add before notes column.
  • Should attributes be accessible via dot notation? iso["GB-PEM].parent_code
  • Functions in iso3166_2.py were you can access all the attributes for a given ISO code. subdivision_parent_codes() - delete this?
  • Unit tests checking no subdivisions have a missing name, type or latlng
  • Go through exproted json file, validating changes have been made to file.
  • Remove AL-ABC.
  • Over 5000 subdivision codes
  • Remove attributes.md file and just put in readme.
  • Mention update to dir structure.
  • Double check what happens when we call the add_subdivision func on the same json file that has the stuff already added to it.
  • For delete and localNameSame columns in csv need to check if the column val ==1 and or None.
  • Execution of get_all script takes about 30 mins.
  • In update_subdivision func, keys aren't in same order, e.g KZ-31 vs KZ-33.
  • Some countries have localName = null, e.g kz-11, kz-15, kz-19 - when changing subd code.
  • Rejig get_all script once using iso3166-2 software - remove from requirements.txt.
  • Raise error if country code from subdivisions.csv not found in data object.
  • Rerun script after uploading to iso3166-flag-icons.
  • When reading in country and subd code in update_subdivision.csv - uppercase.
  • Add changes in subdivisions.csv to flag-icons repo.
  • Stop running geocoding api.
  • Skip get_all script until new one is implemented.
  • Reorder subdivisions.csv according to date, earliest first. Mention on readme that it's sorted by date.
  • Some countries not in correct order e.g PA-1, PA-10, PA-2
  • Need to manually remove code from Sweden's and PH country names/local names.
  • Update elapsed time - after iso3166-flag-icons repo.
  • Add tqdm to get_ script
  • Update readme, swap pycountry for iso3166-2.
  • When calling update_subdivisions() function, check order of attributes remains the same.
  • When calling local_names() function, check order of attributes remains the same.
  • For update_subdivisions(), check correct JSON is being used as input for the get_all script.
  • Run get script again but without gmaps.
  • Rerun script and run tests.
  • Mention # of tests and test cases (including skipped ones.)
  • Update metadata tests - similar to iso3166-updates.
  • Functionaltiy to add country/subdivision data in iso3166_2.py.
  • Change functions to parameter typed (https://docs.python.org/3/library/typing.html).
  • Add search functionality that allows you to search by name.
  • In search functionality, add alpha_2 code to it.
  • For localName, add different translations for subdivision names, use language code as key. If local name same as name then don't add language code keys.
  • Convert localNames.csv into a json?
  • Double check # of test functions/cases after running them.
  • Upload to conda: https://anaconda.org/conda-forge/pgeocode
  • iso3166-2.json in csv form.
  • Update table of contents.
  • Add tests for iso3166-2 CSV export.
  • Add to readme that some existing projects are inaccurate, outdated and or not maintained.
  • Update license.
  • Mention on readme that additional attributes for each subdivision will be available on the country-db repo including geonames ID, fips, area, population, regional translations etc. These are not included to try and reduce the size of the software and API, only including most useful info. Remove all the bloat that other repos have. Add a "What's in and what's out" section to readme, give examples e.g translations.
  • Add directories subsection to main readme and Table of contents.
  • If 1 subdivision code returned from class, return list not dict.
  • Remove subdivision_parent_codes() from iso3166_2.py
  • Mention for functions in iso3166_2 can return multiple data types depending if 1 or more country data is returned.
  • Codecov.
  • Subdivision names not exporting in alphabetical order.
  • /subd examples on api.md.
  • Double check links on readme work.
  • In update_subdivisions() function, if not getting all data, skip over rows that aren't equal to input country codes.
  • Add /subd example to docs.
  • Multiple subdivisions not returning in API.
  • Add additional API tests for /subd, passing in multiple list of subdivisions.
  • Search via subdivision name - might need to update /name endpoint.
  • Update API.md for /subd endpoint.
  • Update API.md and unit tests.
  • Update comments of api test case.
  • Add note mentioning interchangability of use of 'countries.'
  • In sofrware, search via numeric code as well - update unit tests.
  • Mention that searching via alpha-3 or numeric will return alpha-2.
  • In .subdivision_codes(), uppercase alpha input parameter.
  • In iso3166_2.py, change input param name from alpha2_code to alpha_code.
  • ES - for some subdivisions, spelling mistake in name (catalan names added but not english).
  • Update get_script, such that if a subdivision with a code that is already in the dataset is pulled, an error is raised with the existing and new subdivision details.
  • Update medium article.
  • Read over iso3166_2.py.
  • Read over non-api unit tests.
  • In sw, try searching for subdivision with comma in it.
  • In sw, in search function, add subdivision code as key when multiple subdivisions returned.
  • Query string parameter where you can set the likeness cutoff point, lowering the likeness threshold when searching for a name that might be in multiple subdivision names. Add api unit tests.
  • Change difflib to fuzzysearch for API and software.
  • In iso3166_2.py, change "any" param to "likeness".
  • Play about with scorer ratio in thefuzz - mention in comments which scorer is being used.
  • Search funtionality should return dict objecr rather than list of dicts.
  • Rearrange Usage and API contents in readme?
  • Update /docs
  • In api docs, put API funcs all into one section.
  • Check order of sections in readme.
  • In workflows, change "Testing with unittest" to "Running unit tests"
  • Change setup.py to pyprojet.tml - https://packaging.python.org/en/latest/tutorials/packaging-projects/ - swap for setup.cfg
  • /iso3166_2_data not being included in package - incorrect filename in MANIFEST file.
  • Remove reference to dot notation, no longer used.
  • Remove iso3166-2.json from iso3166_2_data folder.
  • Add more detail to examples in api.rst
  • Parameter typing https://docs.python.org/3/library/typing.html
  • Implement alpha-3 and numeric alpha codes in get_iso3166_2 and update_subdivision scripts.
  • Make custom subdivision section on readme.
  • Double check spelling using code-spell-checker extension
  • Remove '2 letter' and '3 letter' when referencing alpha-2 or alpha-3
  • Update medium article with new endpoint updates etc.
  • In get_.. script, add parameter that automatically exports data to CSV.
  • In get.. script, add flags of whether to include continent, region or subregion etc data - from restcountries. Update unit tests.
  • Allow all extra keys from restcountries to be added to each subdivision in get script.
  • If allowing for multiple keys from restcountries to be added, when sorting the final object, have a list of all available keys and sort using this list but autoamtically remove keys that arent in the object from the list.
  • Include return type for parameter typed functions.
  • In docs, ensure links are opening in another tab.
  • Switch string formatting to f string.
  • Mention in readme and usage exaples that you can select different keys from restcountries and append to each subdivision. Mention only using a subset of keys that are applicable.
  • Read over Medum article
  • Read over iso3166-2 sw
  • Read over scripts
  • Read over sw tests
  • Read over api tests
  • Read over get script tests
  • Read over iso3166_2_updates.
  • Split up workflow, similar to iso3166-updates.
  • Unit tests for search functionality using different likeness scores.
  • Add section on readme with links to other related repos.
  • If adding custom keys via restcountries, ensure they are also being exported to CSV.
  • If rest countries API attributes included and are a dict or an array, convert to string.
  • When adding custom subdivision, raise error if subdivision already there.
  • Searching for comma seperated list of places?
  • Read over docs
  • Double check when adding restcountries API keys that it can be exported to CSV.
  • Optionally remove other columns from get_all script e.g latLng, flag, parent_code etc. Keep country_code and subdivision_code cols. Add unit tests. Add to readme
  • Don't request flag URL if excluded in exclusion argument parameter.
  • In get_script, have a "start_from" parameter which dictates what alpha code to start from, it'll start from that code inclusive and get the remaining ISO codes.
  • Double check custom alpha codes put into get_all script are put in alphabetical order first.
  • Error when setting custom alpha start from, seems to be sorting wrong.
  • Double check why it's so slow.
  • For get_ script tests add output to f strings: "Expected list of subdivision codes doesn't match output..."
  • For update_subdivisons, need to pass in default args to be excluded.
  • If subdivision is updated in subdivision_updates.csv, new object may not include rest country keys. Need to pill them in as parameter.
  • Double check export has subdivision updates correct, e.g for GT.
  • Update add_local_names function if "name" or "localName" is excluded from attributes list.
  • Change localName to local/other name
  • Rerun get_all script.
  • In get_script, have 2 ways of importing update_subdivisions module if one fails, used when running script or running tests. if statement that imports one way if main == get script, else test script
  • When adding new subdivision from update_subdivision() function and restcountrykeys are applied, set their key values to Null or "". e,g fr-6ae, fr-69m - using next or previous generators. Resort alphabetically.
  • Double check not doing restcall for each subdivision and just once per country.
  • In update_subdivisions, swap out row['country-code] for country_code var.
  • In get_script, add more tests for subdivisions that are added/amended/deleted
  • Read over update_subdiv script.
  • For subdivisions whose subdivision codes have been updated in the update_subdivisions script, need to redo the script to get the flag URL e.g. GT-01, GT-02 ... KZ-11. Will need to rerun script to incorporate changes.
  • Put flag icons get request code into its own function, used 3 times in get scripts.
  • Add if name == "main" for update_subdivisions, so it can be directly called from cmd.
  • Run vulture library to get rid of unused code/functions/modules etc.
  • Update changelog.
  • Change json_filename and json_filepath to iso3166_2_filename
  • Change latLng to lat_lng in modules.
  • Rerun script to get update_subdivision fixes + correct attribute order in each object.
  • Update filesize in readme.
  • If a https:connection or requests.get error occurs when exporting all day, save the existing exported data up to that point instead of loosing export progress.
  • Add more try/except clauses to catch errors.
  • Move info about iso3166_2_scripts from main readme.
  • For scripts dir, add usage examples including terminal and importing via module import.
  • In update_subdivisions, raise error if no subdivision code input.
  • Error when adding new subdivision data via cmd line/terminal - some attributes not being added to output object, error when importing parent_code parameter as None:
  • When adding new subdivision data via cmd line/terminal, latLng attribute may be a string of a list, change to array (copy jsom is original)
  • When adding new subdivision data via cmd line/terminal, need to reorder attributes to normal order.
  • Add separate unit test instance for update_subdivisions script.
  • Run bandit and package security check
  • Raise error in update_subdivisons function when comma separated list of alpha codes input, only one should be input? Add unit tests
  • In update_subdivisions, when making custom change to object, double check that custom latLng values are set to 3.dp.
  • In cusom_subdivisions, when making custom change to object, double check that custom latLng values are set to 3.dp.
  • Add CHANGELOG.md - https://keepachangelog.com/en/1.0.0/
  • In test_iso3166_2 when testing custom_subdivision function, don't directly edit existing iso3166-2.json, create a hard copy and pass in the duplicate file name to function.
  • In test_iso3166_2 test format of each subdivision code XX-Y, XX-YY, XX-YYY etc.
  • Change flagUrl attribute to just flag?
  • In custom_subdivisons function, add a flag/parameter whereby if set it creates a hard copy of the existing iso3166-2.json object so it is not directly overwritten. Issue when using the software and iso3166-2.json will not contain added custom subdivision.
  • In test_get script, create a request session in setup and close session in tearDown to stop resource warning SSL socket no closed - https://stackoverflow.com/questions/48160728/resourcewarning-unclosed-socket-in-python-3-unit-test
  • In iso3166_2.py add repr class function, add more info to str. Add unit tests
  • In custom_subdivisions function, allow for the amendment of an exsting subdivision code, e.g changing its local name, flagUrl, latLng etc. Mention on readme that if erroneous data is found for an attribute/subdivision, you can raise an Issue but you could also implement it immediately into the object via the custom_subdivisions function.
  • Reorder subdivsion_updates.csv by date, most recent first.
  • Upgrade @checkout in workflow to checkout@v4.
  • In tests, exclude latLng attribute so gmaps API not used every time.
  • When amending an existing subdivison's code, add validation if the new subdivison's country code isn't the same as the original e.g JO-KA (SS-AG). For input param and subdivisoncs CSV input.
  • When amending an existing subdivision's code, check if a flag with the new subdivison code exists on the flag-icons repo, if not then keep flag url to the previous subd code. Do this for flagUrl input param as well as subdivisons CSV input.
  • Add export_csv parameter to get_iso3166_2 script to allow for optional export to CSV, JSON exported by default
  • When amending an existing subdivison's attribute, the latLng erroneously being set to None
  • Error with amending a subdivison with a new code.
  • In updates_subdivisions.py, if RHS of subdivision code input to subdivision_code parameter, try joining it up with alpha_code to make it valid. subdivision_code param can take RHS of subdivision code or full code. For input param and subdivisoncs CSV input.
  • Change current_subdivision_code to subdivison_code and replace row['code'] with subdivison_code, in update_subdivisions.py script. Error when amending subdivisons potentially
  • In subdivision_updates.csv, change country_code col to alpha_code.
  • Unit tests for validating the columns of CSV export.
  • In custom_subdivisions function, name and type_ parameter shouldn't be explicitly required. Set to None if not input. Add unit tests for just adding without these.
  • In custom_subdivisions function, subdivision code can accept with or without the '-', add the country code prefix to the LHS of it.
  • In get script unit tests, rename test_iso3166_2 vars.
  • Read over all test scripts, renaming vars.
  • Update docs with new custom_sudbvision functionality
  • On docs, add bullet pointed list of parameters for some functionalities.
  • latLng attribute can be input as a list of 2 str or a comma seperated str. If a comma seperated str then convert into list.
  • For functions that can take multiple data types, add Union keyword to function - https://plainenglish.io/blog/specifying-data-types-in-python-c182fda3bf43. Newer versions just use |
  • In custom_subdivision function, alpha_code and subdivision_code requried
  • In update_subdivisons, alpha_code and subdivison not required because of subdivisons_csv param
  • If custom path input to ISO3166_2(), add validation to see if path already has the full path to object in it, else append filepath to it.
  • when packaging, download from testpypi, checking correct files/dirs are downloaded, before publishing to pypi.
  • When adding restCountries keys to output, ensure they are in alphabetical order and appended to the end of the columns.
  • Rerun script with new flag atttribute, update filesize and execution time on readme.
  • Read over docs
  • Remove multiple return data types.
  • Update supported python version >3.10
  • Update 1.6.0 - 1.6.1
  • In update_subdivisons, when adding new subdivison, validate parentCode, if it doesnt exist raise error, unless current code being added is same as parent code input.
  • When updating_subdivision, can add restcountries keys even if other objects don't have these keys
  • Test for get_flag_url function
  • In get_flag URL, if only RHS of subdivision code input to its parameter, prepend alpha code to it.
  • Issue with nested objects in RestCountries - new function that parses the desired attributes
  • In restcountries request, raise for status to catch 404 error
  • Test adding restcountries keys when amending a subdivision code.
  • For some nested restcountirwes keys, if it is a list, join into a string of comma separated.
  • Update user agent headers for get requests, rotate headers.

Future Additions