-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* remove paper * remove studies dir * remove slurm job generator (moved to https://github.com/tess-atlas/tess_atlas_slurm_utils) * move webbuilder to https://github.com/tess-atlas/tess_atlas_webbuilder * remove slurm job test * remove unused installs * remove slurm cli * remove_webpage_cli * remove missig cli entrypoints * add summary cli tool * Change web data url * Remove unused run_menu_page * Remove outdated docs * change version string format * refactor EXOFOP innterface * refactor EXOFOP innterface * run tests
- Loading branch information
1 parent
f52880a
commit 9ff4cc5
Showing
22 changed files
with
125 additions
and
7,062 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,28 @@ | ||
[![](https://img.shields.io/badge/Paper-Download-orange)](https://nightly.link/dfm/tess-atlas/workflows/build_paper/paper/main.pdf.zip) | ||
|
||
<!-- Pytest Coverage Comment:Begin --> | ||
\n<!-- Pytest Coverage Comment:End --> | ||
|
||
# TESS-Atlas | ||
|
||
<p align="center"> | ||
<img width = "450" src="src/tess_atlas/webbuilder/template/_static/atlas_logo.png" /> | ||
<img width = "450" src="https://raw.githubusercontent.com/tess-atlas/tess_atlas_webbuilder/main/source/_static/atlas_logo.png" /> | ||
<br> | ||
<b>TESS Atlas</b> | ||
</p> | ||
|
||
The python package used to run the analyses in the TESS-Atlas catalog. | ||
|
||
## Installation instructions | ||
To install the necessary packages, run | ||
To install the package: | ||
```bash | ||
python -m pip install tess-atlas | ||
``` | ||
or | ||
```bash | ||
git clone [email protected]:tess-atlas/tess-atlas.git | ||
cd tess-atlas | ||
python -m pip install -e . | ||
``` | ||
|
||
## Instructions to update TESS Atlas | ||
1. Create and analyse some TOIs with the following: `make run` | ||
2. Commit the completed TOIs to a branch and make a PR to main | ||
3. Once PR to main completed, run `make website` to convert the notebooks to HTML and upload to the gh-pages branch and deploy to github-pages | ||
|
||
## How to use | ||
|
||
### Running analyses | ||
#### Local Run | ||
### Analyse a TOI | ||
To run the analysis for one TOI, you can run | ||
```bash | ||
run_toi <toi id number> | ||
|
@@ -35,69 +33,15 @@ To only setup the notebook + data needed for the analysis for one TOI, you can r | |
```bash | ||
run_toi <toi id number> --setup | ||
``` | ||
where an example `<toi id number> = 724` | ||
|
||
To run all the notebooks (in batches of 8), you can run | ||
```bash | ||
run_tois | ||
``` | ||
|
||
#### Slurm Run | ||
|
||
To make the slurm files needed to analyse a CSV of TOIs you can run: | ||
```bash | ||
make_slurm_job --toi_csv toi_ids.csv --module_loads "git/2.18.0 gcc/9.2.0 openmpi/4.0.2 python/3.8.5" | ||
``` | ||
|
||
Or, if you want to make the slurm job for just one TOI: | ||
```bash | ||
make_slurm_job --toi_number 174 --module_loads 'git/2.18.0 gcc/9.2.0 openmpi/4.0.2 python/3.8.5' | ||
``` | ||
|
||
### Downloading results | ||
You can download completed analyses with | ||
You can __download completed analyses with | ||
```bash | ||
download_toi 103 --outdir analysed_tois | ||
``` | ||
|
||
## Running tests! | ||
Use the following to run tests (skipping slow tests) | ||
```bash | ||
python -m pip install -e ".[test]" | ||
pytest tests/ | ||
``` | ||
The following only runs the slow ones | ||
```bash | ||
pytest -vv -k "slow" tests/test_template_notebook.py | ||
``` | ||
|
||
## Building + deploying the catalog | ||
### Building website | ||
Once all your analyses are complete, you can package all the runs into a website: | ||
```bash | ||
make_webpages --webdir webpages --notebooks {notebook_dir} --add-api | ||
``` | ||
Using `add-api` will copy over the data files in addition to making the webpages (but can be a bit slow!) | ||
When this completes, you should have a zipped file with the webpages+data: `tess_atlas_pages.tar.gz` | ||
|
||
### Deploy website + api data | ||
We are storing the website data on a Nectar project. | ||
Assuming you are a part of the project, the steps to deploy are | ||
1. ssh into Nectar | ||
2. Delete old pages | ||
3. scp `tess_atlas_pages.tar.gz` into Nectar's webdir. | ||
4. untar webpages | ||
```bash | ||
ssh -i ~/.ssh/nectarkey.pem [email protected] | ||
cd /mnt/storage/ | ||
mv _build trash | ||
scp [email protected]:/fred/oz200/avajpeyi/projects/atlas_runs/tess_atlas_pages.tar.gz . | ||
tar -xvzf tess_atlas_pages.tar.gz | ||
rm -rf trash | ||
``` | ||
|
||
|
||
## Publishing `tess_atlas` to pypi | ||
To publish to pypi, you will need admin access to this repo. | ||
Then, publishing just requires you to change the version number `tag` a commit. | ||
The `pypi_release` github action will (hopefully) take care of the rest. | ||
The `pypi_release` Github action will (hopefully) take care of the rest. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import argparse | ||
|
||
from tess_atlas.data.analysis_summary import AnalysisSummary | ||
|
||
PROG = "tess_atlas_summary" | ||
|
||
|
||
def __get_cli_args(): | ||
parser = argparse.ArgumentParser( | ||
prog=PROG, | ||
description=""" | ||
Gets the latest TESS-Atlas catalog summary (a CSV with all the TOIs and their analysis status). | ||
If catalog_dir is provided, it builds a new summary file. | ||
""", | ||
usage=f"{PROG} --catalog_dir <dir>", | ||
) | ||
parser.add_argument( | ||
"--catalog_dir", | ||
type=str, | ||
help="The directory with all analyses that you want to summarise " | ||
"(directory with the toi_*.ipynb and toi_*_files/)." | ||
"If not provided, the latest summary file will be downloaded from the TESS-Atlas website.", | ||
default=None, | ||
) | ||
parser.add_argument( | ||
"--outdir", | ||
type=str, | ||
help="The directory to save the analysis summary to", | ||
default=".", | ||
) | ||
parser.add_argument( | ||
"--n_threads", | ||
type=int, | ||
help="The number of threads to use when summarising all the TOIs.", | ||
default=1, | ||
) | ||
return parser.parse_args() | ||
|
||
|
||
def main(): | ||
args = __get_cli_args() | ||
AnalysisSummary.load( | ||
notebook_dir=args.catalog_dir, | ||
outdir=args.outdir, | ||
clean=True, | ||
n_threads=args.n_threads, | ||
).save(args.outdir) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.