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

Add a script to create provider API script template #128

Merged
merged 1 commit into from
Jul 9, 2021

Conversation

obulat
Copy link
Contributor

@obulat obulat commented Jul 9, 2021

Fixes WordPress/openverse#1734
This script will make it easier for new contributors to add provider API scripts by giving them a Cookiecutter-like script for writing Provider API scripts. It creates the skeletons of the script, workflow file and tests.

To run the script, create and activate a virtual environment, navigate to the templates folder and run it with provider name as a parameter:

cd src/cc_catalog_airflow/templates/
python3 create_api_script.py <provider_name>

This will create three files:

  1. The API provider script with a skeleton implementation
  2. The test file (blank)
  3. The workflow file which doesn't really need much change, I suppose.

There are some instructions and a lot of #TODO comments in the file.

This PR contains all the changes from #93, that I accidentally merged into licenses branch instead of main.

Signed-off-by: Olga Bulat obulat@gmail.com

This script will make it easier for new contributors to add provider API scripts by giving them the skeletons of the script, workflow file and tests

Signed-off-by: Olga Bulat <obulat@gmail.com>
@obulat obulat requested a review from a team as a code owner July 9, 2021 13:56
@obulat obulat requested review from zackkrida and dhruvkb July 9, 2021 13:56
@obulat obulat merged commit bf5ebd2 into main Jul 9, 2021
@obulat obulat deleted the api_script_template branch July 9, 2021 14:53
@zackkrida zackkrida added the 🌟 goal: addition Addition of new feature label Aug 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🌟 goal: addition Addition of new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Add a Provider API Script template
2 participants