Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FT-585: Added Installation for development section to README.md #480

Merged
merged 4 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ATLAN_BASE_URL=your_tenant_base_url
ATLAN_API_KEY=your_api_key
90 changes: 90 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,96 @@ This repository houses the code for a Python SDK to interact with [Atlan](https:

[https://developer.atlan.com/getting-started/python-sdk/](https://developer.atlan.com/getting-started/python-sdk/)



## Installing for Development

### Initial Setup
To get started developing the SDK:

1. Clone the repository:
```bash
git clone <repository-url>
```

2. Ensure you have Python 3.8 or later installed. You can verify your Python version with:
```bash
python --version
```
or
```bash
python3 --version
```

3. Set up a virtual environment for development:
```bash
python -m venv venv
source venv/bin/activate # On macOS/Linux
venv\Scripts\activate # On Windows
```

4. Install the required dependencies:
```bash
pip install -r requirements.txt
```

### Code Formatting
Before committing code, ensure it adheres to the repository's formatting guidelines. You can apply the required formatting using the below command:

```bash
./pyatlan-formatter
```

### Environment Setup
For running integration tests, you'll need to configure your environment:

1. Copy the example environment file:
```bash
cp .env.example .env
```
2. Update the `.env` file with your Atlan API key and base URL.
3. Load the environment variables:
- For macOS/Linux:
```bash
export $(cat .env | xargs)
```
- For Windows (PowerShell):
```powershell
Get-Content .env | ForEach-Object {
if ($_ -match '^(.*?)=(.*)$') {
$env:($matches[1]) = $matches[2]
}
}
```

## Testing the SDK

### Run all the QA checks
You can run all the QA checks using the following command:

```bash
./qa-checks
```

### Running Unit Tests
You can run the SDK's unit tests **without needing access to an Atlan environment**:

```bash
pytest tests/unit
```

### Running Integration Tests
Once the environment is set up, you can run integration tests:

- All integration tests:
```bash
pytest tests/integration
```
- Specific integration tests:
```bash
pytest tests/integration/<test_specific_feature>.py
```

## Attribution

Portions of the SDK are based on original work from https://github.com/apache/atlas. Those classes that derive from this original work have an extra heading comment as follows:
Expand Down
Loading