Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

renamed openverse-api directory to openverse_api #228

Merged
merged 29 commits into from
Sep 24, 2021

Conversation

MuhammadFaizanHaidar
Copy link
Contributor

@MuhammadFaizanHaidar MuhammadFaizanHaidar commented Sep 22, 2021

Fixes

Fixes #223 by @zackkrida

Description

Added Directory naming consistency.

Technical details

renamed openverse-api directory to openverse_api.

Checklist

  • My pull request has a descriptive title (not a vague title like Update index.md).
  • My pull request targets the default branch of the repository (main or master).
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added or updated tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible errors.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@MuhammadFaizanHaidar MuhammadFaizanHaidar requested a review from a team as a code owner September 22, 2021 13:50
@zackkrida zackkrida added 🛠 goal: fix Bug fix 🤖 aspect: dx Concerns developers' experience with the codebase labels Sep 22, 2021
@obulat
Copy link
Contributor

obulat commented Sep 22, 2021

The tests are failing, probably because you also need to change this line:

build: openverse-api/

Copy link
Contributor

@obulat obulat left a comment

Choose a reason for hiding this comment

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

Please, try to change the line I mentioned in the dockerfile, and see if the tests in checks pass.

updated build: openverse-api/  to build: openverse_api/
@obulat
Copy link
Contributor

obulat commented Sep 22, 2021

Thank you for quick changes :)
Now, there is a problem with the GitHub actions check because it's still looking for files in openverse-api:

run: pycodestyle openverse-api/catalog --exclude='openverse-api/catalog/api/migrations,openverse-api/catalog/example_responses.py' --max-line-length=80 --ignore=E402,E702

There are several places in that file where you need to change openverse-api to openverse_api

@MuhammadFaizanHaidar
Copy link
Contributor Author

Thank you for quick changes :)
Now, there is a problem with the GitHub actions check because it's still looking for files in openverse-api:

run: pycodestyle openverse-api/catalog --exclude='openverse-api/catalog/api/migrations,openverse-api/catalog/example_responses.py' --max-line-length=80 --ignore=E402,E702

There are several places in that file where you need to change openverse-api to openverse_api

sure 👍🏻

@MuhammadFaizanHaidar
Copy link
Contributor Author

MuhammadFaizanHaidar commented Sep 22, 2021

Thank you for quick changes :)
Now, there is a problem with the GitHub actions check because it's still looking for files in openverse-api:

run: pycodestyle openverse-api/catalog --exclude='openverse-api/catalog/api/migrations,openverse-api/catalog/example_responses.py' --max-line-length=80 --ignore=E402,E702

There are several places in that file where you need to change openverse-api to openverse_api

sure 👍🏻

Updated all of em.

@MuhammadFaizanHaidar
Copy link
Contributor Author

@obulat its still looking with wrong directory name.

@zackkrida
Copy link
Member

Hello @MuhammadFaizanHaidar, I was able to create a list of all the places where openverse-api is still referenced. All of these need to be renamed to openverse_api. This is such a great example of how a seemingly simple change can have many effects and be more complicated than you might think!

api on  openverse_api_dr_renamed +1/-1 [$!?]
❯ rg 'openverse-api'
CONTRIBUTORS.md
1:# openverse-api contributors (sorted alphabetically by last name)

