Daniel Smith
fd0efa8b0c
Add more FeatureEntry converter tests ( #2485 )
...
* Add more feature entry converters tests
* code cleanup
2022-11-17 16:06:36 -08:00
Daniel Smith
26defeb307
Dev API unit tests ( #2486 )
...
* dev API unit tests
* code cleanup
2022-11-17 16:06:12 -08:00
Daniel Smith
bdf12e24d9
Add dev API to write and delete test data ( #2475 )
...
* Write and delete data for dev environments
* Add 2nd feature entry
* write old Feature entities as well
* More thorough commenting
* Make sure endpoints can only be used locally
* update return statements
* devtrial_instructions is a link
* changes suggested by @jrobbins
* comment change
2022-11-16 22:48:38 -08:00
Daniel Smith
733bc9a8c5
Use FeatureEntry entities to display roadmap information ( #2480 )
...
* refactor get_in_milestone() to use FeatureEntry
* Update comments
* changes suggested by @jrobbins
* update tests
2022-11-16 16:45:08 -08:00
Daniel Smith
2602d06d81
Update and handle deprecated views fields ( #2484 )
...
* Update and handle deprecated views fields
* value reference consistency
* changes suggested by @jrobbins
2022-11-16 16:09:14 -08:00
Daniel Smith
671b23a704
Use FeatureEntry entities for "All Features" page ( #2469 )
...
* Use FeatureEntry for displaying all features list
* remove TODO
* update testing for new function
* Update comments
2022-11-16 15:28:17 -08:00
Daniel Smith
a8d59e7559
Views field bug fix ( #2481 )
...
* Update converters.py
* add temporary migrate_fe_views function
2022-11-15 17:07:53 -08:00
Daniel Smith
d5ba6dc59a
Reference feature stages as possibly plural ( #2478 )
...
* Reference feature stages as possibly plural
* update tests
* Check that milestones is not null first
* extra line
2022-11-15 15:34:09 -08:00
Daniel Smith
e57ee74a68
Show motivation value in deprecation features ( #2464 )
2022-11-10 11:37:21 -08:00
Jason Robbins
6ed512c638
Check for undefined MilestoneSet. ( #2446 )
2022-11-08 09:00:14 -08:00
Daniel Smith
58e1dc4cf6
Update processes API to use FeatureEntry entities ( #2438 )
2022-11-06 13:00:26 -08:00
Daniel Smith
e2ce1d405e
Use FeatureEntry for most client-side use cases ( #2433 )
...
* Use FeatureEntry entity for most client-side uses
* leave notify and amendments to Feature for now
* handle redis keys
2022-11-06 12:57:40 -08:00
Jason Robbins
d9eb639ac5
Display a "Comments & activity" log at the bottom of the feature detail page. ( #2413 )
...
* Intial code for display of amendments
* tests
* More tests, and avoid showing non-useful amendments
* More tests
* Put Loading... in a paragraph tag.
* Indent amendment details
2022-11-02 13:58:37 -07:00
Jason Robbins
b9a657b3f0
Implement chromedash-gate-chip. ( #2421 )
2022-11-02 13:23:03 -07:00
Daniel Smith
c12b3a7c87
Verbose FeatureEntry to JSON function ( #2410 )
...
* verbose FeatureEntry to json function
* detailed commenting for clarity
* changes suggested by @jrobbins
2022-11-02 10:25:27 -07:00
Jason Robbins
bb973677f2
Do double-writes of star_count. ( #2428 )
2022-11-02 10:04:48 -07:00
Jason Robbins
5ece792be3
Upgrade search to use FeatureEntry ( #2416 )
...
* Partial progress
* "me" queries and tests
* maybe work around mypy error
2022-10-31 10:34:30 -07:00
Daniel Smith
49814ec1fa
Use Vote and Gate entities for handling approvals ( #2402 )
...
* basic refactoring
* Use Vote and Gate entities for reading and writing
* update tests
* remove old Approval to JSON function
* type hints
* Add gate_type to Vote entity
* review changes
- Remove stage and gate info from format_for_template()
- Add new Vote index
- Change approvals_api.do_post() to take gate type rather than gate id.
2022-10-27 13:20:44 -07:00
Daniel Smith
87a7a23d1f
Move Feature methods to helper files ( #2407 )
...
* type hints
* Revert "type hints"
This reverts commit 9ffab5aabd
.
* Move feature functions to separate helpers file
* remove import
* more import removal
* end of file newline
* mypy ignore ndb
* @jrobbins review changes
- Removed older standardization field logic
- Added TODO for migration script for values in migrate_views()
2022-10-27 10:17:54 -07:00
Daniel Smith
49fb21595d
Run mypy in Github continuous integration checks ( #2324 )
...
* run mypy in CI
* more type hint fixing
* Update requirements.txt
* google.cloud import workaround
https://github.com/python/mypy/issues/10360
* Revert "google.cloud import workaround"
This reverts commit e03dbc7bbeb67acc81f57b9c5d905b9141952dbc.
* mypy google.cloud workaround
https://github.com/python/mypy/issues/12985
* fix regular tests
* remove --install-types flag
* last mypy fix
* type fixes for address_reasons
* move email lists creation
* update for newly merged changes
* Fix regular tests
* Changes suggested by @jrobbins
* Catch invalid requests
* small type hint
* Change methods to properly override
* revert to previous implementation
* revert test
* add back original validate request type method
* remove unused import and rearrange methods
* remove comment string casting; add test back
* add ndb ignore
* Update test_html_rendering.html
* mypy fix
* remove merge addition
2022-10-24 06:40:21 -07:00
Daniel Smith
a0aa5ccb42
Schema migration staging fixes 2022-10-19 ( #2369 )
...
* staging fixes 2022-10-19
- Fixed approval_defs.set_vote() to write gate_id properly to Vote entity (previously was erroneously writing gate_type to gate_id).
- Created Gate entities in tests to allow Vote entities to be properly written.
- Incremented stage counts in schema_migration script properly reflect the amount of stages created.
- Removed Vote double-write call in Approval.set_approval() (this is no longer needed).
* Update approval_defs.py
2022-10-19 14:53:45 -07:00
Kyle Ju
582a594aa8
Use get_int_arg for integer arg parsing ( #2359 )
...
* Replace with get_int_arg usage
* Address comments
Co-authored-by: Kyle Ju <kyleju@chromium.org>
2022-10-19 14:08:42 -07:00
James C Scott III
385d62374b
Add assertions for the templates in #2355 (Part 2 of 2) ( #2356 )
...
* Add assertions for the templates in #2355
- Move the TESTDATA functionality to a testing_config to be a test helper.
In this new helper, users can still retreive from it like a dictionary.
In addition, there's a helper function to help make goldens that can be
used to regenerate the golden templates. Add commented out
code to use it.
- Add some clean ups to individual tests or test cases. This was needed
because some of the existing rendering tests would pull from the database.
But since they only asserted for the existence of some values, it did
not matter. In the future, we can add mocks for all of those.
- These cleanups also help for more than the rendering tests. Before these fixes, there were ~15 non-rendering tests that would fail if a developer ran the full suite with a clean db, then re-ran a test indivdually without resetting the database. There are still 2 non-rendering tests that fail without clearing the database first. But this first iteartion got a lot of them.
- Add a missing test for the PrepublicationHandler to increase coverage
* address comments
* more cleanup
2022-10-19 10:14:52 -04:00
Kyle Ju
dca47ebe61
Unify int arg parsing ( #2357 )
...
Co-authored-by: Kyle Ju <kyleju@chromium.org>
2022-10-18 15:22:38 -07:00
Kyle Ju
beec3b1488
Add num query param for metrics data ( #2354 )
...
* Add num query param for metrics data
* Fix
* Address comments
Co-authored-by: Kyle Ju <kyleju@chromium.org>
2022-10-18 13:55:29 -07:00
Jason Robbins
9e5aa80726
Add pagination parmeters to feature search API. ( #2352 )
2022-10-18 10:02:03 -07:00
Daniel Smith
1dd6211cb5
Refactor Gate and Vote to update Gate state when setting Votes ( #2341 )
...
* refactor Gate and Vote
* small type hints
* changes suggested by @jrobbins
2022-10-16 08:43:52 +02:00
Daniel Smith
9ed293d7a2
Change existing handler classes to properly override request methods ( #2342 )
...
* Change methods to properly override
* Update comments_api.py
* Update comments_api.py
2022-10-16 08:39:35 +02:00
Daniel Smith
93e57a44f3
Use new Activity entities to display comments ( #2321 )
...
* Use Activity entities to view comments
* Update review_models_test.py
* @jrobbins suggested changes
2022-10-12 13:02:35 +02:00
Daniel Smith
3d511e4553
Some introductory type hinting and refactoring ( #2319 )
...
* some introductory type hinting and refactoring
* Update user_models.py
2022-10-12 09:16:36 +02:00
Daniel Smith
75b7c85953
default values for some required fields ( #2310 )
2022-10-10 19:43:40 +02:00
Daniel Smith
7b08f2a6b8
Write and edit FeatureEntry entities when creating Features ( #2278 )
...
* Double write Feature and FeatureEntity entries
* Update tests
* tuples as needed
2022-10-03 10:11:05 -07:00
Daniel Smith
6843e32824
Schema migration writing comment activities ( #2273 )
2022-09-27 09:05:24 -07:00
Jason Robbins
c6982a460f
Omit cookies for metrics data requests because of Vary: Cookie ( #2268 )
...
* Omit cookies for metrics data requests because of Vary: Cookie
* Also omit cookies for timeline data.
2022-09-26 14:25:20 -07:00
Daniel Smith
a49ef32b30
Handle inactive users ( #2243 )
...
* handle inactive users
Notify inactive users at 6 months and remove inactive users at 9 months
* Changes suggested by @jrobbins
* update comment
2022-09-15 13:43:22 -07:00
Kyle Ju
ceb79c7a01
Flush metrics specific data in Redis ( #2235 )
...
* Migrate feature cache
* Flush metrics specific data in Redis
Co-authored-by: Kyle Ju <kyleju@chromium.org>
2022-09-14 10:19:12 -07:00
Kyle Ju
fe65355d6a
Completely migrate feature-related cache off ramcache ( #2234 )
...
* Implement scan
* Migrate feature cache
* Address comments
* Fix
* Add cache_key argument
Co-authored-by: Kyle Ju <kyleju@chromium.org>
2022-09-14 10:07:32 -07:00
Jason Robbins
0fc62d05ff
Clarify where we load features directly from the DB, not cache. ( #2239 )
2022-09-13 16:30:34 -07:00
Kyle Ju
e5f9a7b642
Create Redis staging setup ( #2211 )
...
* Redis staging setup
* Add an if for staging
* Implement Redis caching APIs (#2212 )
* Redis APIs
* Nit
* Partially migrate Ramcache usage to Redis (#2214 )
* Migrate all fields except feature-related cache
* Fix
* Address comments
Co-authored-by: Kyle Ju <kyleju@chromium.org>
Co-authored-by: Kyle Ju <kyleju@chromium.org>
Co-authored-by: Kyle Ju <kyleju@chromium.org>
2022-09-12 13:56:50 -07:00
Kuan-Hsuan (Kevin) Shen
34f38346b2
Move display field defs to JS and remove fielddefs API ( #2219 )
...
* Migrate guide/stage page forms to JS
* Complete migration of forms to JS
* Move display field defs to JS and remove fielddefs API
* Fix line separation bug
* Filter out `['']` values due to the anticipated spec change field change
* Fix typo
* Change anticipated_spec_changes to regular textarea
2022-09-08 18:28:30 -04:00
Kuan-Hsuan (Kevin) Shen
5c63667bd4
Avoid roadmap cards with the same version ( #2216 )
2022-09-07 12:25:09 -04:00
Kuan-Hsuan (Kevin) Shen
984455c18c
Populate blink components form field options via an API ( #2187 )
...
* Populate blink components form field options via an API
* remove console.log
* Add missing spaces
2022-08-31 13:42:50 -04:00
Daniel Smith
9970ec3d7a
Enable new permissions system ( #2174 )
...
* enable new permissions
* review changes
2022-08-26 15:30:55 -07:00
Jason Robbins
f03ebaaae7
Change NEED_INFO to NEEDS_WORK. ( #2170 )
2022-08-25 10:58:57 -07:00
Daniel Smith
1ae2ad5d35
Comment log improvements (delete and undelete comments) ( #2166 )
...
* comment timestamps match monorail
* remove logs
* add tests and handle corner cases
* use shoelace component
* allow deleting and undeleting comments
* Changes based on @jrobbins review
* cleanup
2022-08-24 16:08:01 -07:00
Jason Robbins
697cf9b38d
Refactor remaining models.py code into core_models.py ( #2160 )
...
* Refactor remaining models.py to core_models.py.
* Move tests to the right _test file.
2022-08-23 16:00:02 -07:00
Jason Robbins
ef12d38542
Refactor review-related models. ( #2152 )
...
* Refactor review-related models.
* fix typo
2022-08-22 10:34:10 -07:00
Jason Robbins
689483c0f3
Refactor user-related models into a separate file. ( #2141 )
2022-08-17 18:14:19 -07:00
Jason Robbins
567486d67a
Fix metrics JSONification. ( #2130 )
2022-08-15 20:11:54 -07:00
Kuan-Hsuan (Kevin) Shen
1ae5da72d4
Convert guide/edit page into a component ( #2118 )
...
* Remove guide.scss and convert edit page subheader
* Add progress API and convert rest of edit page
* Refine loading skeletons and unit tests
2022-08-15 12:04:36 -04:00