Skip to content

Commit c305e33

Browse files
authored
chore: add licensing header to test files (#492)
Add licensing information to SQL files and update install script
1 parent 87ddcce commit c305e33

File tree

4 files changed

+100
-1
lines changed

4 files changed

+100
-1
lines changed

readiness-check.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Getting Started with the Database Migration Assessment (DMA) Collector
2+
3+
These instructions will guide you through setting up and running the DMA collector using the Python CLI.
4+
5+
## Verify Python Version
6+
7+
The DMA collector requires Python 3.9 or higher. Check your Python version by opening a terminal and running:
8+
9+
```bash
10+
python3 --version
11+
```
12+
13+
If your Python version is lower than 3.9, you'll need to install a compatible version.
14+
15+
## Create a Virtual Environment (Recommended)
16+
17+
A virtual environment isolates the DMA collector's dependencies from other Python projects. This prevents conflicts and ensures a consistent environment.
18+
19+
### Create the virtual environment
20+
21+
To create the new virtual environment.
22+
23+
```bash
24+
python3 -m venv .venv
25+
```
26+
27+
Activate the virtual environment by running:
28+
29+
```bash
30+
source .venv/bin/activate
31+
```
32+
33+
(You'll typically see the virtual environment name in parentheses at the beginning of your terminal prompt: `(.venv) $`)
34+
35+
## Install the DMA Readiness Check Utility
36+
37+
Navigate to the directory containing the DMA collector wheel file (.whl file). This file is the packaged distribution of the collector.
38+
39+
Install the wheel file using pip:
40+
41+
```shell
42+
pip install dma-collector-<version>.whl
43+
```
44+
45+
**Note** Replace `<version>` with the actual version number of the wheel file (e.g., dma-collector-1.2.3.whl).
46+
47+
## Executing the Postgres Readiness Check
48+
49+
Now that the DMA collector is installed, you can run the readiness check for Postgres.
50+
51+
```shell
52+
dma readiness-check --db-type postgres --hostname localhost --no-prompt --port 5432 --database postgres --username postgres --password password1
53+
```
54+
55+
If you do not supply credentials at the CLI, the tool will prompt you for connection information.
56+
57+

tests/integration/postgres/northwind_data.sql

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
Copyright 2024 Google LLC
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
https://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
116
--
217
-- PostgreSQL database dump
318
--

tests/integration/postgres/northwind_ddl.sql

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
Copyright 2024 Google LLC
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
https://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
116
--
217
-- PostgreSQL database dump
318
--

tools/install-hatch.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
1-
#!/bin/sh
1+
#!/usr/bin/env bash
2+
# Copyright 2024 Google LLC
23

4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
8+
# https://www.apache.org/licenses/LICENSE-2.0
9+
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
315
# --- Constants ---
416
BASE_URL="https://github.com/pypa/hatch/releases/latest/download"
517
EXTRACT_CMD="tar -xzf"

0 commit comments

Comments
 (0)