vlovgr / ciris

Lightweight, extensible, and validated configuration loading in Scala

Website Github
< d i v c l a s s = " a n n o u n c e i n s t a p a p e r _ b o d y m d " d a t a - p a t h = " r e a d m e . m d " i d = " r e a d m e " > < a r t i c l e c l a s s = " m a r k d o w n - b o d y e n t r y - c o n t e n t " i t e m p r o p = " t e x t " > < p > < a h r e f = " h t t p s : / / t r a v i s - c i . o r g / v l o v g r / c i r i s " t a r g e t = " _ b l a n k " > < i m g s r c = " h t t p s : / / c a m o . g i t h u b u s e r c o n t e n t . c o m / 3 1 f f 3 5 f 4 3 0 d 7 8 d 8 b c 1 8 0 0 d 2 2 c 3 e 5 b c f e 5 f b a c 8 b 2 / 6 8 7 4 7 4 7 0 7 3 3 a 2 f 2 f 6 9 6 d 6 7 2 e 7 3 6 8 6 9 6 5 6 c 6 4 7 3 2 e 6 9 6 f 2 f 7 4 7 2 6 1 7 6 6 9 7 3 2 f 7 6 6 c 6 f 7 6 6 7 7 2 2 f 6 3 6 9 7 2 6 9 7 3 2 f 6 d 6 1 7 3 7 4 6 5 7 2 2 e 7 3 7 6 6 7 " a l t = " T r a v i s " d a t a - c a n o n i c a l - s r c = " h t t p s : / / i m g . s h i e l d s . i o / t r a v i s / v l o v g r / c i r i s / m a s t e r . s v g " s t y l e = " m a x - w i d t h : 1 0 0 % ; " > < / a > < a h r e f = " h t t p s : / / c o d e c o v . i o / g h / v l o v g r / c i r i s " t a r g e t = " _ b l a n k " > < i m g s r c = " h t t p s : / / c a m o . g i t h u b u s e r c o n t e n t . c o m / 6 4 f 8 e b c e b e f 2 0 9 d b f 7 d 5 f 6 b d 3 5 3 8 9 7 e d e 4 f a d 7 e 0 / 6 8 7 4 7 4 7 0 7 3 3 a 2 f 2 f 6 9 6 d 6 7 2 e 7 3 6 8 6 9 6 5 6 c 6 4 7 3 2 e 6 9 6 f 2 f 6 3 6 f 6 4 6 5 6 3 6 f 7 6 2 f 6 3 2 f 6 7 6 9 7 4 6 8 7 5 6 2 2 f 7 6 6 c 6 f 7 6 6 7 7 2 2 f 6 3 6 9 7 2 6 9 7 3 2 e 7 3 7 6 6 7 " a l t = " C o d e c o v " d a t a - c a n o n i c a l - s r c = " h t t p s : / / i m g . s h i e l d s . i o / c o d e c o v / c / g i t h u b / v l o v g r / c i r i s . s v g " s t y l e = " m a x - w i d t h : 1 0 0 % ; " > < / a > < a h r e f = " h t t p s : / / g i t t e r . i m / v l o v g r / c i r i s " t a r g e t = " _ b l a n k " > < i m g s r c = " h t t p s : / / c a m o . g i t h u b u s e r c o n t e n t . c o m / 8 9 6 3 b f 3 0 d 1 6 3 d a 9 d a d d c c 6 7 d 3 c a 1 6 8 c 8 a 1 f d 3 9 c 0 / 6 8 7 4 7 4 7 0 7 3 3 a 2 f 2 f 6 9 6 d 6 7 2 e 7 3 6 8 6 9 6 5 6 c 6 4 7 3 2 e 6 9 6 f 2 f 6 7 6 9 7 4 7 4 6 5 7 2 2 f 7 2 6 f 6 f 6 d 2 f 7 6 6 c 6 f 7 6 6 7 7 2 2 f 6 3 6 9 7 2 6 9 7 3 2 e 7 3 7 6 6 7 3 f 6 3 6 f 6 c 6 f 7 2 4 2 3 d 3 3 3 6 6 2 6 3 3 9 3 7 " a l t = " G i t t e r " d a t a - c a n o n i c a l - s r c = " h t t p s : / / i m g . s h i e l d s . i o / g i t t e r / r o o m / v l o v g r / c i r i s . s v g ? c o l o r B = 3 6 b c 9 7 " s t y l e = " m a x - w i d t h : 1 0 0 % ; " > < / a > < a h r e f = " h t t p s : / / i n d e x . s c a l a - l a n g . o r g / v l o v g r / c i r i s " t a r g e t = " _ b l a n k " > < i m g s r c = " h t t p s : / / c a m o . g i t h u b u s e r c o n t e n t . c o m / 6 c 1 4 8 a e 0 5 8 a c f f 0 9 2 6 b a b d 9 c 6 d 2 d 5 b 4 5 0 c 7 b 2 e 9 4 / 6 8 7 4 7 4 7 0 7 3 3 a 2 f 2 f 6 9 6 d 6 7 2 e 7 3 6 8 6 9 6 5 6 c 6 4 7 3 2 e 6 9 6 f 2 f 6 d 6 1 7 6 6 5 6 e 2 d 6 3 6 5 6 e 7 4 7 2 6 1 6 c 2 f 7 6 2 f 6 9 7 3 2 e 6 3 6 9 7 2 2 f 6 3 6 9 7 2 6 9 7 3 2 d 6 3 6 f 7 2 6 5 5 f 3 2 2 e 3 1 3 2 2 e 7 3 7 6 6 7 3 f 6 3 6 f 6 c 6 f 7 2 3 d 6 2 6 c 7 5 6 5 2 6 6 c 6 1 6 2 6 5 6 c 3 d 7 6 6 5 7 2 7 3 6 9 6 f 6 e " a l t = " V e r s i o n " d a t a - c a n o n i c a l - s r c = " h t t p s : / / i m g . s h i e l d s . i o / m a v e n - c e n t r a l / v / i s . c i r / c i r i s - c o r e _ 2 . 1 2 . s v g ? c o l o r = b l u e & a m p ; l a b e l = v e r s i o n " s t y l e = " m a x - w i d t h : 1 0 0 % ; " > < / a > < a h r e f = " h t t p s : / / c i r . i s / a p i " t a r g e t = " _ b l a n k " > < i m g s r c = " h t t p s : / / c a m o . g i t h u b u s e r c o n t e n t . c o m / 8 0 e c 0 f a 4 2 9 0 5 f 2 1 b 8 6 4 2 c 9 1 0 5 0 5 8 7 9 8 9 6 c 9 7 3 9 e 8 / 6 8 7 4 7 4 7 0 7 3 3 a 2 f 2 f 6 9 6 d 6 7 2 e 7 3 6 8 6 9 6 5 6 c 6 4 7 3 2 e 6 9 6 f 2 f 6 d 6 1 7 6 6 5 6 e 2 d 6 3 6 5 6 e 7 4 7 2 6 1 6 c 2 f 7 6 2 f 6 9 7 3 2 e 6 3 6 9 7 2 2 f 6 3 6 9 7 2 6 9 7 3 2 d 6 3 6 f 7 2 6 5 5 f 3 2 2 e 3 1 3 2 2 e 7 3 7 6 6 7 3 f 6 3 6 f 6 c 6 f 7 2 3 d 6 2 6 c 7 5 6 5 2 6 6 c 6 1 6 2 6 5 6 c 3 d 6 4 6 f 6 3 7 3 " a l t = " D o c u m e n t a t i o n " d a t a - c a n o n i c a l - s r c = " h t t p s : / / i m g . s h i e l d s . i o / m a v e n - c e n t r a l / v / i s . c i r / c i r i s - c o r e _ 2 . 1 2 . s v g ? c o l o r = b l u e & a m p ; l a b e l = d o c s " s t y l e = " m a x - w i d t h : 1 0 0 % ; " > < / a > < / p > < h 2 > < a i d = " u s e r - c o n t e n t - c i r i s " c l a s s = " a n c h o r " h r e f = " h t t p s : / / g i t h u b . c o m / v l o v g r / c i r i s # c i r i s " a r i a - h i d d e n = " t r u e " t a r g e t = " _ b l a n k " > < s v g a r i a - h i d d e n = " t r u e " c l a s s = " o c t i c o n o c t i c o n - l i n k " h e i g h t = " 1 6 " v e r s i o n = " 1 . 1 " v i e w b o x = " 0 0 1 6 1 6 " w i d t h = " 1 6 " > < p a t h f i l l - r u l e = " e v e n o d d " d = " M 4 9 h 1 v 1 H 4 c - 1 . 5 0 - 3 - 1 . 6 9 - 3 - 3 . 5 S 2 . 5 5 3 4 3 h 4 c 1 . 4 5 0 3 1 . 6 9 3 3 . 5 0 1 . 4 1 - . 9 1 2 . 7 2 - 2 3 . 2 5 V 8 . 5 9 c . 5 8 - . 4 5 1 - 1 . 2 7 1 - 2 . 0 9 C 1 0 5 . 2 2 8 . 9 8 4 8 4 H 4 c - . 9 8 0 - 2 1 . 2 2 - 2 2 . 5 S 3 9 4 9 z m 9 - 3 h - 1 v 1 h 1 c 1 0 2 1 . 2 2 2 2 . 5 S 1 3 . 9 8 1 2 1 3 1 2 H 9 c - . 9 8 0 - 2 - 1 . 2 2 - 2 - 2 . 5 0 - . 8 3 . 4 2 - 1 . 6 4 1 - 2 . 0 9 V 6 . 2 5 c - 1 . 0 9 . 5 3 - 2 1 . 8 4 - 2 3 . 2 5 C 6 1 1 . 3 1 7 . 5 5 1 3 9 1 3 h 4 c 1 . 4 5 0 3 - 1 . 6 9 3 - 3 . 5 S 1 4 . 5 6 1 3 6 z " > < / p a t h > < / s v g > < / a > C i r i s < / h 2 > < p > L i g h t w e i g h t , e x t e n s i b l e , a n d v a l i d a t e d c o n f i g u r a t i o n l o a d i n g i n < a h r e f = " h t t p : / / w w w . s c a l a - l a n g . o r g " t a r g e t = " _ b l a n k " > S c a l a < / a > a n d < a h r e f = " h t t p s : / / w w w . s c a l a - j s . o r g " t a r g e t = " _ b l a n k " > S c a l a . j s < / a > . < b r > T h e c o r e l i b r a r y i s d e p e n d e n c y - f r e e , w h i l e m o d u l e s p r o v i d e l i b r a r y i n t e g r a t i o n s . < / p > < p > T h e n a m e c o m e s f r o m b e i n g a n a b b r e v i a t i o n o f t h e w o r d < e m > c o n f i g u r a t i o n s < / e m > . < b r > C i r i s ' l o g o w a s i n s p i r e d b y t h e e p y l l i o n C i r i s f r o m < a h r e f = " h t t p s : / / e n . w i k i p e d i a . o r g / w i k i / A p p e n d i x _ V e r g i l i a n a # C i r i s _ . 2 8 . 2 2 T h e _ S e a - B i r d . 2 2 . 2 9 " t a r g e t = " _ b l a n k " > A p p e n d i x V e r g i l i a n a < / a > . < / p > < b l o c k q u o t e > < p > T h e C i r i s i s a n e p y l l i o n i n 5 4 1 h e x a m e t e r s d e s c r i b i n g t h e m y t h o f N i s u s , t h e k i n g o f M e g a r a a n d h i s d a u g h t e r S c y l l a . < b r > A f t e r t h e c i t y f a l l s a n d S c y l l a i s t a k e n p r i s o n e r o n t h e C r e t a n s h i p s , A m p h i t r i t e t r a n s f o r m s h e r i n t o t h e < e m > c i r i s < / e m > s e a b i r d . < / p > < / b l o c k q u o t e > < p > C i r i s i s a n e w p r o j e c t u n d e r a c t i v e d e v e l o p m e n t . F e e d b a c k a n d c o n t r i b u t i o n s a r e w e l c o m e . < / p > < h 3 > < a i d = " u s e r - c o n t e n t - i n t r o d u c t i o n " c l a s s = " a n c h o r " h r e f = " h t t p s : / / g i t h u b . c o m / v l o v g r / c i r i s # i n t r o d u c t i o n " a r i a - h i d d e n = " t r u e " t a r g e t = " _ b l a n k " > < s v g a r i a - h i d d e n = " t r u e " c l a s s = " o c t i c o n o c t i c o n - l i n k " h e i g h t = " 1 6 " v e r s i o n = " 1 . 1 " v i e w b o x = " 0 0 1 6 1 6 " w i d t h = " 1 6 " > < p a t h f i l l - r u l e = " e v e n o d d " d = " M 4 9 h 1 v 1 H 4 c - 1 . 5 0 - 3 - 1 . 6 9 - 3 - 3 . 5 S 2 . 5 5 3 4 3 h 4 c 1 . 4 5 0 3 1 . 6 9 3 3 . 5 0 1 . 4 1 - . 9 1 2 . 7 2 - 2 3 . 2 5 V 8 . 5 9 c . 5 8 - . 4 5 1 - 1 . 2 7 1 - 2 . 0 9 C 1 0 5 . 2 2 8 . 9 8 4 8 4 H 4 c - . 9 8 0 - 2 1 . 2 2 - 2 2 . 5 S 3 9 4 9 z m 9 - 3 h - 1 v 1 h 1 c 1 0 2 1 . 2 2 2 2 . 5 S 1 3 . 9 8 1 2 1 3 1 2 H 9 c - . 9 8 0 - 2 - 1 . 2 2 - 2 - 2 . 5 0 - . 8 3 . 4 2 - 1 . 6 4 1 - 2 . 0 9 V 6 . 2 5 c - 1 . 0 9 . 5 3 - 2 1 . 8 4 - 2 3 . 2 5 C 6 1 1 . 3 1 7 . 5 5 1 3 9 1 3 h 4 c 1 . 4 5 0 3 - 1 . 6 9 3 - 3 . 5 S 1 4 . 5 6 1 3 6 z " > < / p a t h > < / s v g > < / a > I n t r o d u c t i o n < / h 3 > < p > C i r i s e n c o u r a g e s c o m p i l e - t i m e s a f e t y b y d e f i n i n g a s m u c h a s p o s s i b l e o f y o u r c o n f i g u r a t i o n s i n S c a l a . F o r t h e d a t a w h i c h c a n n o t r e s i d e i n c o d e , C i r i s h e l p s y o u t o l o a d a n d d e c o d e v a l u e s , w h i l e d e a l i n g w i t h e r r o r s . V a l i d a t i o n i s e n c o d e d b y u s i n g a p p r o p r i a t e d a t a t y p e s , w i t h a v a i l a b l e i n t e g r a t i o n s t o l i b r a r i e s s u c h a s < a h r e f = " h t t p s : / / g i t h u b . c o m / f t h o m a s / r e f i n e d " t a r g e t = " _ b l a n k " > r e f i n e d < / a > a n d < a h r e f = " h t t p s : / / g i t h u b . c o m / t y p e l e v e l / s q u a n t s " t a r g e t = " _ b l a n k " > s q u a n t s < / a > t o s u p p o r t e v e n m o r e t y p e s . C o n f i g u r a t i o n s a r e t y p i c a l l y m o d e l e d a s c a s e c l a s s h i e r a r c h i e s , b u t y o u a r e f r e e t o c h o o s e t h e m o d e l y o u s e e f i t . < / p > < p > C i r i s i s i n t e n d e d a s a n a l t e r n a t i v e t o c o n f i g u r a t i o n f i l e s , a n d l i b r a r i e s l i k e < a h r e f = " h t t p s : / / g i t h u b . c o m / t y p e s a f e h u b / c o n f i g " t a r g e t = " _ b l a n k " > T y p e s a f e C o n f i g < / a > , i n s i t u a t i o n s w h e r e i t ' s e a s y t o c h a n g e a n d d e p l o y s o f t w a r e . C i r i s a i m s t o m a k e i t e a s y a n d s a f e t o w o r k w i t h c o n f i g u r a t i o n s b y c o m p l e t e l y e l i m i n a t i n g m a n y c o m m o n c o n f i g u r a t i o n e r r o r s , a n d b y p r e v e n t i n g e r r o r s f r o m o c c u r r i n g a s e a r l y a s p o s s i b l e . < / p > < p > Y o u c a n r e a d m o r e a b o u t t h e r e a s o n s b e h i n d C i r i s i n t h e < a h r e f = " h t t p s : / / g i t h u b . c o m / v l o v g r / c i r i s # m o t i v a t i o n " t a r g e t = " _ b l a n k " > M o t i v a t i o n < / a > s e c t i o n . < / p > < h 3 > < a i d = " u s e r - c o n t e n t - g e t t i n g - s t a r t e d " c l a s s = " a n c h o r " h r e f = " h t t p s : / / g i t h u b . c o m / v l o v g r / c i r i s # g e t t i n g - s t a r t e d " a r i a - h i d d e n = " t r u e " t a r g e t = " _ b l a n k " > < s v g a r i a - h i d d e n = " t r u e " c l a s s = " o c t i c o n o c t i c o n - l i n k " h e i g h t = " 1 6 " v e r s i o n = " 1 . 1 " v i e w b o x = " 0 0 1 6 1 6 " w i d t h = " 1 6 " > < p a t h f i l l - r u l e = " e v e n o d d " d = " M 4 9 h 1 v 1 H 4 c - 1 . 5 0 - 3 - 1 . 6 9 - 3 - 3 . 5 S 2 . 5 5 3 4 3 h 4 c 1 . 4 5 0 3 1 . 6 9 3 3 . 5 0 1 . 4 1 - . 9 1 2 . 7 2 - 2 3 . 2 5 V 8 . 5 9 c . 5 8 - . 4 5 1 - 1 . 2 7 1 - 2 . 0 9 C 1 0 5 . 2 2 8 . 9 8 4 8 4 H 4 c - . 9 8 0 - 2 1 . 2 2 - 2 2 . 5 S 3 9 4 9 z m 9 - 3 h - 1 v 1 h 1 c 1 0 2 1 . 2 2 2 2 . 5 S 1 3 . 9 8 1 2 1 3 1 2 H 9 c - . 9 8 0 - 2 - 1 . 2 2 - 2 - 2 . 5 0 - . 8 3 . 4 2 - 1 . 6 4 1 - 2 . 0 9 V 6 . 2 5 c - 1 . 0 9 . 5 3 - 2 1 . 8 4 - 2 3 . 2 5 C 6 1 1 . 3 1 7 . 5 5 1 3 9 1 3 h 4 c 1 . 4 5 0 3 - 1 . 6 9 3 - 3 . 5 S 1 4 . 5 6 1 3 6 z " > < / p a t h > < / s v g > < / a > G e t t i n g S t a r t e d < / h 3 > < p > T o g e t s t a r t e d w i t h < a h r e f = " h t t p : / / w w w . s c a l a - s b t . o r g " t a r g e t = " _ b l a n k " > S B T < / a > , s i m p l y a d d t h e f o l l o w i n g l i n e s t o y o u r < c o d e > b u i l d . s b t < / c o d e > f i l e . < b r > F o r a n o v e r v i e w , u s a g e i n s t r u c t i o n s , a n d e x a m p l e s , p l e a s e s e e t h e < a h r e f = " h t t p s : / / c i r . i s / d o c s / b a s i c s " t a r g e t = " _ b l a n k " > u s a g e g u i d e < / a > . < / p > < p r e > < c o d e > / / L i b r a r i e s a r e p u b l i s h e d f o r S c a l a 2 . 1 0 , 2 . 1 1 , 2 . 1 2 l i b r a r y D e p e n d e n c i e s + + = S e q ( " i s . c i r " % % " c i r i s - c o r e " % " 0 . 4 . 0 " , " i s . c i r " % % " c i r i s - e n u m e r a t u m " % " 0 . 4 . 0 " , " i s . c i r " % % " c i r i s - g e n e r i c " % " 0 . 4 . 0 " , " i s . c i r " % % " c i r i s - r e f i n e d " % " 0 . 4 . 0 " , " i s . c i r " % % " c i r i s - s q u a n t s " % " 0 . 4 . 0 " ) < / c o d e > < / p r e > < p > M a k e s u r e t o r e p l a c e < c o d e > % % < / c o d e > w i t h < c o d e > % % % < / c o d e > i f y o u a r e u s i n g S c a l a . j s . < b r > F o r c h a n g e s b e t w e e n v e r s i o n s , p l e a s e s e e t h e < a h r e f = " h t t p s : / / g i t h u b . c o m / v l o v g r / c i r i s / r e l e a s e s " t a r g e t = " _ b l a n k " > r e l e a s e n o t e s < / a > . < / p > < p > T h e o n l y r e q u i r e d m o d u l e i s < c o d e > c i r i s - c o r e < / c o d e > , t h e r e s t a r e o p t i o n a l l i b r a r y i n t e g r a t i o n s . < b r > F o r a n e x p l a n a t i o n o f h o w t o u s e t h e m o d u l e s , s e e t h e < a h r e f = " h t t p s : / / c i r . i s / d o c s / m o d u l e s " t a r g e t = " _ b l a n k " > M o d u l e s O v e r v i e w < / a > s e c t i o n . < / p > < u l > < l i > T h e < c o d e > c i r i s - e n u m e r a t u m < / c o d e > m o d u l e a l l o w s l o a d i n g < a h r e f = " h t t p s : / / g i t h u b . c o m / l l o y d m e t a / e n u m e r a t u m " t a r g e t = " _ b l a n k " > e n u m e r a t u m < / a > e n u m e r a t i o n s . < / l i > < l i > T h e < c o d e > c i r i s - g e n e r i c < / c o d e > m o d u l e a l l o w s l o a d i n g m o r e t y p e s w i t h < a h r e f = " h t t p s : / / g i t h u b . c o m / m i l e s s a b i n / s h a p e l e s s " t a r g e t = " _ b l a n k " > s h a p e l e s s < / a > . < / l i > < l i > T h e < c o d e > c i r i s - r e f i n e d < / c o d e > m o d u l e a l l o w s l o a d i n g < a h r e f = " h t t p s : / / g i t h u b . c o m / f t h o m a s / r e f i n e d " t a r g e t = " _ b l a n k " > r e f i n e d < / a > r e f i n e m e n t t y p e s . < / l i > < l i > T h e < c o d e > c i r i s - s q u a n t s < / c o d e > m o d u l e a l l o w s l o a d i n g < a h r e f = " h t t p s : / / g i t h u b . c o m / t y p e l e v e l / s q u a n t s " t a r g e t = " _ b l a n k " > s q u a n t s < / a > d a t a t y p e s . < / l i > < / u l > < p > I f y o u ' r e u s i n g < c o d e > c i r i s - g e n e r i c < / c o d e > w i t h S c a l a 2 . 1 0 , y o u ' l l n e e d t o i n c l u d e t h e < a h r e f = " h t t p : / / d o c s . s c a l a - l a n g . o r g / o v e r v i e w s / m a c r o s / p a r a d i s e . h t m l " t a r g e t = " _ b l a n k " > M a c r o P a r a d i s e < / a > c o m p i l e r p l u g i n . < / p > < p r e > < c o d e > l i b r a r y D e p e n d e n c i e s + = c o m p i l e r P l u g i n ( " o r g . s c a l a m a c r o s " % " p a r a d i s e " % " 2 . 1 . 0 " c r o s s C r o s s V e r s i o n . p a t c h ) < / c o d e > < / p r e > < h 4 > < a i d = " u s e r - c o n t e n t - a m m o n i t e " c l a s s = " a n c h o r " h r e f = " h t t p s : / / g i t h u b . c o m / v l o v g r / c i r i s # a m m o n i t e " a r i a - h i d d e n = " t r u e " t a r g e t = " _ b l a n k " > < s v g a r i a - h i d d e n = " t r u e " c l a s s = " o c t i c o n o c t i c o n - l i n k " h e i g h t = " 1 6 " v e r s i o n = " 1 . 1 " v i e w b o x = " 0 0 1 6 1 6 " w i d t h = " 1 6 " > < p a t h f i l l - r u l e = " e v e n o d d " d = " M 4 9 h 1 v 1 H 4 c - 1 . 5 0 - 3 - 1 . 6 9 - 3 - 3 . 5 S 2 . 5 5 3 4 3 h 4 c 1 . 4 5 0 3 1 . 6 9 3 3 . 5 0 1 . 4 1 - . 9 1 2 . 7 2 - 2 3 . 2 5 V 8 . 5 9 c . 5 8 - . 4 5 1 - 1 . 2 7 1 - 2 . 0 9 C 1 0 5 . 2 2 8 . 9 8 4 8 4 H 4 c - . 9 8 0 - 2 1 . 2 2 - 2 2 . 5 S 3 9 4 9 z m 9 - 3 h - 1 v 1 h 1 c 1 0 2 1 . 2 2 2 2 . 5 S 1 3 . 9 8 1 2 1 3 1 2 H 9 c - . 9 8 0 - 2 - 1 . 2 2 - 2 - 2 . 5 0 - . 8 3 . 4 2 - 1 . 6 4 1 - 2 . 0 9 V 6 . 2 5 c - 1 . 0 9 . 5 3 - 2 1 . 8 4 - 2 3 . 2 5 C 6 1 1 . 3 1 7 . 5 5 1 3 9 1 3 h 4 c 1 . 4 5 0 3 - 1 . 6 9 3 - 3 . 5 S 1 4 . 5 6 1 3 6 z " > < / p a t h > < / s v g > < / a > A m m o n i t e < / h 4 > < p > T o s t a r t a n < a h r e f = " h t t p : / / w w w . l i h a o y i . c o m / A m m o n i t e / # A m m o n i t e - R E P L " t a r g e t = " _ b l a n k " > A m m o n i t e R E P L < / a > w i t h C i r i s l o a d e d a n d i m p o r t e d , s i m p l y r u n t h e f o l l o w i n g . < / p > < p r e > < c o d e > c u r l - L s t r y . c i r . i s | s h < / c o d e > < / p r e > < p > Y o u w i l l n e e d t o h a v e a J D K i n s t a l l e d . T h e < a h r e f = " h t t p s : / / t r y . c i r . i s " t a r g e t = " _ b l a n k " > s c r i p t < / a > w i l l t h e n : < / p > < u l > < l i > d o w n l o a d a n d i n s t a l l t h e l a t e s t a v a i l a b l e v e r s i o n o f < a h r e f = " h t t p s : / / g i t h u b . c o m / c o u r s i e r / c o u r s i e r " t a r g e t = " _ b l a n k " > c o u r s i e r < / a > , < / l i > < l i > u s e c o u r s i e r t o f e t c h A m m o n i t e a n d t h e l a t e s t C i r i s v e r s i o n , < / l i > < l i > s t a r t a n A m m o n i t e R E P L w i t h C i r i s a l r e a d y i m p o r t e d . < / l i > < / u l > < p > I f y o u a l r e a d y h a v e t h e A m m o n i t e R E P L i n s t a l l e d , y o u c a n l o a d C i r i s u s i n g t h e f o l l o w i n g c o m m a n d s . < / p > < p r e > < c o d e > i m p o r t $ i v y . ` i s . c i r : : c i r i s - c o r e : 0 . 4 . 0 ` , c i r i s . _ i m p o r t $ i v y . ` i s . c i r : : c i r i s - e n u m e r a t u m : 0 . 4 . 0 ` , c i r i s . e n u m e r a t u m . _ i m p o r t $ i v y . ` i s . c i r : : c i r i s - g e n e r i c : 0 . 4 . 0 ` , c i r i s . g e n e r i c . _ i m p o r t $ i v y . ` i s . c i r : : c i r i s - r e f i n e d : 0 . 4 . 0 ` , c i r i s . r e f i n e d . _ i m p o r t $ i v y . ` i s . c i r : : c i r i s - s q u a n t s : 0 . 4 . 0 ` , c i r i s . s q u a n t s . _ < / c o d e > < / p r e > < h 3 > < a i d = " u s e r - c o n t e n t - m o t i v a t i o n " c l a s s = " a n c h o r " h r e f = " h t t p s : / / g i t h u b . c o m / v l o v g r / c i r i s # m o t i v a t i o n " a r i a - h i d d e n = " t r u e " t a r g e t = " _ b l a n k " > < s v g a r i a - h i d d e n = " t r u e " c l a s s = " o c t i c o n o c t i c o n - l i n k " h e i g h t = " 1 6 " v e r s i o n = " 1 . 1 " v i e w b o x = " 0 0 1 6 1 6 " w i d t h = " 1 6 " > < p a t h f i l l - r u l e = " e v e n o d d " d = " M 4 9 h 1 v 1 H 4 c - 1 . 5 0 - 3 - 1 . 6 9 - 3 - 3 . 5 S 2 . 5 5 3 4 3 h 4 c 1 . 4 5 0 3 1 . 6 9 3 3 . 5 0 1 . 4 1 - . 9 1 2 . 7 2 - 2 3 . 2 5 V 8 . 5 9 c . 5 8 - . 4 5 1 - 1 . 2 7 1 - 2 . 0 9 C 1 0 5 . 2 2 8 . 9 8 4 8 4 H 4 c - . 9 8 0 - 2 1 . 2 2 - 2 2 . 5 S 3 9 4 9 z m 9 - 3 h - 1 v 1 h 1 c 1 0 2 1 . 2 2 2 2 . 5 S 1 3 . 9 8 1 2 1 3 1 2 H 9 c - . 9 8 0 - 2 - 1 . 2 2 - 2 - 2 . 5 0 - . 8 3 . 4 2 - 1 . 6 4 1 - 2 . 0 9 V 6 . 2 5 c - 1 . 0 9 . 5 3 - 2 1 . 8 4 - 2 3 . 2 5 C 6 1 1 . 3 1 7 . 5 5 1 3 9 1 3 h 4 c 1 . 4 5 0 3 - 1 . 6 9 3 - 3 . 5 S 1 4 . 5 6 1 3 6 z " > < / p a t h > < / s v g > < / a > M o t i v a t i o n < / h 3 > < p > W h e n i t t a k e s l i t t l e e f f o r t t o c h a n g e a n d r e l e a s e s o f t w a r e , f o r e x a m p l e w h e n e m p l o y i n g < a h r e f = " h t t p s : / / w w w . a g i l e a l l i a n c e . o r g / g l o s s a r y / c o n t i n u o u s - d e p l o y m e n t / " t a r g e t = " _ b l a n k " > c o n t i n u o u s d e p l o y m e n t < / a > p r a c t i c e s , w r i t i n g y o u r c o n f i g u r a t i o n s i n S c a l a c a n b e a v i a b l e a l t e r n a t i v e t o c o n f i g u r a t i o n f i l e s , i n o r d e r t o i n c r e a s e c o m p i l e - t i m e s a f e t y . S i n c e c o n f i g u r a t i o n f i l e s a r e n o t v a l i d a t e d a t c o m p i l e - t i m e , a n y e r r o r s w i l l o c c u r a t r u n t i m e . T e s t s a n d m a c r o s c a n b e u s e d t o p e r f o r m v a l i d a t i o n , b u t b y s i m p l y u s i n g S c a l a a s a c o n f i g u r a t i o n l a n g u a g e , w e e n s u r e t h a t t h e c o n f i g u r a t i o n i s c o r r e c t w h e n c o m p i l i n g , t h e r e b y e l i m i n a t i n g m a n y p o t e n t i a l r u n t i m e e r r o r s , w i t h o u t h a v i n g t o r e s o r t t o m a c r o s . < / p > < p > F o r s e c u r i t y r e a s o n s , i t ' s d e s i r a b l e t h a t s e c r e t s , l i k e p a s s w o r d s , a r e n o t s t o r e d i n t h e s o u r c e c o d e . F o r a S c a l a c o n f i g u r a t i o n , t h i s m e a n s t h a t t h e c o d e c o n t a i n i n g y o u r s e c r e t s s h o u l d b e s t o r e d i n a d i f f e r e n t p l a c e , a n d l a t e r b e c o m p i l e d t o g e t h e r w i t h t h e r e s t o f y o u r a p p l i c a t i o n . I f y o u r e q u i r e t h a t y o u r s e c r e t s s h o u l d n ' t b e p e r s i s t e d t o d i s k , t h a t m i g h t n o t b e f e a s i b l e . A l t e r n a t i v e l y , y o u c a n d e f i n e m o s t o f y o u r c o n f i g u r a t i o n i n S c a l a a n d o n l y l o a d s e c r e t s , a n d o t h e r v a l u e s w h i c h c a n n o t r e s i d e i n c o d e , f r o m t h e a p p l i c a t i o n ' s e n v i r o n m e n t . < / p > < p > W h i l e i t ' s p o s s i b l e t o n o t u s e a n y l i b r a r i e s i n t h e l a t t e r c a s e , l o a d i n g v a l u e s f r o m t h e e n v i r o n m e n t t y p i c a l l y m e a n s d e a l i n g w i t h : d i f f e r e n t e n v i r o n m e n t s a n d c o n f i g u r a t i o n s o u r c e s , t y p e c o n v e r s i o n s , e r r o r h a n d l i n g , a n d v a l i d a t i o n . T h i s i s w h e r e C i r i s c o m e s i n : a s m a l l l i b r a r y , d e p e n d e n c y - f r e e a t i t s c o r e , h e l p i n g y o u t o d e a l w i t h a l l o f t h a t m o r e e a s i l y . < / p > < h 3 > < a i d = " u s e r - c o n t e n t - d o c u m e n t a t i o n " c l a s s = " a n c h o r " h r e f = " h t t p s : / / g i t h u b . c o m / v l o v g r / c i r i s # d o c u m e n t a t i o n " a r i a - h i d d e n = " t r u e " t a r g e t = " _ b l a n k " > < s v g a r i a - h i d d e n = " t r u e " c l a s s = " o c t i c o n o c t i c o n - l i n k " h e i g h t = " 1 6 " v e r s i o n = " 1 . 1 " v i e w b o x = " 0 0 1 6 1 6 " w i d t h = " 1 6 " > < p a t h f i l l - r u l e = " e v e n o d d " d = " M 4 9 h 1 v 1 H 4 c - 1 . 5 0 - 3 - 1 . 6 9 - 3 - 3 . 5 S 2 . 5 5 3 4 3 h 4 c 1 . 4 5 0 3 1 . 6 9 3 3 . 5 0 1 . 4 1 - . 9 1 2 . 7 2 - 2 3 . 2 5 V 8 . 5 9 c . 5 8 - . 4 5 1 - 1 . 2 7 1 - 2 . 0 9 C 1 0 5 . 2 2 8 . 9 8 4 8 4 H 4 c - . 9 8 0 - 2 1 . 2 2 - 2 2 . 5 S 3 9 4 9 z m 9 - 3 h - 1 v 1 h 1 c 1 0 2 1 . 2 2 2 2 . 5 S 1 3 . 9 8 1 2 1 3 1 2 H 9 c - . 9 8 0 - 2 - 1 . 2 2 - 2 - 2 . 5 0 - . 8 3 . 4 2 - 1 . 6 4 1 - 2 . 0 9 V 6 . 2 5 c - 1 . 0 9 . 5 3 - 2 1 . 8 4 - 2 3 . 2 5 C 6 1 1 . 3 1 7 . 5 5 1 3 9 1 3 h 4 c 1 . 4 5 0 3 - 1 . 6 9 3 - 3 . 5 S 1 4 . 5 6 1 3 6 z " > < / p a t h > < / s v g > < / a > D o c u m e n t a t i o n < / h 3 > < p > F o r a n o v e r v i e w , w i t h e x a m p l e s a n d e x p l a n a t i o n s o f t h e m o s t c o m m o n u s e c a s e s , p l e a s e r e f e r t o t h e < a h r e f = " h t t p s : / / c i r . i s / d o c s / b a s i c s " t a r g e t = " _ b l a n k " > u s a g e g u i d e < / a > . < b r > I f y o u ' r e l o o k i n g f o r a m o r e d e t a i l e d c o d e - c e n t r i c o v e r v i e w , y o u c a n i n s t e a d t a k e a l o o k a t t h e < a h r e f = " h t t p s : / / c i r . i s / a p i " t a r g e t = " _ b l a n k " > A P I d o c u m e n t a t i o n < / a > . < / p > < h 3 > < a i d = " u s e r - c o n t e n t - p a r t i c i p a t i o n " c l a s s = " a n c h o r " h r e f = " h t t p s : / / g i t h u b . c o m / v l o v g r / c i r i s # p a r t i c i p a t i o n " a r i a - h i d d e n = " t r u e " t a r g e t = " _ b l a n k " > < s v g a r i a - h i d d e n = " t r u e " c l a s s = " o c t i c o n o c t i c o n - l i n k " h e i g h t = " 1 6 " v e r s i o n = " 1 . 1 " v i e w b o x = " 0 0 1 6 1 6 " w i d t h = " 1 6 " > < p a t h f i l l - r u l e = " e v e n o d d " d = " M 4 9 h 1 v 1 H 4 c - 1 . 5 0 - 3 - 1 . 6 9 - 3 - 3 . 5 S 2 . 5 5 3 4 3 h 4 c 1 . 4 5 0 3 1 . 6 9 3 3 . 5 0 1 . 4 1 - . 9 1 2 . 7 2 - 2 3 . 2 5 V 8 . 5 9 c . 5 8 - . 4 5 1 - 1 . 2 7 1 - 2 . 0 9 C 1 0 5 . 2 2 8 . 9 8 4 8 4 H 4 c - . 9 8 0 - 2 1 . 2 2 - 2 2 . 5 S 3 9 4 9 z m 9 - 3 h - 1 v 1 h 1 c 1 0 2 1 . 2 2 2 2 . 5 S 1 3 . 9 8 1 2 1 3 1 2 H 9 c - . 9 8 0 - 2 - 1 . 2 2 - 2 - 2 . 5 0 - . 8 3 . 4 2 - 1 . 6 4 1 - 2 . 0 9 V 6 . 2 5 c - 1 . 0 9 . 5 3 - 2 1 . 8 4 - 2 3 . 2 5 C 6 1 1 . 3 1 7 . 5 5 1 3 9 1 3 h 4 c 1 . 4 5 0 3 - 1 . 6 9 3 - 3 . 5 S 1 4 . 5 6 1 3 6 z " > < / p a t h > < / s v g > < / a > P a r t i c i p a t i o n < / h 3 > < p > C i r i s e m b r a c e s p u r e , t y p e f u l , i d i o m a t i c f u n c t i o n a l p r o g r a m m i n g i n S c a l a , a n d w a n t s t o p r o v i d e a s a f e a n d f r i e n d l y e n v i r o n m e n t f o r t e a c h i n g , l e a r n i n g , a n d c o n t r i b u t i n g a s d e s c r i b e d i n t h e < a h r e f = " h t t p : / / t y p e l e v e l . o r g / c o n d u c t . h t m l " t a r g e t = " _ b l a n k " > T y p e l e v e l C o d e o f C o n d u c t < / a > . I t i s e x p e c t e d t h a t p a r t i c i p a n t s f o l l o w t h e c o d e o f c o n d u c t i n a l l o f f i c i a l c h a n n e l s , i n c l u d i n g o n G i t H u b a n d i n t h e G i t t e r c h a t r o o m . < / p > < h 3 > < a i d = " u s e r - c o n t e n t - l i c e n s e " c l a s s = " a n c h o r " h r e f = " h t t p s : / / g i t h u b . c o m / v l o v g r / c i r i s # l i c e n s e " a r i a - h i d d e n = " t r u e " t a r g e t = " _ b l a n k " > < s v g a r i a - h i d d e n = " t r u e " c l a s s = " o c t i c o n o c t i c o n - l i n k " h e i g h t = " 1 6 " v e r s i o n = " 1 . 1 " v i e w b o x = " 0 0 1 6 1 6 " w i d t h = " 1 6 " > < p a t h f i l l - r u l e = " e v e n o d d " d = " M 4 9 h 1 v 1 H 4 c - 1 . 5 0 - 3 - 1 . 6 9 - 3 - 3 . 5 S 2 . 5 5 3 4 3 h 4 c 1 . 4 5 0 3 1 . 6 9 3 3 . 5 0 1 . 4 1 - . 9 1 2 . 7 2 - 2 3 . 2 5 V 8 . 5 9 c . 5 8 - . 4 5 1 - 1 . 2 7 1 - 2 . 0 9 C 1 0 5 . 2 2 8 . 9 8 4 8 4 H 4 c - . 9 8 0 - 2 1 . 2 2 - 2 2 . 5 S 3 9 4 9 z m 9 - 3 h - 1 v 1 h 1 c 1 0 2 1 . 2 2 2 2 . 5 S 1 3 . 9 8 1 2 1 3 1 2 H 9 c - . 9 8 0 - 2 - 1 . 2 2 - 2 - 2 . 5 0 - . 8 3 . 4 2 - 1 . 6 4 1 - 2 . 0 9 V 6 . 2 5 c - 1 . 0 9 . 5 3 - 2 1 . 8 4 - 2 3 . 2 5 C 6 1 1 . 3 1 7 . 5 5 1 3 9 1 3 h 4 c 1 . 4 5 0 3 - 1 . 6 9 3 - 3 . 5 S 1 4 . 5 6 1 3 6 z " > < / p a t h > < / s v g > < / a > L i c e n s e < / h 3 > < p > C i r i s i s a v a i l a b l e u n d e r t h e M I T l i c e n s e , a v a i l a b l e a t < a h r e f = " h t t p s : / / o p e n s o u r c e . o r g / l i c e n s e s / M I T " t a r g e t = " _ b l a n k " > h t t p s : / / o p e n s o u r c e . o r g / l i c e n s e s / M I T < / a > a n d i n t h e < a h r e f = " h t t p s : / / g i t h u b . c o m / v l o v g r / c i r i s / b l o b / m a s t e r / l i c e n s e . t x t " t a r g e t = " _ b l a n k " > l i c e n s e f i l e < / a > . < / p > < / a r t i c l e > < / d i v >