Skip to content
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

377 main script #34

Merged
merged 13 commits into from
Jun 28, 2024
Merged

377 main script #34

merged 13 commits into from
Jun 28, 2024

Conversation

shilohd
Copy link
Collaborator

@shilohd shilohd commented Jun 18, 2024

Summary

Add your summary here - keep it brief, to the point, and in plain English.

Checklists

This pull request meets the following requirements:

  • installable with all dependencies recorded
  • runs without error
  • follows PEP8 and project specific conventions
  • appropriate use of comments, for example no descriptive comments
  • functions documented using Numpy style docstings
  • assumptions and decisions log considered and updated if appropriate
  • unit tests have been updated to cover essential functionality for a reasonable range of inputs and conditions
  • other forms of testing such as end-to-end and user-interface testing have been considered and updated as required
  • tests suite passes (locally as a minimum)
  • peer reviewed with review recorded

If you feel some of these conditions do not apply for this pull request, please
add a comment to explain why.

Copy link
Collaborator

@Jday7879 Jday7879 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had issues running main script - See comment on main.py. Happy to discuss this further or show what error I was getting
One function is missing doc strings.
Other than that all other code looks great and passes unit tests and pre-commit hook tests.

import json


def load_config(path="config.json"):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function is missing doc strings. Seems a pretty self explanatory function based on its name but might be worth adding quickly

# basic logging
# kwargs in config

config = load_config()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to install research_and_development==1.0.0 to get main script to run. Getting error relating to json loading on L19.

@Jday7879
Copy link
Collaborator

Branch has been reviewed and passes all tests and could be merged. Not merging into main until 374 and 376 branches are merged to check for conflicts

Jday7879 and others added 8 commits June 19, 2024 16:36
* Create function to change datatypes

* Update config to use nested dictionary for column and data type

* Added test to verify functionality

* Added functionality to drop cols without deleting type

* Corrected function inputs

* Adding docstrings

* Corrected differences in types for reference

* Adding comments

* Modified main to test implementation

* Update to raise ValueError when datatypes are different

* Refactored to add functions to validate datatype inputs and if repeated cols have conflicting types

* Adding docstrings to validation functions

* Updated function to work with reference and period as index. Currently resets index but looking into avoiding this

* Cleaned up function and documentation

* Remove print statement

* Update module path to pass unit tests
merging main to fix conflicts
Copy link
Collaborator

@Jday7879 Jday7879 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy for code to be merged

@Jday7879 Jday7879 merged commit 629d20c into main Jun 28, 2024
3 checks passed
@Jday7879 Jday7879 deleted the 377-main-script branch June 28, 2024 10:45
lhubbardONS pushed a commit that referenced this pull request Jul 4, 2024
* add config and change src name

* begin to filter input data

* basic date preparation

* Corrected module path so unit tests run correctly

* Update Requirements

* Commenting out packages not on PyPI

* Validate input datasets (#39)

* 374 convert types (#37)

* Create function to change datatypes

* Update config to use nested dictionary for column and data type

* Added test to verify functionality

* Added functionality to drop cols without deleting type

* Corrected function inputs

* Adding docstrings

* Corrected differences in types for reference

* Adding comments

* Modified main to test implementation

* Update to raise ValueError when datatypes are different

* Refactored to add functions to validate datatype inputs and if repeated cols have conflicting types

* Adding docstrings to validation functions

* Updated function to work with reference and period as index. Currently resets index but looking into avoiding this

* Cleaned up function and documentation

* Remove print statement

* Update module path to pass unit tests

* Moving validation checks into validation_checks.py from data_cleaning

* Updated module path

* Update docstrings

---------

Co-authored-by: roberw <[email protected]>
Co-authored-by: dayj1 <[email protected]>
Co-authored-by: Jordan-Day-ONS <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants