OceanDataTools / openrvdas

An open source data acquisition system designed for use on research vessels and other scientific installations
http://openrvdas.org
Other
45 stars 21 forks source link

Django Rest Framework - Code review #378

Closed yoLewshi closed 6 months ago

yoLewshi commented 7 months ago

Pablo asked me to take a look at this. It all looks good to me just some minor tidying up, only change I would make is to group the endpoints which i've commented on below.

I wasn't able to tag @gabesargeant for a review but obviously keen to know what you think as you did all the work so far!

davidpablocohn commented 6 months ago

Thanks, Gabe and Lewis!

I've been pulling these changes incrementally into the issue_372 branch, but am realizing that that's probably been a bad idea, as I've lost track of what functionality I've merged in or not, and how close to convergence you two are on whether the code is ready for prime time. Low urgency, but could one of you give me a sanity check on where we are?

Thanks again, -p

On Wed, May 1, 2024 at 6:11 PM Gabriel Sargeant @.***> wrote:

@.**** commented on this pull request.

In django_gui/urls.py https://github.com/OceanDataTools/openrvdas/pull/378#discussion_r1586962939 :

 path('fields/', views.fields, name='fields'),

-

  • path('', views.index, name='index'),
  • #
  • API Dango REST Framework Views

  • #
  • DRF Spectacular urls.

  • path('api/schema/', SpectacularAPIView.as_view(), name='schema'),
  • path('api/schema/swagger-ui/', SpectacularSwaggerView.as_view(url_name='schema'), name='swagger-ui'),
  • path('api/schema/redoc/', SpectacularRedocView.as_view(url_name='schema'), name='redoc'),
  • These are the login and logout restframework urls

  • path('api/', include('rest_framework.urls', namespace='rest_framework')),

Hi, Have a glance at issue_372...gabesargeant:openrvdas:issue_372 https://github.com/OceanDataTools/openrvdas/compare/issue_372...gabesargeant:openrvdas:issue_372 those changes are pretty simple. WRT to your niwa_views.get_paths() If you defined your paths in a urlpatterns list, then you can do a similar import to like what I have with the API. I found this a pretty good read on the topic. https://docs.djangoproject.com/en/5.0/topics/http/urls/ Cheers.

— Reply to this email directly, view it on GitHub https://github.com/OceanDataTools/openrvdas/pull/378#discussion_r1586962939, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFO7V3QOXNHOUZXN7XBFE5LZAGHCTAVCNFSM6AAAAABG6D7LP2VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDAMZUGY3DSNJSHA . You are receiving this because your review was requested.Message ID: @.***>