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

Remove Django filters #2635

Closed
agjohnson opened this Issue Feb 7, 2017 · 11 comments

Comments

Projects
None yet
8 participants
@agjohnson
Contributor

agjohnson commented Feb 7, 2017

We aren't using Django Filters project anymore, this dependency should be removed. This will require some updates to the code where it is expected.

@ericholscher

This comment has been minimized.

Show comment
Hide comment
@ericholscher

ericholscher Feb 8, 2017

Member

I believe it's used in REST Framework, but the in page filters aren't being used. It broke our pagination on Builds in #2633, so it might also be breaking other stuff, and is unnecessary complexity.

Member

ericholscher commented Feb 8, 2017

I believe it's used in REST Framework, but the in page filters aren't being used. It broke our pagination on Builds in #2633, so it might also be breaking other stuff, and is unnecessary complexity.

@vardhan26

This comment has been minimized.

Show comment
Hide comment
@vardhan26

vardhan26 Feb 9, 2017

I would like to fix this bug but I am new and do not know how to start. how can I fix this?

vardhan26 commented Feb 9, 2017

I would like to fix this bug but I am new and do not know how to start. how can I fix this?

@humitos

This comment has been minimized.

Show comment
Hide comment
@humitos

humitos Feb 17, 2017

Member

@vardhan26 I started today to take a look at the code, but what I would do is something like:

  1. read this http://docs.readthedocs.io/en/latest/contribute.html
  2. install readthedocs project in my computer following http://docs.readthedocs.io/en/latest/install.html#installing-read-the-docs
  3. remove django-filter (pip uninstall django-filter)
  4. run tests (python manage.py test)
  5. see what fails
  6. try to fix them
  7. runserver (python manage.py runserver)
  8. try to build different projects again (python manage.py update_repos pip)
  9. create a PR
  10. be happy to be a contributor :)
Member

humitos commented Feb 17, 2017

@vardhan26 I started today to take a look at the code, but what I would do is something like:

  1. read this http://docs.readthedocs.io/en/latest/contribute.html
  2. install readthedocs project in my computer following http://docs.readthedocs.io/en/latest/install.html#installing-read-the-docs
  3. remove django-filter (pip uninstall django-filter)
  4. run tests (python manage.py test)
  5. see what fails
  6. try to fix them
  7. runserver (python manage.py runserver)
  8. try to build different projects again (python manage.py update_repos pip)
  9. create a PR
  10. be happy to be a contributor :)
@ChamanAgrawal

This comment has been minimized.

Show comment
Hide comment
@ChamanAgrawal

ChamanAgrawal Mar 8, 2017

hey @agjohnson , @humitos do i have to debug all the 174 errors and 25 failures and then send PR or I can debug few and contribute ?

ChamanAgrawal commented Mar 8, 2017

hey @agjohnson , @humitos do i have to debug all the 174 errors and 25 failures and then send PR or I can debug few and contribute ?

@rixx

This comment has been minimized.

Show comment
Hide comment
@rixx

rixx Mar 9, 2017

Contributor

@vardhan26, @humitos, @ChamanAgrawal: are you working on this issue atm?

Contributor

rixx commented Mar 9, 2017

@vardhan26, @humitos, @ChamanAgrawal: are you working on this issue atm?

@humitos

This comment has been minimized.

Show comment
Hide comment
@humitos

humitos Mar 9, 2017

Member

@rixx No, I'm not. Would you like to?

I would like to fix my previous command to run the tests: tox -e py27, since they are using tox in RTD :)

Member

humitos commented Mar 9, 2017

@rixx No, I'm not. Would you like to?

I would like to fix my previous command to run the tests: tox -e py27, since they are using tox in RTD :)

@rixx

This comment has been minimized.

Show comment
Hide comment
@rixx

rixx Mar 9, 2017

Contributor

@agjohnson

I found the following uses of django_filters:

  • core.urls uses views from django_filters.views in deprecated_urls; I assume those are to be deleted?
  • projects.filters and builds.filters define lots of filters that are used as filter_class in restapi.views.model_views, and are passed as context sometimes in projects.views.public

