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

Preparing package for SIMPLE Archive #562

Merged
merged 3 commits into from
Oct 15, 2024
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: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"forwardPorts": [5432],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "pip install -r requirements.txt",
"postCreateCommand": "pip install -e .",
// python scripts/tutorials/generate_database.py sqlite
// python scripts/tutorials/generate_database.py postgres postgres://postgres@localhost:5432

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install .[test]

- name: Test with pytest
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scheduled-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install .[test]

- name: Test with pytest
run: |
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@
.ds_store
*.code-workspace
.ipynb_checkpoints

*.egg-info
build/
simple/version.py

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ We recommend using a conda environment to handle python dependencies. The follow
```bash
conda create -n "simple-db" python=3.10
conda activate simple-db
pip install -r requirements.txt
pip install -e .
```

3. In Python, connect a database file `SIMPLE.sqlite` as a Database object called `db` and recreate the database using the JSON files in the `data/` directory. Run these commands from within Python.
Expand Down
41 changes: 41 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[build-system]
requires = [
"setuptools>=75",
"setuptools_scm",
]
build-backend = "setuptools.build_meta"


[project]
name = "simple"
description = "SIMPLE Archive Software"
dynamic = ["version"]
readme = "README.md"
license = {file = "LICENSE"}
authors = [
{name = "Kelle Cruz", email = "[email protected]"},
{name = "David Rodriguez", email = "[email protected]"},
]
requires-python = ">= 3.10"
dependencies = [
"astrodbkit",
"astrodb_utils",
"ads",
"matplotlib",
]

[project.optional-dependencies]
test = [
"pytest",
]

[project.urls]
Repository = "https://github.com/SIMPLE-AstroDB/SIMPLE-db"
Documentation = "https://github.com/SIMPLE-AstroDB/SIMPLE-db/documentation"


[tool.setuptools]
packages = ["simple"]

[tool.setuptools_scm]
write_to = "simple/version.py"
5 changes: 0 additions & 5 deletions requirements.txt

This file was deleted.

3 changes: 3 additions & 0 deletions simple/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from .version import version as __version__

__all__ = ["__version__"]