CONTRIBUTING.md
15:If you find a bug, please open an issue in this repository describing the bug. You can file a bug [here](https://github.com/wordpress/openverse-api/issues/new?template=bug_report.md). You will see a bug report template with the required information you should provide.
21:If you have an idea of a new feature or change to how the Openverse API works, please [start a discussion](https://github.com/WordPress/openverse-api/discussions/new?category=ideas) so we can discuss the possibility of that change or new feature being implemented and released in the future. This lets us come to an agreement about the proposed idea before any work is done.
27:If you want to get started contributing code to this project but don't know exactly what to work on, we compiled a good list of issues labeled as [`good first issue`](https://github.com/wordpress/openverse-api/labels/good%20first%20issue) which are small in scope and not so complex to solve. There are also issues labeled as [`help wanted`](https://github.com/wordpress/openverse-api/labels/help%20wanted) which can be a bit more complex but are good examples of things we are currently accepting help from the community.
91:Feel free to [join us on Slack](https://make.wordpress.org/chat/) and discuss the project with the engineers and community memebers on #openverse. We also use [GitHub discussions](https://github.com/WordPress/openverse-api/discussions) for feature requests, troubleshooting, and other 'off-topic' conversations.

analytics/docs/swagger.yaml
11:    url: "https://github.com/wordpress/openverse-api/blob/master/LICENSE"

openverse_api/catalog/settings.py
72:        'LOGOS_BUCKET', 'openverse-api-logos-prod'

openverse_api/catalog/urls/swagger.py
18:              "WordPress/openverse-api/blob/master/LICENSE"

openverse_api/catalog/api/docs/README.md
3:The Openverse API ('openverse-api') is a system that allows programmatic access
101:[contributing on Github](https://github.com/wordpress/openverse-api), here’s a
111:  [link](https://github.com/wordpress/openverse-api#running-the-server-locally)
114:  [file](https://github.com/wordpress/openverse-api/blob/master/.github/workflows/integration-tests.yml)

README.md
5:The Openverse API (`openverse-api`) is a system that allows programmatic access to public domain digital media. It is our ambition to index and catalog [billions of openly-licensed works](https://stateof.creativecommons.org/), including articles, songs, videos, photographs, paintings, and more. Using this API, developers will be able to access the digital commons in their own applications.
26:git clone https://github.com/WordPress/openverse-api.git
97:- _openverse-api_ is a Django Rest Framework API server. For a full description of its capabilities, please see the [browsable documentation](https://api.openverse.engineering).
173:You are welcome to take any open issue in the tracker labeled [`help wanted`](https://github.com/WordPress/openverse-api/labels/help%20wanted) or [`good first issue`](https://github.com/WordPress/openverse-api/labels/good%20first%20issue); **there's no need to ask for permission in advance**. Other issues are open for contribution as well, but may be less accessible or well-defined in comparison to those that are explicitly labeled.

DOCUMENTATION_GUIDELINES.md
15:- Run the server locally by following this [link](https://github.com/wordpress/openverse-api#running-the-server-locally)
17:- Make sure the updates passed the automated tests in this [file](https://github.com/wordpress/openverse-api/blob/master/.github/workflows/integration-tests.yml)

openverse_api/catalog/api/utils/scheduled_tasks.py
14:inside of the cache (shared by all instances of openverse-api).

ingestion_server/README.md
17:![How indexing works](https://github.com/wordpress/openverse-api/blob/master/ingestion_server/howitworks.png)

ingestion_server/ingestion_server/categorize.py
4:https://github.com/wordpress/openverse-api/issues/340

@dhruvkb
Copy link
Member

dhruvkb commented Sep 22, 2021

Also, there are a large number of merge conflicts after #224.

@zackkrida zackkrida self-requested a review September 22, 2021 17:53
@MuhammadFaizanHaidar
Copy link
Contributor Author

Hello @MuhammadFaizanHaidar, I was able to create a list of all the places where openverse-api is still referenced. All of these need to be renamed to openverse_api. This is such a great example of how a seemingly simple change can have many effects and be more complicated than you might think!

api on  openverse_api_dr_renamed +1/-1 [$!?]
❯ rg 'openverse-api'
CONTRIBUTORS.md
1:# openverse-api contributors (sorted alphabetically by last name)

CONTRIBUTING.md
15:If you find a bug, please open an issue in this repository describing the bug. You can file a bug [here](https://github.com/wordpress/openverse-api/issues/new?template=bug_report.md). You will see a bug report template with the required information you should provide.
21:If you have an idea of a new feature or change to how the Openverse API works, please [start a discussion](https://github.com/WordPress/openverse-api/discussions/new?category=ideas) so we can discuss the possibility of that change or new feature being implemented and released in the future. This lets us come to an agreement about the proposed idea before any work is done.
27:If you want to get started contributing code to this project but don't know exactly what to work on, we compiled a good list of issues labeled as [`good first issue`](https://github.com/wordpress/openverse-api/labels/good%20first%20issue) which are small in scope and not so complex to solve. There are also issues labeled as [`help wanted`](https://github.com/wordpress/openverse-api/labels/help%20wanted) which can be a bit more complex but are good examples of things we are currently accepting help from the community.
91:Feel free to [join us on Slack](https://make.wordpress.org/chat/) and discuss the project with the engineers and community memebers on #openverse. We also use [GitHub discussions](https://github.com/WordPress/openverse-api/discussions) for feature requests, troubleshooting, and other 'off-topic' conversations.

analytics/docs/swagger.yaml
11:    url: "https://github.com/wordpress/openverse-api/blob/master/LICENSE"

openverse_api/catalog/settings.py
72:        'LOGOS_BUCKET', 'openverse-api-logos-prod'

openverse_api/catalog/urls/swagger.py
18:              "WordPress/openverse-api/blob/master/LICENSE"

openverse_api/catalog/api/docs/README.md
3:The Openverse API ('openverse-api') is a system that allows programmatic access
101:[contributing on Github](https://github.com/wordpress/openverse-api), here’s a
111:  [link](https://github.com/wordpress/openverse-api#running-the-server-locally)
114:  [file](https://github.com/wordpress/openverse-api/blob/master/.github/workflows/integration-tests.yml)

README.md
5:The Openverse API (`openverse-api`) is a system that allows programmatic access to public domain digital media. It is our ambition to index and catalog [billions of openly-licensed works](https://stateof.creativecommons.org/), including articles, songs, videos, photographs, paintings, and more. Using this API, developers will be able to access the digital commons in their own applications.
26:git clone https://github.com/WordPress/openverse-api.git
97:- _openverse-api_ is a Django Rest Framework API server. For a full description of its capabilities, please see the [browsable documentation](https://api.openverse.engineering).
173:You are welcome to take any open issue in the tracker labeled [`help wanted`](https://github.com/WordPress/openverse-api/labels/help%20wanted) or [`good first issue`](https://github.com/WordPress/openverse-api/labels/good%20first%20issue); **there's no need to ask for permission in advance**. Other issues are open for contribution as well, but may be less accessible or well-defined in comparison to those that are explicitly labeled.

DOCUMENTATION_GUIDELINES.md
15:- Run the server locally by following this [link](https://github.com/wordpress/openverse-api#running-the-server-locally)
17:- Make sure the updates passed the automated tests in this [file](https://github.com/wordpress/openverse-api/blob/master/.github/workflows/integration-tests.yml)

openverse_api/catalog/api/utils/scheduled_tasks.py
14:inside of the cache (shared by all instances of openverse-api).

ingestion_server/README.md
17:![How indexing works](https://github.com/wordpress/openverse-api/blob/master/ingestion_server/howitworks.png)

ingestion_server/ingestion_server/categorize.py
4:https://github.com/wordpress/openverse-api/issues/340

@zackkrida I have replaced all those occurrences with openverse_api now.

Copy link
Contributor

@obulat obulat left a comment

Choose a reason for hiding this comment

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

Thank you so much for such detailed changes! This PR definitely turned out larger than I expected :)
The repository name on GitHub still remains WordPress/openverse-api, with a dash and not underscore, so I've added code suggestions inline to change the GitHub URLs back. You can simply commit them in batch, and then this PR should be ready.

CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
DOCUMENTATION_GUIDELINES.md Outdated Show resolved Hide resolved
DOCUMENTATION_GUIDELINES.md Outdated Show resolved Hide resolved
openverse_api/catalog/api/docs/README.md Outdated Show resolved Hide resolved
.github/release-drafter.yml Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
openverse_api/catalog/api/docs/README.md Outdated Show resolved Hide resolved
openverse_api/catalog/urls/swagger.py Outdated Show resolved Hide resolved
@MuhammadFaizanHaidar
Copy link
Contributor Author

Thank you so much for such detailed changes! This PR definitely turned out larger than I expected :)
The repository name on GitHub still remains WordPress/openverse-api, with a dash and not underscore, so I've added code suggestions inline to change the GitHub URLs back. You can simply commit them in batch, and then this PR should be ready.

Yeah I was also not expecting this. I changed these urls following the earlier comment by @zackkrida .

Co-authored-by: Olga Bulat <[email protected]>
Co-authored-by: Olga Bulat <[email protected]>
Co-authored-by: Olga Bulat <[email protected]>
@zackkrida zackkrida requested a review from obulat September 23, 2021 16:05
@MuhammadFaizanHaidar
Copy link
Contributor Author

@dhruvkb integration-tests.yml line 54 I think it has to be openverse-api_analytics_1 instead of openverse_api_analytics_1? It looks for openverse_api_analytics_1 container but openverse-api_analytics_1 is created.
analytics

@dhruvkb
Copy link
Member

dhruvkb commented Sep 24, 2021

@MuhammadFaizanHaidar this was fixed in 608b63c.

CONTRIBUTORS.md Outdated Show resolved Hide resolved
@obulat
Copy link
Contributor

obulat commented Sep 24, 2021

Thank you for your contribution and your persistence, @MuhammadFaizanHaidar !

@MuhammadFaizanHaidar
Copy link
Contributor Author

Thank you for your contribution and your persistence, @MuhammadFaizanHaidar !

@obulat pleasure is all mine.

@obulat obulat dismissed dhruvkb’s stale review September 24, 2021 10:11

The review issue has been addressed, and the tests are passing.

@obulat obulat merged commit b667f0a into WordPress:main Sep 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🤖 aspect: dx Concerns developers' experience with the codebase 🛠 goal: fix Bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Directory naming consistiency
4 participants