databrickslabs / databrickslabs/pytester
Ability to rewrite code with mock database names
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 139
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
People want develop on an existing db and test on isolated db. Let's make it simpler
make_database() is lenghty to write, so it may be easier to write "spark.table('abc.xyz')" and let it be rewritten with spark.table(f'{make_database()}.xyz') for the runtime
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named; start by locating make_database() and the spark.table(...) handling. Define how literal database names such as abc.xyz are rewritten for runtime isolation, then add coverage for the shown example and verify the resulting behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, spark
- Domain
- databases, testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100