Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
195
Issues
195
List
Board
Labels
Milestones
Merge Requests
12
Merge Requests
12
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
haskell-gargantext
Commits
b3910bb4
Verified
Commit
b3910bb4
authored
Jan 14, 2025
by
Przemyslaw Kaminski
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[test] move some Arbitrary instances to Test/Instances.hs
parent
bb282d02
Pipeline
#7213
passed with stages
in 86 minutes and 58 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
Types.hs
src/Gargantext/API/Admin/Orchestrator/Types.hs
+1
-13
Instances.hs
test/Test/Instances.hs
+12
-0
No files found.
src/Gargantext/API/Admin/Orchestrator/Types.hs
View file @
b3910bb4
...
@@ -26,8 +26,7 @@ import Gargantext.Core.Types (TODO(..))
...
@@ -26,8 +26,7 @@ import Gargantext.Core.Types (TODO(..))
import
Gargantext.Core.Utils.Aeson
(
jsonOptions
)
import
Gargantext.Core.Utils.Aeson
(
jsonOptions
)
import
Gargantext.Prelude
import
Gargantext.Prelude
import
PUBMED.Types
qualified
as
PUBMED
import
PUBMED.Types
qualified
as
PUBMED
import
Test.QuickCheck
(
elements
)
import
Test.QuickCheck.Arbitrary
type
EPOAPIToken
=
Text
type
EPOAPIToken
=
Text
type
EPOAPIUser
=
Text
type
EPOAPIUser
=
Text
...
@@ -94,11 +93,6 @@ data ScraperEvent = ScraperEvent
...
@@ -94,11 +93,6 @@ data ScraperEvent = ScraperEvent
,
_scev_date
::
!
(
Maybe
Text
)
,
_scev_date
::
!
(
Maybe
Text
)
}
}
deriving
(
Show
,
Generic
,
Eq
)
deriving
(
Show
,
Generic
,
Eq
)
instance
Arbitrary
ScraperEvent
where
arbitrary
=
ScraperEvent
<$>
elements
[
Nothing
,
Just
"test message"
]
<*>
elements
[
Nothing
,
Just
"INFO"
,
Just
"WARN"
]
<*>
elements
[
Nothing
,
Just
"2018-04-18"
]
instance
ToJSON
ScraperEvent
where
instance
ToJSON
ScraperEvent
where
toJSON
=
genericToJSON
$
jsonOptions
"_scev_"
toJSON
=
genericToJSON
$
jsonOptions
"_scev_"
instance
FromJSON
ScraperEvent
where
instance
FromJSON
ScraperEvent
where
...
@@ -121,12 +115,6 @@ makeLenses ''JobLog
...
@@ -121,12 +115,6 @@ makeLenses ''JobLog
noJobLog
::
JobLog
noJobLog
::
JobLog
noJobLog
=
JobLog
Nothing
Nothing
Nothing
Nothing
noJobLog
=
JobLog
Nothing
Nothing
Nothing
Nothing
instance
Arbitrary
JobLog
where
arbitrary
=
JobLog
<$>
arbitrary
<*>
arbitrary
<*>
arbitrary
<*>
arbitrary
instance
ToJSON
JobLog
where
instance
ToJSON
JobLog
where
toJSON
=
genericToJSON
$
jsonOptions
"_scst_"
toJSON
=
genericToJSON
$
jsonOptions
"_scst_"
instance
FromJSON
JobLog
where
instance
FromJSON
JobLog
where
...
...
test/Test/Instances.hs
View file @
b3910bb4
...
@@ -317,6 +317,18 @@ instance Arbitrary Orch.ExternalAPIs where
...
@@ -317,6 +317,18 @@ instance Arbitrary Orch.ExternalAPIs where
-- <*> arbitrary -- _wf_lang
-- <*> arbitrary -- _wf_lang
-- <*> arbitrary -- _wf_name
-- <*> arbitrary -- _wf_name
instance
Arbitrary
Orch
.
ScraperEvent
where
arbitrary
=
Orch
.
ScraperEvent
<$>
elements
[
Nothing
,
Just
"test message"
]
<*>
elements
[
Nothing
,
Just
"INFO"
,
Just
"WARN"
]
<*>
elements
[
Nothing
,
Just
"2018-04-18"
]
instance
Arbitrary
Orch
.
JobLog
where
arbitrary
=
Orch
.
JobLog
<$>
arbitrary
<*>
arbitrary
<*>
arbitrary
<*>
arbitrary
instance
Arbitrary
NewWithForm
where
arbitrary
=
genericArbitrary
instance
Arbitrary
NewWithForm
where
arbitrary
=
genericArbitrary
instance
Arbitrary
RenameNode
where
instance
Arbitrary
RenameNode
where
...
...
Przemyslaw Kaminski
@cgenie
mentioned in commit
03b33383
·
Jan 30, 2025
mentioned in commit
03b33383
mentioned in commit 03b33383dd67c1821a4edb4628923cf7bd039d90
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment