-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Testing and reports #54
Merged
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
e92b280
switch settings.json to feather
AA-Turner 72897c8
Reformat settings.json
AA-Turner a7c7448
Adjust DATA_ROOT usage
AA-Turner 187f78f
Use super() calls in ONS PD classes
AA-Turner f9e1f9b
Add load census data flag
AA-Turner c52d3d3
Use TYPE_CHECKING instead of if False
AA-Turner 9f2637a
Move ONSPDStub to subclass ONSPD
AA-Turner 32bf481
Avoid shadowing builtin id
AA-Turner f73fc86
Add add_shape_data method
AA-Turner 1d9e9f7
Test using hypothesis
AA-Turner fcf5bf0
Add ScoutData.filter_records test
AA-Turner 2cc3451
Add tests for ScoutData.add_shape_data
AA-Turner b88edf4
Error explicitly for exclusion analysis
AA-Turner a037b11
Fix path for district mapping
AA-Turner 216f8ee
Quick fix in filter_records
AA-Turner 85d0eee
Add add_shapefile_data function
AA-Turner 72cbbd9
Use paths for ScoutData.add_shape_data
AA-Turner 276cc59
Minor update
AA-Turner 4db6dcb
Add age profile pivoting option
AA-Turner 05d68b3
Add sanity checks to populations
AA-Turner aaecb1e
Update age profile properties
AA-Turner 3340293
Type hints in test_base.py
AA-Turner 0ff2a8b
Simplify pyproject.toml
AA-Turner 533cfc9
Delete pytest.ini
AA-Turner 941af90
Bump python to 3.8
AA-Turner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -3,4 +3,4 @@ repos: | |
rev: stable | ||
hooks: | ||
- id: black | ||
language_version: python3.7 | ||
language_version: python3.8 |
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
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 |
---|---|---|
@@ -1,18 +1,2 @@ | ||
[tool.black] | ||
line-length = 180 | ||
exclude = ''' | ||
/( | ||
\.eggs | ||
| \.git | ||
| \.hg | ||
| \.mypy_cache | ||
| \.tox | ||
| \.venv | ||
| venv | ||
| _build | ||
| buck-out | ||
| build | ||
| dist | ||
| setup.py | ||
)/ | ||
''' |
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
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
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
from src.utility import DATA_ROOT | ||
from src.data.ons_pd import ONSPostcodeDirectory | ||
from pathlib import Path | ||
|
||
|
@@ -50,13 +49,11 @@ class ONSPostcodeDirectoryMay19(ONSPostcodeDirectory): | |
} | ||
|
||
def __init__(self, ons_pd_csv_path, load_data=True): | ||
ONSPostcodeDirectory.__init__( | ||
self, ons_pd_csv_path, load_data, ONSPostcodeDirectoryMay19.index_column, ONSPostcodeDirectoryMay19.fields, ONSPostcodeDirectoryMay19.data_types, | ||
) | ||
super().__init__(ons_pd_csv_path, load_data, self.index_column, ONSPostcodeDirectoryMay19.fields, ONSPostcodeDirectoryMay19.data_types) | ||
|
||
# Folder within the ONS Postcode Directory archive holding names and codes files | ||
names_codes_root = DATA_ROOT / Path(self.settings["ONS Names and codes folder"]).resolve() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. did you mean to remove DATA_ROOT? |
||
boundaries_dir = DATA_ROOT / Path(self.settings["Boundaries folder"]).resolve() | ||
names_codes_root = Path(self.settings["ONS Names and codes folder"]).resolve() | ||
boundaries_dir = Path(self.settings["Boundaries folder"]).resolve() | ||
|
||
# Paths to all shapefiles within the Boundaries folder | ||
# fmt: off | ||
|
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you mean to remove DATA_ROOT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I think so as
data/
is insettings.json
already https://github.com/the-scouts/geo_mapping/blob/4c6484d041d7a1ebc0fca964d714b68504d80faf/settings.json#L5-L6