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

Rename catalogue_item_properties to properties #293 #294

Merged
merged 6 commits into from
Jun 20, 2024

Conversation

joelvdavies
Copy link
Collaborator

@joelvdavies joelvdavies commented Jun 14, 2024

Description

Renames

  • catalogue_item_properties -> properties
  • catalogue_item_property -> property
  • CatalogueItemProperty -> CatalogueCategoryProperty

Where necessary have replaced the resulting property variable name with either property_in for database models, or category_property for schemas.

See ral-facilities/inventory-management-system#662 for front end.

Should not be merged until dev is migrated.

Note

Could we also simplify some schema names by removing the Request in them? The method type already implies its a request to me. In fact in the front end we don't even have the schema e.g. CatalogueItemPostRequestSchema could be CatalogueItemPost which is imported from schemas.

Testing instructions

  • Review code
  • Check Actions build

Agile board tracking

Closes #293

@joelvdavies joelvdavies added the enhancement New feature or request label Jun 14, 2024
@joelvdavies joelvdavies self-assigned this Jun 14, 2024
@joelvdavies joelvdavies force-pushed the rename-catalogue-item-properties-#293 branch from d8fc119 to e28fd61 Compare June 17, 2024 09:48
@joelvdavies joelvdavies requested a review from VKTB June 17, 2024 10:05
@joelvdavies joelvdavies marked this pull request as ready for review June 17, 2024 10:05
joshuadkitenge added a commit to ral-facilities/inventory-management-system that referenced this pull request Jun 17, 2024
joshuadkitenge added a commit to ral-facilities/inventory-management-system that referenced this pull request Jun 17, 2024
Copy link
Collaborator

@VKTB VKTB left a comment

Choose a reason for hiding this comment

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

Could we also simplify some schema names by removing the Request in them? The method type already implies its a request to me. In fact in the front end we don't even have the schema e.g. CatalogueItemPostRequestSchema could be CatalogueItemPost which is imported from schemas.

Possibly but we need to make sure that there are no conflicts. It would be an issue if we end up with conflicting class names and having to import this in the same module.


Some initial questions below:

inventory_management_system_api/core/exceptions.py Outdated Show resolved Hide resolved
inventory_management_system_api/core/exceptions.py Outdated Show resolved Hide resolved
inventory_management_system_api/models/catalogue_item.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@joshuadkitenge joshuadkitenge left a comment

Choose a reason for hiding this comment

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

Works well with the front end

@joelvdavies
Copy link
Collaborator Author

Possibly but we need to make sure that there are no conflicts. It would be an issue if we end up with conflicting class names and having to import this in the same module.

Yeah good point, having Schema would resolve that part. I know this also effects some things Joshua is doing on the front end, as there Schema is now being used for form schemas whereas the api schemas are just in a types file without any mention of schema. I think its worth coordinating between us but its a post mvp thing.

@joelvdavies joelvdavies force-pushed the rename-catalogue-item-properties-#293 branch from 78b3a4e to 4fa71dd Compare June 17, 2024 14:31
@joelvdavies
Copy link
Collaborator Author

@VKTB I had a look at the other service's, I think the use of properties don't need renaming as they are specific to the entity involved e.g. CatalogueCategoryService only deals with catalogue category properties. So I think it was just the property service that needed the renaming as it deals with all of them unless you spot anything else.

inventory_management_system_api/services/utils.py Outdated Show resolved Hide resolved
inventory_management_system_api/services/utils.py Outdated Show resolved Hide resolved
inventory_management_system_api/services/utils.py Outdated Show resolved Hide resolved
inventory_management_system_api/services/utils.py Outdated Show resolved Hide resolved
inventory_management_system_api/services/utils.py Outdated Show resolved Hide resolved
@VKTB
Copy link
Collaborator

VKTB commented Jun 18, 2024

@joelvdavies A lot of the requested changes are related to catalogue item property / catalogue item properties being replaced with an empty space instead of property / properties. This is the case in the tests but I didn't go and suggest changes as it would take me quite some time.

