-
Notifications
You must be signed in to change notification settings - Fork 6
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
Ticket/aotech 6694 data validation #46
Open
phatsk
wants to merge
132
commits into
themarcusbattle:ticket/AOTECH-6694-data-validation
Choose a base branch
from
jmichaelward:ticket/AOTECH-6694-data-validation
base: ticket/AOTECH-6694-data-validation
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
132 commits
Select commit
Hold shift + click to select a range
d606137
Basic beginning for validation.
phatsk 78e2e28
Stub out validation and result formatting in the Dashboard.
phatsk 71cbbc5
Stub out validation tab for Dashboard.
phatsk bbb1740
Add Validators
phatsk 197dfcf
Add main Validation class.
phatsk 0aa26e4
Merge branch 'master' into ticket/AOTECH-6694-data-validation
phatsk 2f9fb46
Merge branch 'ticket/AOTECH-6694-data-validation' of github.com:thema…
phatsk 298fc8e
Make API namespace a constant.
phatsk fdb247b
Remove commented code.
phatsk 4c5ca3b
Initial work on validation API responses.
phatsk 4c5066f
Add base API validation class.
phatsk d931188
Flesh out initial validators
phatsk 1a8611f
Use NAMESPACE constant in the API class.
phatsk 8356c41
Move URL building and remote request methods to API class.
phatsk 887a0c2
Properly address users without roles.
phatsk e0d55a0
Reverse logic of last sync check to be more logical.
phatsk fdc1e83
Add methods for getting local and destination data.
phatsk 4e76f45
Move API-specific code to proper file. Actually use Validator_API cla…
phatsk a0a0c4d
Refactor file structure in prep for validation work
3e01efb
Add User model class and update User validation endpoint to access it.
31c79d3
Update User Validation endpoint constructor and other minor fixes.
e7e5ad8
Set up initial taxonomy validation based on work from AOTECH-6699 tic…
8aad00c
Sanitize press_sync_key value, update to-do to check for valid nonces.
824de03
Give the Taxonomy API validation class a data source property so it c…
5a48fff
Merge pull request #31 from jmichaelward/ticket/AOTECH-6713-taxonomy-…
phatsk 48b54bb
Build out CLI scaffolding for Validation command.
7536579
Updates for validation endpoints
phatsk 6c545d1
Testing out CLI integration with API service to request remote data.
15fa56d
First pass at sample CLI output for term counts.
5d79622
Add check for URL parameter on multisite.
6c60ab0
Add throws PHPDoc to taxonomies method.
9c3548f
Rearrange logic for press sync key validation.
phatsk 4fb643d
Break some lines to make things cleaner.
phatsk 51df232
Update user classes
phatsk 2db04eb
Extract count methods into interface, update CLI command to match API…
b88371e
Initial scaffold of post validation.
7846d5b
Actually add post route to API.
103281a
Add initial comparison for post counts.
41d5e8f
Add options information to validate method.
8963bdd
Update comments in ValidationCommand class. Pass associative argument…
aa338ad
Work on outputting post data for local and remote sites.
95b6971
Refactor command setup for posts.
03a3368
Create TaxonomyValidator class and extend interface.
9e43eab
Restructure validation interfaces and change validation utility from …
2a34fc8
Class cleanup and documentation.
3c30788
Cleanup validators.
939f5f9
Add @since statements to Taxonomy model.
0c3ee9a
Refactor validators out of CLI client commands.
82c96e4
Add abstract validator to use compare method.
ce76df9
Merge pull request #37 from jmichaelward/ticket/AOTECH-6694-data-vali…
phatsk 26c9697
Merge branch 'ticket/AOTECH-6694-data-validation' of github.com:thema…
phatsk 09c73c8
Merge remote-tracking branch 'marcus/master' into ticket/AOTECH-6694-…
phatsk d8581f4
stub out user validation classes.
phatsk facace7
Update for user validation on CLI
phatsk ad22cbd
Add logic and output for taxonomy term post counts.
986adaf
Merge pull request #38 from jmichaelward/ticket/AOTECH-6713-taxonomy-…
phatsk e8a01cb
pass request args to API call.
phatsk df53951
Remove test count
phatsk 82845ad
Slice out the proper user from the results.
phatsk 2350385
Return base destination data.
phatsk 560ff1b
Update API side of getting user samples.
phatsk 55be9f7
Move match highlight args to validate method.
phatsk 0808219
Remove line reset from subcommand.
phatsk 60731dc
Document the find_sample_matches method.
phatsk 9a7dcff
Add interface for output formatting.
phatsk f4ce4a6
Abstract CLI commands now implement a formatter.
phatsk 19952c5
Refactor CLI User command.
phatsk 54f8baf
Update User Validation model data formats.
phatsk 589fc1a
Abstract method for getting outout formatting.'
phatsk 09cf55d
Move diff comparison to abstract validator.
phatsk 20efbd9
Consolidate and refactor the User Validator.
phatsk 4c7f5ea
Merge branch 'feature/validation-enhancements' into ticket/AOTECH-669…
phatsk e855338
Implement colorization on post count validation tables.
b5ab6a4
Initial pass at sample post route setup.
2e4dc7c
Build out get_sample return data.
9d57dd7
Fix TaxonomySubcommand to pass TaxonomyValidator required arguments.
4441781
Fix output_comparison_statements methods to accommodate latest changes.
8b8259b
Add logic for retrieving comparison sample data from destination site.
5941433
Merge branch 'master' into ticket/AOTECH-6694-data-validation
e77ccd7
Update API to run meta query against post ids from source.
5fa6862
Add 'dumb' table to output for sample.
bd9dc08
Add temporary error message for differing post counts in sample.
56f7a00
Set up API callbacks for sample post terms.
15476eb
Merge branch 'ticket/AOTECH-6694-data-validation' of github.com:jmich…
d35459d
Remove superfluous variable assignment in get_sample method.
b1d27be
Remove superfluous method from Post validation API route.
24549fe
Refactor Post route to match Taxonomy and User.
cf6103a
Add logic for getting sample taxonomy term meta.
8ea30f2
Modify data structure in taxonomy term meta response.
d6b9b2c
Merge branch 'master' into ticket/AOTECH-6694-data-validation
a508d94
Refactor client output into separate classes.
344e31f
Add client output architecture to project, fix validation of posts, u…
e1fd739
Remove redundant line from API class.
4fe899e
Sort sample posts by ID and fix API endpoint error.
fdd0b96
Fix issue with mismatched sample post IDs getting compared.
69e0038
Revert to using post IDs for comparison.
b042713
Add a key to sample post comparison that indicates whether a post ID …
4690cd5
Update post model for returning formatted terms data.
529d432
Merge branch 'ticket/AOTECH-6694-data-validation' of github.com:jmich…
4c2d610
WIP on SampleTax output, update post taxonomy output to use same post…
c1848ec
Merge branch 'ticket/AOTECH-6694-data-validation' of github.com:jmich…
8b5df5a
WIP to normalize source and destination data counts.
4e877f1
Finish generalizing data normalization and comparison indexing.
42ea243
Add post taxonomy validation output for CLI.
9183625
Merge remote-tracking branch 'github/master' into ticket/AOTECH-6694-…
phatsk 81061ac
Merge branch 'ticket/AOTECH-6694-data-validation' of github.com:thema…
2a2e8e4
Merge branch 'ticket/AOTECH-6694-data-validation' of github.com:jmich…
8a0e542
Move source_data and destination_data properties into the AbstractVal…
f717e34
Assign get_terms to variable before using in foreach.
baf01ee
Replace get_term_slugs helper method with wp_list_pluck.
9e87846
Assign get_terms to variable before use in foreach in another method …
dee6a76
WIP shifting taxonomy validation output responsibilities to rendering…
05aeecb
Continued WIP shift to moving display responsibilities to concrete im…
93d5b9d
Change call on taxonomy source data model to get_data from get_count.
3c73d31
Fix double-nested count array indices.
8f63cf3
Additional fixes in shift to moving output responsibility to concrete…
38d80af
Finish unstyled taxonomy count comparison table output.
ede2eaa
Finalized rendered comparision table in cli for taxonomy counts.
524df9b
Refine the count output a bit.
ecdfb0a
WIP refactoring post counts by term.
b45b87f
WIP setting up post_terms endpoint.
2b37021
Simply and randomize output for taxonomy term post count data in CLI.
698f145
Fix migration data in taxonomy post count table.
480f7f1
Give additional line spacing between tables.
1ed06cb
Clarify message before table output of sample taxonomy post counts.
26df553
Index arrays by term-taxonomy key instead of term_id, since they may …
907adb6
Add optional third parameter for colorizing output to allow for alter…
06a567a
Remove iconography from post count sample tables.
ebbdfbe
Replace emoji in validation count tables with colorized yes/no values.
18ae69d
Remove emoji from post sample table.
c6d8201
Replace emoji in sample post taxonomies table with yes/no values.
c50ea7e
Update array fields in PostSampleTax.php.
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
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
namespace Press_Sync\client\output; | ||
|
||
/** | ||
* Class TaxonomySample | ||
* | ||
* @package Press_Sync\client\output | ||
*/ | ||
class TaxonomySample extends AbstractOutput { | ||
/** | ||
* Render data to the client. | ||
* | ||
* @since NEXT | ||
* @return mixed | ||
*/ | ||
public function render() { | ||
$this->output( $this->data['comparison'], 'Post counts by taxonomy term:' ); | ||
} | ||
/** | ||
* @param array $data | ||
* @param string $message | ||
*/ | ||
public function output( array $data, $message = '' ) { | ||
\WP_CLI\Utils\format_items( 'table', $data['term_count_by_taxonomy'], array( 'taxonomy_name', 'number_of_terms' ) ); | ||
} | ||
} |
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
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.
I'm seeing a weird character like a crossed-through zero.