Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
43bc199
Bump flake8 from 7.0.0 to 7.3.0
dependabot[bot] Jul 21, 2025
9b7aaeb
Merge pull request #21 from TOMToolkit/dependabot/pip/flake8-7.3.0
phycodurus Jul 30, 2025
e103dcb
Bump tomtoolkit from 2.25.0 to 2.25.1
dependabot[bot] Jul 30, 2025
355d7d5
Merge branch '15-tom_eso-api-client-library-enhancements' into depend…
phycodurus Jul 30, 2025
23d3b73
Merge pull request #22 from TOMToolkit/dependabot/pip/tomtoolkit-2.25.1
phycodurus Jul 30, 2025
07ea7c4
remove singleton ESOAPI and make user-specific
phycodurus Aug 4, 2025
b4693c6
update tom_eso get get ESO P2 cred from ESOProfile
phycodurus Aug 5, 2025
2ca92d7
ignore emacs backup files
phycodurus Aug 5, 2025
da2bef3
show in-progress spinners while loading menu choices
phycodurus Aug 6, 2025
c65c94e
this helps the progress-spinner overlay match the iframe (I think)
phycodurus Aug 12, 2025
72c3d8a
add JS to display progress spinners durning API calls
phycodurus Aug 12, 2025
92a78e1
get decrypted password from ESOProfile for p2api access
phycodurus Aug 12, 2025
6a96098
flake8 and pylance fixes
phycodurus Aug 12, 2025
91e6a08
Merge branch 'dev' into 15-tom_eso-api-client-library-enhancements
phycodurus Aug 12, 2025
76d7c6d
update poetry.lock file
phycodurus Aug 12, 2025
b40c4a1
update README with new installation instructions
phycodurus Aug 12, 2025
f32bfab
add migration for ESOProfile; instructions to migrate to README.md
phycodurus Aug 13, 2025
e79e646
correct typo in P2 Tool demo username
phycodurus Aug 13, 2025
b74fe3b
provide a link to Profile page if ESOProfile doesn't exist
phycodurus Aug 13, 2025
29cb553
explain the weird default value
phycodurus Aug 20, 2025
92f3d25
update comment to be more informative
phycodurus Aug 20, 2025
09bb22f
give words a verb to make them a sentence
phycodurus Aug 20, 2025
5586612
pass user to Facility to get credentials from Profile
phycodurus Oct 7, 2025
28642d1
add alert message to template for missing configuration
phycodurus Jan 5, 2026
09543f6
create (and instanciate) ESOSettings for ObservationCreateView
phycodurus Jan 5, 2026
1660acf
remove default for p2_username
phycodurus Jan 6, 2026
b450f89
add various feedback for ObservationCreateView custom template
phycodurus Jan 6, 2026
d5a2d2f
replace link to ESO Profile with static message
phycodurus Jan 6, 2026
2e59f0f
refactor for useful User feedback in observation_form.html
phycodurus Jan 6, 2026
416056e
lint fix for flake8
phycodurus Jan 6, 2026
374ae56
silence DEBUG logging
phycodurus Jan 6, 2026
8ebc0e8
fix linting
jchate6 Jan 6, 2026
70da8bb
update README
jchate6 Jan 6, 2026
49dbdb6
fix typo
jchate6 Jan 6, 2026
584d16c
update testing and check migrations
jchate6 Jan 6, 2026
347592f
add blank line
jchate6 Jan 6, 2026
7494031
add new migration
jchate6 Jan 6, 2026
df19565
remove blank line
jchate6 Jan 6, 2026
b191f8b
update poetry version/lock file
jchate6 Jan 6, 2026
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
18 changes: 17 additions & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,22 @@ jobs:
- name: Style Checks
run: poetry run flake8 tom_* --exclude=*/migrations/* --max-line-length=120

check_migrations:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install "poetry>=2.0,<3.0"
poetry install
- name: Missing Migrations
run: |
poetry run python tom_eso/tests/check_migrations.py

run_tests:
runs-on: ubuntu-latest
strategy:
Expand All @@ -35,4 +51,4 @@ jobs:
python -m pip install poetry
poetry install
- name: Run tests
run: poetry run python -m unittest discover -v
run: poetry run python tom_eso/tests/run_tests.py
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ docs/_build/
.vscode/
*.code-workspace

# emacs
*~

# PyBuilder
target/

Expand Down
40 changes: 31 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
# tom_eso
European Southern Obervatory Facility modules for TOM Toolkit

This module is designed mainly to facilitate getting Target and Observation data
from your TOM to the ESO P2 Tool (without having to re-enter it). Submitting
observations is still expected to be done through the P2 Tool itself.

This facility is still in prototype stage and feature requests are welcome.
Please let us know your use cases.

## Installation

Install the module into your TOM environment:
1. Install the module into your TOM environment:

```shell
pip install tom-eso
```
```shell
pip install tom-eso
```

You'll want to update your `pyproject.toml` or `requirements.txt` file as well.

1. In your project `settings.py`, add `tom_eso` to your `INSTALLED_APPS` setting:
2. In your project `settings.py`, add `tom_eso` to your `INSTALLED_APPS` setting:

```python
INSTALLED_APPS = [
Expand All @@ -18,7 +27,7 @@ pip install tom-eso
]
```

2. Add `tom_eso.eso.ESOFacility` to the `TOM_FACILITY_CLASSES` in your TOM's
3. Add `tom_eso.eso.ESOFacility` to the `TOM_FACILITY_CLASSES` in your TOM's
`settings.py`:
```python
TOM_FACILITY_CLASSES = [
Expand All @@ -28,12 +37,24 @@ pip install tom-eso
]
```

## Configuration
4. Create the ESOProfile tables in your database:

```bash
$ ./manage.py migrate
```


## Configuration Options

After installation, each user will have an `ESOProfile` card in their TOM user profile where they can
enter their ESO P2 Tool `username` and `password` and set the ESO environment to `Demo`, `Production`,
or `Production La Silla`.

Include the following settings inside the `FACILITIES` dictionary inside `settings.py`:
If a TOM admin wants to have a single default set of ESO credentials accessible by all of their TOM's users, they can
include the following to thier `settings.py`:

```python
FACILITIES = {
FACILITIES = {
...
# defaults set from ESO p2 API Tutorial
# https://www.eso.org/sci/observing/phase2/p2intro/Phase2API/api--python-programming-tutorial.html
Expand All @@ -45,3 +66,4 @@ Include the following settings inside the `FACILITIES` dictionary inside `settin
},
}
```
Note: The user specific credentials will always take precendence over these TOM-wide defaults.
1,227 changes: 615 additions & 612 deletions poetry.lock

Large diffs are not rendered by default.

23 changes: 14 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
[tool.poetry]
[project]
name = "tom-eso"
# this version is a placeholder: version supplied by poetry-dynamic-versioning
version = "0.0.0"
description = "TOM Toolkit Facility module for the European Southern Observatory telescopes"
authors = ["Lindy Lindstrom <llindstrom@lco.global>"]
authors = [
{name = "Lindy Lindstrom", email = "llindstrom@lco.global"}
]
license = "GPL-3.0-or-later"
readme = "README.md"
packages = [{include = "tom_eso"}]
dynamic = ["version"]
requires-python = ">=3.10,<3.13"
dependencies = [
"tomtoolkit>=2.22.0,<3",
"p2api>=1,<2",
"phase1api>=0,<2",
]

[tool.poetry.dependencies]
python = ">=3.9.0,<3.13"
tomtoolkit = ">=2.22"
p2api = "~1"
phase1api = "~0"
[tool.poetry]
version = "0.0.0" # version supplied by poetry-dynamic-versioning

[tool.poetry.group.lint.dependencies]
flake8 = "~7.3"
flake8 = ">=6.0,<7.4"

[tool.poetry-dynamic-versioning]
enable = true
Expand Down
Loading