microsoft / microsoft/planetary-computer-apis
Do not alter database entries when running tests
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 129
- Forks
- 33
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 1
Description
When running pcstac tests, we assume https://github.com/microsoft/planetary-computer-apis/blob/f2cff0d019b80dd6de0f528abb3bd5ef04b36007/scripts/setup#L30-L34 has being ran first.
This could be replaced by something like: https://github.com/developmentseed/planetary-computer-apis/blob/refactorTests/pcstac/tests/conftest.py#L19-L115
Note: ☝️ approach also remove the code duplication with pcstac.main
This is also linked to #31 because loadtestdata.py assume pypgstac is available in the environment (which should only be in the dev environment)
Contributor guide
No contributing guide indexed for this repository
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
Start with pcstac/tests/conftest.py and compare it with the setup steps in scripts/setup and the duplicated logic in pcstac.main. Then inspect loadtestdata.py and issue #31, especially how the tests obtain pypgstac. Done means tests can run without altering existing database entries and without requiring pypgstac outside the development environment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- databases, testing-qa
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100