Skip to content

Commit

Permalink
cleanup template
Browse files Browse the repository at this point in the history
  • Loading branch information
samansmink committed Feb 29, 2024
1 parent 6bbdfb7 commit 59ad0e3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion scripts/bootstrap-template.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
from pathlib import Path

shutil.copyfile(f'docs/NEXT_README.md', f'README.md')
os.remove(f'docs/NEXT_README.md')
os.remove(f'docs/README.md')

if (len(sys.argv) != 2):
raise Exception('usage: python3 bootstrap-template.py <name_for_extension_in_snake_case>')
Expand Down Expand Up @@ -55,8 +57,10 @@ def replace_everywhere(to_find, to_replace):
replace("./Makefile", to_find.capitalize(), to_camel_case(to_replace))
replace("./Makefile", to_find.upper(), to_replace.upper())
replace("./README.md", to_find, to_replace)
replace("./extension_config.cmake", to_find, to_replace)

replace_everywhere("quack", name_extension)
replace_everywhere("Quack", name_extension.capitalize())
replace_everywhere("<extension_name>", name_extension)

string_to_replace = name_extension
Expand All @@ -68,4 +72,7 @@ def replace_everywhere(to_find, to_replace):
os.rename(f'src/include/{string_to_find}_extension.hpp', f'src/include/{string_to_replace}_extension.hpp')

# remove template-specific files
os.remove('.github/workflows/ExtensionTemplate.yml')
os.remove('.github/workflows/ExtensionTemplate.yml')

# finally, remove this bootstrap file
os.remove(__file__)
4 changes: 2 additions & 2 deletions test/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Testing the quack extension
This directory contains all the tests for the quack extension. The `sql` directory holds tests that are written as [SQLLogicTests](https://duckdb.org/dev/sqllogictest/intro.html). DuckDB aims to have most its tests in this format as SQL statements, so for the quack extension, this should probably be the goal too.
# Testing this extension
This directory contains all the tests for this extension. The `sql` directory holds tests that are written as [SQLLogicTests](https://duckdb.org/dev/sqllogictest/intro.html). DuckDB aims to have most its tests in this format as SQL statements, so for the quack extension, this should probably be the goal too.

The root makefile contains targets to build and run all of these tests. To run the SQLLogicTests:
```bash
Expand Down

0 comments on commit 59ad0e3

Please sign in to comment.