@joelvdavies joelvdavies force-pushed the rename-catalogue-item-properties-#293 branch from 3e4ed9e to 9afd5d0 Compare June 18, 2024 12:50
@joelvdavies
Copy link
Collaborator Author

@VKTB Sorry about that, I thought I had only done it to a few files but I didn't realise I had done it everywhere. I have gone through the tests searching for double spaces for . and fixed the rest I found.

@joelvdavies joelvdavies requested a review from VKTB June 18, 2024 13:27
@VKTB VKTB merged commit 595451e into develop Jun 20, 2024
6 checks passed
@VKTB VKTB deleted the rename-catalogue-item-properties-#293 branch June 20, 2024 08:16
joshuadkitenge added a commit to ral-facilities/inventory-management-system that referenced this pull request Jun 21, 2024
* develop: (22 commits)
  Update httpd:2.4.59-alpine3.20 Docker digest to 71f38b7
  Update Node.js to 6ce211b
  changed disabled rpws text to `text.secondary` #507
  Point CI API tests back to develop #661
  update breadcrumbs snapshot
  changed tooltip labels to say `details` #507
  removed uneeded aria-label in breadcrumbs #507
  refactored external links test #689
  removed string used for debugging
  updated snapshots #507
  fixed breadcrumbs fastpass issue #507
  changed aria-label  in overflow tooltip
  changed obsolete replacement table unselectable item text colour #507
  added label to obsolete reason textfield #507
  improved colour contrast in cat cat dialog #507
  added aria-label to tooltip #507
  point at ral-facilities/inventory-management-system-api#294 for the e2e tests
  Rename catalogue_item_properites to properties #661
  added aria label to tooltip in items dialog
  obsolete dialog textbox given label #507
  ...
joshuadkitenge added a commit to ral-facilities/inventory-management-system that referenced this pull request Jun 21, 2024
…i-functions-#674

* Fix-Manufacturer-types-#664: (23 commits)
  Omit overridden types #664
  Update httpd:2.4.59-alpine3.20 Docker digest to 71f38b7
  Update Node.js to 6ce211b
  changed disabled rpws text to `text.secondary` #507
  Point CI API tests back to develop #661
  update breadcrumbs snapshot
  changed tooltip labels to say `details` #507
  removed uneeded aria-label in breadcrumbs #507
  refactored external links test #689
  removed string used for debugging
  updated snapshots #507
  fixed breadcrumbs fastpass issue #507
  changed aria-label  in overflow tooltip
  changed obsolete replacement table unselectable item text colour #507
  added label to obsolete reason textfield #507
  improved colour contrast in cat cat dialog #507
  added aria-label to tooltip #507
  point at ral-facilities/inventory-management-system-api#294 for the e2e tests
  Rename catalogue_item_properites to properties #661
  added aria label to tooltip in items dialog
  ...
joshuadkitenge added a commit to ral-facilities/inventory-management-system that referenced this pull request Jun 21, 2024
…ufacturers-#663

* rename-maufacturer-api-functions-#674: (23 commits)
  Omit overridden types #664
  Update httpd:2.4.59-alpine3.20 Docker digest to 71f38b7
  Update Node.js to 6ce211b
  changed disabled rpws text to `text.secondary` #507
  Point CI API tests back to develop #661
  update breadcrumbs snapshot
  changed tooltip labels to say `details` #507
  removed uneeded aria-label in breadcrumbs #507
  refactored external links test #689
  removed string used for debugging
  updated snapshots #507
  fixed breadcrumbs fastpass issue #507
  changed aria-label  in overflow tooltip
  changed obsolete replacement table unselectable item text colour #507
  added label to obsolete reason textfield #507
  improved colour contrast in cat cat dialog #507
  added aria-label to tooltip #507
  point at ral-facilities/inventory-management-system-api#294 for the e2e tests
  Rename catalogue_item_properites to properties #661
  added aria label to tooltip in items dialog
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename catalogue_item_properites to properties in catalogue categories
3 participants