Commit e7096a5e authored by François Agneray's avatar François Agneray
Browse files

Update dataset iris

parent 35cee8b5
Pipeline #4913 passed with stages
in 2 minutes and 54 seconds
......@@ -8,6 +8,8 @@ AstroNomical Information System is a generic web tool that aims to facilitate th
This software allows you to control one or more databases related to astronomical projects and allows access to datasets via URLs.
This repository is the `anis-server` sub-project. It offers a web API to control the metadata database and to search and retrieve astronomical data.
Anis is protected by the CeCILL licence (see LICENCE file at the software root).
## Authors
......@@ -18,13 +20,10 @@ Here is the list of people involved in the development:
* `Chrystel Moreau` : Laboratoire d'Astrophysique de Marseille (CNRS)
* `Tifenn Guillas` : Laboratoire d'Astrophysique de Marseille (CNRS)
## Functionalities
Anis Server allows :
## More resources:
- Add project/database that will contain a set of datasets
- Add and configure a dataset that references a table or view of a business database
- The possibility to search in a referenced dataset with search criteria
* [Website](https://anis.lam.fr)
* [Documentation](https://anis.lam.fr/doc/)
## Installing and starting the application
......@@ -32,13 +31,15 @@ Anis Server contains a Makefile that helps the developer to install and start th
To list all operations availables just type `make` in your terminal at the root of this application.
- To install all dependancies : `make install`
- To start/stop/restart/status all services : `make start|stop|restart|status`
- To display logs for all services : `make logs`
- To open a shell command into php container : `make shell`
- To execute tests suite : `make phpunit`
- To execute php code sniffer : `make phpcs`
- To create the metamodel database : `make create-db`
- To install all dependancies: `make install`
- To ebuild all images and start containers: `make rebuild`
- To start/stop/restart/status all services: `make start|stop|restart|status`
- To display logs for all services: `make logs`
- To open a shell command into php container: `make shell`
- To execute tests suite: `make phpunit`
- To execute php code sniffer: `make phpcs`
- To create the metamodel database: `make create-db`
- TO remove the metadata database: `make remove-pgdata`
## Production mode
......@@ -51,7 +52,7 @@ DATABASE_DEV_MODE: 0
## Few examples with curl
* To list all datasets available in the default instance => http://localhost:8080/dataset
* To list all datasets available in the default instance => http://localhost:8080/instance/default/dataset
* To print all data for the obs_cat dataset with column 1, 2 and 3 => http://localhost:8080/search/obs_cat?a=1;2;3
* To count the number of data available for a request => http://localhost:8080/search/obs_cat?a=count
* To print only 3 obs_cat data (search by id) => http://localhost:8080/search/obs_cat?a=1;2;3&c=1::in::104600094|104600095|104600108
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
......@@ -13,6 +13,6 @@ EOSQL
psql -v ON_ERROR_STOP=1 -f /sql/obs_cat.sql --username "anis" --dbname "anis_test"
psql -v ON_ERROR_STOP=1 -f /sql/observations_info.sql --username "anis" --dbname "anis_test"
psql -v ON_ERROR_STOP=1 -f /sql/svom_sdb_dc1.sql --username "anis" --dbname "anis_test"
psql -v ON_ERROR_STOP=1 -f /sql/colibridb.sql --username "anis" --dbname "anis_test"
psql -v ON_ERROR_STOP=1 -f /sql/irisdb.sql --username "anis" --dbname "anis_test"
psql -v ON_ERROR_STOP=1 -f /sql/aspic_vipers_dr2_w1.sql --username "anis" --dbname "anis_test"
psql -v ON_ERROR_STOP=1 -f /sql/aspic_gama_g02.sql --username "anis" --dbname "anis_test"
--
-- PostgreSQL database dump
--
-- Dumped from database version 10.8
-- Dumped by pg_dump version 10.8
-- Started on 2019-11-28 14:51:27 UTC
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'SQL_ASCII';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;
SET default_tablespace = '';
SET default_with_oids = false;
--
-- TOC entry 196 (class 1259 OID 17352)
-- Name: calibpack; Type: TABLE; Schema: public; Owner: anis
--
CREATE TABLE public.calibpack (
id integer NOT NULL,
date date NOT NULL,
pack character varying(255) NOT NULL,
readme character varying(255) NOT NULL
);
ALTER TABLE public.calibpack OWNER TO anis;
--
-- TOC entry 197 (class 1259 OID 17355)
-- Name: observation; Type: TABLE; Schema: public; Owner: anis
--
CREATE TABLE public.observation (
id integer NOT NULL,
ra double precision NOT NULL,
"dec" double precision NOT NULL,
date_time timestamp without time zone NOT NULL,
exposure_time integer NOT NULL,
filter character varying(255),
object_name character varying(255),
fits_file character varying(255),
id_obspack integer NOT NULL
);
ALTER TABLE public.observation OWNER TO anis;
--
-- TOC entry 198 (class 1259 OID 17358)
-- Name: obspack; Type: TABLE; Schema: public; Owner: anis
--
CREATE TABLE public.obspack (
id integer NOT NULL,
date date NOT NULL,
observer character varying(255) NOT NULL,
pack character varying(255) NOT NULL,
readme character varying(255) NOT NULL,
id_calib integer NOT NULL
);
ALTER TABLE public.obspack OWNER TO anis;
--
-- TOC entry 199 (class 1259 OID 17361)
-- Name: anis_observation; Type: VIEW; Schema: public; Owner: anis
--
CREATE VIEW public.anis_observation AS
SELECT observation.id,
observation.ra,
observation."dec",
observation.date_time,
observation.exposure_time,
observation.filter,
observation.object_name,
('http://iris.lam.fr/observations/'::text || (observation.fits_file)::text) AS fits_file,
observation.fits_file AS png_file,
obspack.observer,
('http://iris.lam.fr/observations/'::text || (obspack.pack)::text) AS pack_obs,
('http://iris.lam.fr/observations/'::text || (obspack.readme)::text) AS readme_obs,
('http://iris.lam.fr/observations/'::text || (calibpack.pack)::text) AS pack_calib,
('http://iris.lam.fr/observations/'::text || (calibpack.readme)::text) AS readme_calib
FROM ((public.observation
JOIN public.obspack ON ((observation.id_obspack = obspack.id)))
JOIN public.calibpack ON ((obspack.id_calib = calibpack.id)));
ALTER TABLE public.anis_observation OWNER TO anis;
--
-- TOC entry 200 (class 1259 OID 17366)
-- Name: calibpack_id_seq; Type: SEQUENCE; Schema: public; Owner: anis
--
CREATE SEQUENCE public.calibpack_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.calibpack_id_seq OWNER TO anis;
--
-- TOC entry 3709 (class 0 OID 0)
-- Dependencies: 200
-- Name: calibpack_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: anis
--
ALTER SEQUENCE public.calibpack_id_seq OWNED BY public.calibpack.id;
--
-- TOC entry 201 (class 1259 OID 17368)
-- Name: observation_id_seq; Type: SEQUENCE; Schema: public; Owner: anis
--
CREATE SEQUENCE public.observation_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.observation_id_seq OWNER TO anis;
--
-- TOC entry 3710 (class 0 OID 0)
-- Dependencies: 201
-- Name: observation_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: anis
--
ALTER SEQUENCE public.observation_id_seq OWNED BY public.observation.id;
--
-- TOC entry 202 (class 1259 OID 17370)
-- Name: obspack_id_seq; Type: SEQUENCE; Schema: public; Owner: anis
--
CREATE SEQUENCE public.obspack_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.obspack_id_seq OWNER TO anis;
--
-- TOC entry 3711 (class 0 OID 0)
-- Dependencies: 202
-- Name: obspack_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: anis
--
ALTER SEQUENCE public.obspack_id_seq OWNED BY public.obspack.id;
--
-- TOC entry 203 (class 1259 OID 17372)
-- Name: v_obspack; Type: VIEW; Schema: public; Owner: anis
--
CREATE VIEW public.v_obspack AS
SELECT obspack.id,
obspack.date,
obspack.observer,
('http://iris.lam.fr/observations/'::text || (obspack.pack)::text) AS pack_obs,
('http://iris.lam.fr/observations/'::text || (obspack.readme)::text) AS readme_obs,
('http://iris.lam.fr/observations/'::text || (calibpack.pack)::text) AS pack_calib,
('http://iris.lam.fr/observations/'::text || (calibpack.readme)::text) AS readme_calib
FROM (public.obspack
JOIN public.calibpack ON ((obspack.id_calib = calibpack.id)));
ALTER TABLE public.v_obspack OWNER TO anis;
--
-- TOC entry 3559 (class 2604 OID 17376)
-- Name: calibpack id; Type: DEFAULT; Schema: public; Owner: anis
--
ALTER TABLE ONLY public.calibpack ALTER COLUMN id SET DEFAULT nextval('public.calibpack_id_seq'::regclass);
--
-- TOC entry 3560 (class 2604 OID 17377)
-- Name: observation id; Type: DEFAULT; Schema: public; Owner: anis
--
ALTER TABLE ONLY public.observation ALTER COLUMN id SET DEFAULT nextval('public.observation_id_seq'::regclass);
--
-- TOC entry 3561 (class 2604 OID 17378)
-- Name: obspack id; Type: DEFAULT; Schema: public; Owner: anis
--
ALTER TABLE ONLY public.obspack ALTER COLUMN id SET DEFAULT nextval('public.obspack_id_seq'::regclass);
--
-- TOC entry 3693 (class 0 OID 17352)
-- Dependencies: 196
-- Data for Name: calibpack; Type: TABLE DATA; Schema: public; Owner: anis
--
COPY public.calibpack (id, date, pack, readme) FROM stdin;
73 2014-09-28 20140928-calib.zip 20140928-calib.txt
\.
--
-- TOC entry 3694 (class 0 OID 17355)
-- Dependencies: 197
-- Data for Name: observation; Type: TABLE DATA; Schema: public; Owner: anis
--
COPY public.observation (id, ra, "dec", date_time, exposure_time, filter, object_name, fits_file, id_obspack) FROM stdin;
418 148.900499999999994 69.0669999999999931 2014-10-02 20:13:50 10 SDSS g M 81 20141002/M_81-S001-R001-C001-SDSS_g.fits 86
419 322.5 12.1669999999999998 2014-10-02 20:31:45 10 SDSS g M 15 20141002/M_15-S001-R001-C001-SDSS_g.fits 86
420 322.5 12.1669999999999998 2014-10-02 20:40:42 10 SDSS g M 15 20141002/M_15-S001-R001-C001-SDSS_g_dupe-1.fits 86
421 322.5 12.1669999999999998 2014-10-02 21:36:38 60 SDSS g M 15 20141002/M_15-S001-R001-C001-SDSS_g_dupe-5.fits 86
422 323.0505 48.4329999999999998 2014-10-02 21:25:08 10 SDSS g M 15 20141002/M_15-S001-R001-C001-SDSS_g_dupe-4.fits 86
423 322.5 12.1669999999999998 2014-10-02 20:45:13 10 SDSS g M 15 20141002/M_15-S001-R001-C001-SDSS_g_dupe-2.fits 86
424 323.0505 48.4329999999999998 2014-10-02 21:03:56 10 SDSS g M 39 20141002/M_39-S001-R001-C001-SDSS_g.fits 86
425 10.6754999999999995 41.267000000000003 2014-10-02 20:19:57 10 SDSS g M 31 20141002/M_31-S001-R001-C001-SDSS_g.fits 86
426 322.5 12.1669999999999998 2014-10-02 20:59:09 10 SDSS g M 15 20141002/M_15-S001-R001-C001-SDSS_g_dupe-3.fits 86
427 299.899499999999989 22.7169999999999987 2014-10-03 19:18:25 60 Halpha M 27 20141003/M_27-S001-R001-C001-Halpha.fits 87
\.
--
-- TOC entry 3695 (class 0 OID 17358)
-- Dependencies: 198
-- Data for Name: obspack; Type: TABLE DATA; Schema: public; Owner: anis
--
COPY public.obspack (id, date, observer, pack, readme, id_calib) FROM stdin;
86 2014-10-02 ecole1 20141002.zip 20141002.txt 73
87 2014-10-03 ecole1 20141003.zip 20141003.txt 73
\.
--
-- TOC entry 3713 (class 0 OID 0)
-- Dependencies: 200
-- Name: calibpack_id_seq; Type: SEQUENCE SET; Schema: public; Owner: anis
--
SELECT pg_catalog.setval('public.calibpack_id_seq', 194, true);
--
-- TOC entry 3714 (class 0 OID 0)
-- Dependencies: 201
-- Name: observation_id_seq; Type: SEQUENCE SET; Schema: public; Owner: anis
--
SELECT pg_catalog.setval('public.observation_id_seq', 27386, true);
--
-- TOC entry 3715 (class 0 OID 0)
-- Dependencies: 202
-- Name: obspack_id_seq; Type: SEQUENCE SET; Schema: public; Owner: anis
--
SELECT pg_catalog.setval('public.obspack_id_seq', 395, true);
--
-- TOC entry 3563 (class 2606 OID 17380)
-- Name: calibpack pk_calibpack; Type: CONSTRAINT; Schema: public; Owner: anis
--
ALTER TABLE ONLY public.calibpack
ADD CONSTRAINT pk_calibpack PRIMARY KEY (id);
--
-- TOC entry 3565 (class 2606 OID 17382)
-- Name: observation pk_observation; Type: CONSTRAINT; Schema: public; Owner: anis
--
ALTER TABLE ONLY public.observation
ADD CONSTRAINT pk_observation PRIMARY KEY (id);
--
-- TOC entry 3567 (class 2606 OID 17384)
-- Name: obspack pk_obspack; Type: CONSTRAINT; Schema: public; Owner: anis
--
ALTER TABLE ONLY public.obspack
ADD CONSTRAINT pk_obspack PRIMARY KEY (id);
--
-- TOC entry 3569 (class 2606 OID 17385)
-- Name: obspack fk_calibpack; Type: FK CONSTRAINT; Schema: public; Owner: anis
--
ALTER TABLE ONLY public.obspack
ADD CONSTRAINT fk_calibpack FOREIGN KEY (id_calib) REFERENCES public.calibpack(id);
--
-- TOC entry 3568 (class 2606 OID 17390)
-- Name: observation fk_obspack; Type: FK CONSTRAINT; Schema: public; Owner: anis
--
ALTER TABLE ONLY public.observation
ADD CONSTRAINT fk_obspack FOREIGN KEY (id_obspack) REFERENCES public.obspack(id);
-- Completed on 2019-11-28 14:51:27 UTC
--
-- PostgreSQL database dump complete
--
......@@ -57,7 +57,7 @@ services:
- ./conf-dev/obs_cat.sql:/sql/obs_cat.sql
- ./conf-dev/observations_info.sql:/sql/observations_info.sql
- ./conf-dev/svom_sdb_dc1.sql:/sql/svom_sdb_dc1.sql
- ./conf-dev/colibridb.sql:/sql/colibridb.sql
- ./conf-dev/irisdb.sql:/sql/irisdb.sql
- ./conf-dev/aspic_vipers_dr2_w1.sql:/sql/aspic_vipers_dr2_w1.sql
- ./conf-dev/aspic_gama_g02.sql:/sql/aspic_gama_g02.sql
- ./conf-dev/init-postgres.sh:/docker-entrypoint-initdb.d/init-postgres.sh
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment