Skip to content

Commit db2f1e0

Browse files
committed
init main repository
0 parents  commit db2f1e0

8 files changed

Lines changed: 2460 additions & 0 deletions

File tree

.github/copilot-instructions.md

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# Data Library - Project Setup Guide
2+
3+
## Overview
4+
5+
A step-by-step Copilot guide to set up a [Data Library for Python](https://developers.lseg.com/en/api-catalog/lseg-data-platform/lseg-data-library-for-python) development environment with Python and JupyterLab on Windows and macOS.
6+
7+
## Prerequisites
8+
9+
- Python 3.11 or higher installed and available on your `PATH`
10+
- Git installed and configured
11+
- Network access to PyPI (or a trusted mirror)
12+
13+
## Working Directory (Important)
14+
15+
Run all commands in this guide from the **workspace root** folder.
16+
17+
## Expected Project Layout
18+
19+
Before running setup commands, confirm the project structure should match this layout:
20+
21+
```text
22+
/
23+
├── .github/
24+
│ └── copilot-instructions.md
25+
├── .gitignore
26+
├── images/
27+
├── LICENSE.md
28+
├── README.md
29+
├── requirements.txt
30+
├── .venv/
31+
└── notebook/
32+
├── ld_notebook_async.ipynb
33+
├── .env
34+
├── .env.example
35+
└── lseg-data.config.json
36+
```
37+
38+
Notes:
39+
- `.venv/` must be inside the workspace root.
40+
- `notebook/` must contain both `ld_notebook_async.ipynb` and `lseg-data.config.json`.
41+
42+
---
43+
44+
## Part 1: Check the minimum project file requirements
45+
46+
1. Check if the following files and folders are present in the workspace root and have content:
47+
48+
- `README.md`
49+
- `LICENSE.md`
50+
- `.gitignore` (must include `.venv/` and `notebook/.env` entries)
51+
- `images/` (folder must exist)
52+
- `notebook/` (folder must exist)
53+
- `requirements.txt` (must exist)
54+
- `notebook/.env.example` (must exist)
55+
- `notebook/lseg-data.config.json` (must exist)
56+
57+
---
58+
59+
## Part 2: Set Up the Python Virtual Environment
60+
61+
> **Prerequisite:** The Part 1 must be completed
62+
63+
1. Create a virtual environment named `.venv` inside the workspace root (same command on all platforms):
64+
65+
```bash
66+
python -m venv .venv
67+
```
68+
69+
This must create `.venv` at the workspace root.
70+
71+
2. Activate the environment:
72+
73+
- **Windows (PowerShell):**
74+
```powershell
75+
.\.venv\Scripts\Activate.ps1
76+
```
77+
- **Windows (CMD):**
78+
```cmd
79+
.venv\Scripts\activate.bat
80+
```
81+
- **macOS / Linux:**
82+
```bash
83+
source .venv/bin/activate
84+
```
85+
86+
3. Update pip to the latest version:
87+
88+
- **Windows (PowerShell/CMD):**
89+
```powershell
90+
python -m pip install --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org --no-cache-dir --upgrade pip
91+
```
92+
- **macOS:**
93+
```bash
94+
python3 -m pip install --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org --no-cache-dir --upgrade pip
95+
```
96+
97+
4. Install the required packages:
98+
99+
- **Windows (PowerShell/CMD):**
100+
```powershell
101+
python -m pip install --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org --no-cache-dir -r requirements.txt
102+
```
103+
- **macOS:**
104+
```bash
105+
python3 -m pip install --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org --no-cache-dir -r requirements.txt
106+
```
107+
108+
5. Verify the installation succeeded:
109+
110+
- **Windows (PowerShell/CMD):**
111+
```powershell
112+
python -c "import lseg.data; print('lseg-data installed successfully')"
113+
```
114+
- **macOS:**
115+
```bash
116+
python3 -c "import lseg.data; print('lseg-data installed successfully')"
117+
```
118+
---

.gitignore

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
pip-wheel-metadata/
24+
share/python-wheels/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
MANIFEST
29+
30+
# PyInstaller
31+
*.manifest
32+
*.spec
33+
34+
# Installer logs
35+
pip-log.txt
36+
pip-delete-this-directory.txt
37+
38+
# Unit test / coverage reports
39+
htmlcov/
40+
.tox/
41+
.nox/
42+
.coverage
43+
.coverage.*
44+
.cache
45+
nosetests.xml
46+
coverage.xml
47+
*.cover
48+
*.py,cover
49+
.hypothesis/
50+
.pytest_cache/
51+
52+
# Translations
53+
*.mo
54+
*.pot
55+
56+
# Django stuff:
57+
*.log
58+
local_settings.py
59+
db.sqlite3
60+
db.sqlite3-journal
61+
62+
# Flask stuff:
63+
instance/
64+
.webassets-cache
65+
66+
# Scrapy stuff:
67+
.scrapy
68+
69+
# Sphinx documentation
70+
docs/_build/
71+
72+
# PyBuilder
73+
target/
74+
75+
# Jupyter Notebook
76+
.ipynb_checkpoints
77+
78+
# IPython
79+
profile_default/
80+
ipython_config.py
81+
82+
# pyenv
83+
.python-version
84+
85+
# pipenv
86+
Pipfile.lock
87+
88+
# PEP 582
89+
__pypackages__/
90+
91+
# Celery stuff
92+
celerybeat-schedule
93+
celerybeat.pid
94+
95+
# SageMath parsed files
96+
*.sage.py
97+
98+
# Environments
99+
.env
100+
.venv
101+
env/
102+
venv/
103+
ENV/
104+
env.bak/
105+
venv.bak/
106+
107+
# Spyder project settings
108+
.spyderproject.db
109+
.spyproject
110+
111+
# Rope project settings
112+
.ropeproject
113+
114+
# mkdocs documentation
115+
/site
116+
117+
# mypy
118+
.mypy_cache/
119+
.dmypy.json
120+
dmypy.json
121+
122+
# Pyre type checker
123+
.pyre/
124+
125+
# Virtual environment
126+
.venv/
127+
128+
# Notebook environment secrets
129+
notebook/.env
130+
notebook/test*
131+
notebook/test_console*
132+
note.md
133+
# for development purposes, ignore these notebooks
134+
notebook/ld_get_data_async.ipynb
135+
notebook/ld_notebook_async_taskgroup.ipynb
136+
notebook/ld_notebook_gather_performance.ipynb
137+
notebook/ld_notebook_taskgroup_performance.ipynb
138+
notebook/test_notebook.ipynb

0 commit comments

Comments
 (0)