I'd appreciate guidance as to what to do with those, especially those used in restapi.views.model_filters and projects.views.public.

Contributor

rixx commented Mar 9, 2017

@agjohnson

I found the following uses of django_filters:

  • core.urls uses views from django_filters.views in deprecated_urls; I assume those are to be deleted?
  • projects.filters and builds.filters define lots of filters that are used as filter_class in restapi.views.model_views, and are passed as context sometimes in projects.views.public

I'd appreciate guidance as to what to do with those, especially those used in restapi.views.model_filters and projects.views.public.

fmoor added a commit to fmoor/readthedocs.org that referenced this issue May 23, 2017

@agjohnson agjohnson reopened this Jun 5, 2017

@agjohnson agjohnson closed this Jul 7, 2017

@agjohnson agjohnson removed the Next Release label Jul 7, 2017

@JLorne

This comment has been minimized.

Show comment
Hide comment
@JLorne

JLorne Jul 13, 2017

Contributor

Sorry to write a comment in a closed issue, but I don't know where to put it.

We are using readthedocs as our documentation build system and we are using the REST API to monitoring the build status of the different versions of our repositories. Now that you removed django-filter, do you have another way to use the REST API without having to parse all builds from the beginning of time?

Contributor

JLorne commented Jul 13, 2017

Sorry to write a comment in a closed issue, but I don't know where to put it.

We are using readthedocs as our documentation build system and we are using the REST API to monitoring the build status of the different versions of our repositories. Now that you removed django-filter, do you have another way to use the REST API without having to parse all builds from the beginning of time?

@davidfischer

This comment has been minimized.

Show comment
Hide comment
@davidfischer

davidfischer Jul 5, 2018

Contributor

@JLorne while going through some of these issues I found this. It is now possible to filter builds by project. For example, you can do something like https://readthedocs.org/api/v2/build/?project__slug=pip (that's a double underscore). Hopefully this meets your needs.

APIv2 is also now documented. Since the RTD team is going through some initial design on a v3 API, I'd love to understand your use case a bit better so we can better meet it.

Contributor

davidfischer commented Jul 5, 2018

@JLorne while going through some of these issues I found this. It is now possible to filter builds by project. For example, you can do something like https://readthedocs.org/api/v2/build/?project__slug=pip (that's a double underscore). Hopefully this meets your needs.

APIv2 is also now documented. Since the RTD team is going through some initial design on a v3 API, I'd love to understand your use case a bit better so we can better meet it.

@JLorne

This comment has been minimized.

Show comment
Hide comment
@JLorne

JLorne Jul 7, 2018

Contributor

Thank you @davidfischer for the filterable v2 API.
We are using it to monitor documentation build status for our 160 internal repositories and display build fail on TV. But we need to keep track of the build status of some versions in addition of the latest. I add a custom API that add build API with some query parameters:

  • api/build?slug=pip&version=v9.0.3 => returns all pip v9.0.3 builds ordered by dates (latest first)
Contributor

JLorne commented Jul 7, 2018

Thank you @davidfischer for the filterable v2 API.
We are using it to monitor documentation build status for our 160 internal repositories and display build fail on TV. But we need to keep track of the build status of some versions in addition of the latest. I add a custom API that add build API with some query parameters:

  • api/build?slug=pip&version=v9.0.3 => returns all pip v9.0.3 builds ordered by dates (latest first)
@davidfischer

This comment has been minimized.

Show comment
Hide comment
@davidfischer

davidfischer Jul 8, 2018

Contributor

Currently only the slug is used for filtering. For performance reasons, we wanted to make sure that things you can filter on are indexed in the database. I don't believe the version parameter in https://readthedocs.org/api/v2/build/?project__slug=pip&version=v9.0.3 does anything.

Contributor

davidfischer commented Jul 8, 2018

Currently only the slug is used for filtering. For performance reasons, we wanted to make sure that things you can filter on are indexed in the database. I don't believe the version parameter in https://readthedocs.org/api/v2/build/?project__slug=pip&version=v9.0.3 does anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment