Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging release v0.9 #347

Merged
merged 273 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
273 commits
Select commit Hold shift + click to select a range
5007bf0
[BI-1943] - avoid unintended value collision
mlm483 Oct 4, 2023
7e1f6a2
[BI-1943] - simplified
mlm483 Oct 5, 2023
08ab94c
[BI-1943] - simplified further
mlm483 Oct 5, 2023
10f28ef
Bump postgresql from 42.3.2 to 42.3.8
dependabot[bot] Mar 1, 2023
6068610
Merge pull request #229 from Breeding-Insight/dependabot/maven/org.po…
timparsons Oct 6, 2023
153b7db
[autocommit] bumping build number
rob-ouser-bi Oct 6, 2023
429c7f1
[BI-1890] added validateTestOrCheck() method
davedrp Oct 6, 2023
889a6bf
[BI-1890] Fixed problems (not bugs) reported by InteliJ
davedrp Oct 6, 2023
b4dca76
Merge branch 'release/0.8.1' into develop
timparsons Oct 9, 2023
0367c57
[autocommit] bumping build number
rob-ouser-bi Oct 9, 2023
84cce7d
[BI-1930] made observationvariable validations with ontologies case-i…
davedrp Oct 9, 2023
dde1b4d
Merge branch 'develop' into bug/BI-1943
mlm483 Oct 12, 2023
5359407
Merge pull request #297 from Breeding-Insight/bug/BI-1943
mlm483 Oct 12, 2023
3ccee1e
[autocommit] bumping build number
rob-ouser-bi Oct 12, 2023
f318dbb
[BI-1930] Fixed bug with sorting observation variables.
davedrp Oct 13, 2023
8f8e441
Merge branch 'develop' into feature/BI-1890-2
davedrp Oct 13, 2023
ebb5127
Merge pull request #299 from Breeding-Insight/feature/BI-1890-2
davedrp Oct 13, 2023
b1bfa80
[autocommit] bumping build number
rob-ouser-bi Oct 13, 2023
dfe9802
[BI-1965] upgrading mongo version
timparsons Oct 13, 2023
8e3d1d0
Fixing header to match what Gigwa expects
timparsons Oct 13, 2023
b3d7e57
[BI-1914]Created default sorts
davedrp Oct 16, 2023
60e4ed3
[BI-1914] Spread sheet's sheet Name should be 'Data' not 'Experiment …
davedrp Oct 16, 2023
d5c4ad7
[BI-1914] tightened up code
davedrp Oct 16, 2023
1640202
Merge pull request #300 from Breeding-Insight/bug/BI-1930
davedrp Oct 20, 2023
0e2ffa6
[autocommit] bumping build number
rob-ouser-bi Oct 20, 2023
38c6a65
[BI-1915] ontology export/download
davedrp Oct 27, 2023
fe5aed9
[BI-1915]fixed text for scale class DATE
davedrp Nov 1, 2023
92e1ad2
[BI-1914]WIP
davedrp Nov 2, 2023
d7cba83
[BI-1914] Use IntOrderComparator
davedrp Nov 2, 2023
5fd64cf
[BI-1914] removed unused import statement
davedrp Nov 2, 2023
d6354eb
Merge branch 'develop' into feature/BI-1914
davedrp Nov 2, 2023
4b28150
[BI-1914] improved language in IntOrderComparator
davedrp Nov 2, 2023
770333d
Merge branch 'release/0.8.1' into develop
timparsons Nov 7, 2023
35eeabd
[autocommit] bumping build number
rob-ouser-bi Nov 7, 2023
921fd08
[BI-1914] changed Integer to BigInteger
davedrp Nov 7, 2023
79008e2
Merge branch 'develop' into feature/BI-1914
davedrp Nov 7, 2023
0b42edb
Added sorghum and hemp to brapi species
nickpalladino Nov 2, 2023
e44706e
Added sorghum and hemp
nickpalladino Nov 2, 2023
ccddd50
Merge pull request #307 from Breeding-Insight/feature/BI-1956
nickpalladino Nov 7, 2023
b0bf2ae
[autocommit] bumping build number
rob-ouser-bi Nov 7, 2023
86189b4
Merge branch 'develop' into feature/BI-1915
davedrp Nov 8, 2023
a75c12e
Merge branch 'develop' into feature/BI-1914
davedrp Nov 8, 2023
fe6eb47
[BI-1915] Fixed IntellaJ 'problems'
davedrp Nov 8, 2023
2eb843e
Merge pull request #303 from Breeding-Insight/feature/BI-1914
davedrp Nov 8, 2023
1808030
[autocommit] bumping build number
rob-ouser-bi Nov 8, 2023
7582bd0
[BI-1915] only include caigories in ontology export, if the scale cla…
davedrp Nov 8, 2023
7572924
[BI-1922] Can download Germplasm
davedrp Oct 25, 2023
819a0f9
[BI-1922] addess 'problems' identified by InelliJ
davedrp Oct 30, 2023
faa034a
[BI-1945] - removed indexes on tables that were removed
mlm483 Nov 13, 2023
91030fc
[BI-1945] - updated species seed data
mlm483 Nov 13, 2023
24f535d
[BI-1945] - updated application.properties
mlm483 Nov 13, 2023
92e53ec
[BI-1945] - updated bind mount and paths
mlm483 Nov 13, 2023
cae376a
[BI-1945] - renamed for flyway
mlm483 Nov 13, 2023
17e6db3
[BI-1945] - fixed tests
mlm483 Nov 14, 2023
e0cf886
[BI-1922] better error handeling
davedrp Nov 17, 2023
45952b4
Merge pull request #311 from Breeding-Insight/feature/BI-1922
davedrp Nov 17, 2023
6301e2c
[autocommit] bumping build number
rob-ouser-bi Nov 17, 2023
23dff7d
Merge branch 'develop' into feature/BI-1915
davedrp Nov 17, 2023
5881a34
Merge pull request #310 from Breeding-Insight/feature/BI-1915
davedrp Nov 18, 2023
e3d4c58
[autocommit] bumping build number
rob-ouser-bi Nov 18, 2023
a646811
Merge branch 'develop' into feature/BI-1945
mlm483 Nov 21, 2023
bff6934
Merge pull request #312 from Breeding-Insight/feature/BI-1945
mlm483 Nov 21, 2023
5b17e95
[autocommit] bumping build number
rob-ouser-bi Nov 21, 2023
44be420
[BI-1945-hotfix] - updated bind mount paths
mlm483 Nov 29, 2023
ab28861
Merge pull request #314 from Breeding-Insight/hotfix/BI-1945
mlm483 Nov 29, 2023
5b48dd2
[autocommit] bumping build number
rob-ouser-bi Nov 29, 2023
a57cc28
[BI-1910] Converting BrAPIImportService to an interface
timparsons Oct 23, 2023
9286d60
[BI-1910] Adding support for XLSB file type
timparsons Oct 23, 2023
0518d43
[BI-1910] Expanding return type of the post function to not have to m…
timparsons Oct 23, 2023
3863dcc
[BI-1910] upgrading to the latest brapi client
timparsons Oct 23, 2023
7fbbacd
[BI-1910] Implementing support for importing sample submissions
timparsons Oct 23, 2023
f108805
[BI-1910] remove unintended class commit
timparsons Oct 23, 2023
e84c46d
[BI-1910] Implementing functionality to fetch and update sample submi…
timparsons Oct 26, 2023
8682e0d
[BI-1910] Updating brapi-java-client dependency to point to Central R…
timparsons Oct 30, 2023
4d56819
[BI-1910] Adding new config for allowing vendor submission
timparsons Oct 30, 2023
77c8a4c
[BI-1910] Adding unit tests
timparsons Nov 3, 2023
e35be0c
[BI-1910] fixing failing test
timparsons Nov 6, 2023
09fc55e
[BI-1910] Forcing row to be uppercase when saving
timparsons Nov 22, 2023
7ae9224
[BI-1910] removing commented out code
timparsons Nov 22, 2023
aa58fd3
Merge pull request #306 from Breeding-Insight/feature/BI-1910
timparsons Nov 29, 2023
3da6372
[autocommit] bumping build number
rob-ouser-bi Nov 29, 2023
0c34942
[BI-1867] - Ontology: Increase name length to 16 characters
HMS17 Dec 1, 2023
ddc28e8
[BI-1867] - Ontology: Increase name length to 16 characters
HMS17 Dec 1, 2023
4430904
Merge pull request #317 from Breeding-Insight/feature/BI-1867
HMS17 Dec 6, 2023
ff84d15
[autocommit] bumping build number
rob-ouser-bi Dec 6, 2023
ac8d844
add check for multiple exp titles in import
dmeidlin Nov 28, 2023
a433556
handle exception in exp processor public method
dmeidlin Dec 1, 2023
228d6dc
Merge pull request #316 from Breeding-Insight/feature/BI-1960-2
dmeidlin Dec 6, 2023
2787525
[autocommit] bumping build number
rob-ouser-bi Dec 6, 2023
2faaf92
update ExperimentObservation.java to have fields overwrite and overwr…
dmeidlin Sep 21, 2023
38231a9
add count of existing observations to preview
dmeidlin Oct 2, 2023
90bf5ac
create BrAPIObservationDAO#updateBrAPIObservation
dmeidlin Oct 2, 2023
0990232
add change log to additional info of mutated observation
dmeidlin Oct 3, 2023
ad3d566
update mutated observations in postBrapiData
dmeidlin Oct 3, 2023
d1e8fff
add check for NPE
dmeidlin Oct 3, 2023
72dc5f7
count mutated observations
dmeidlin Oct 4, 2023
6da9980
change overwrite field type to String
dmeidlin Oct 7, 2023
cc94473
[BI-1830] init observation pio for updated value
dmeidlin Oct 17, 2023
7e4f17a
[BI-1830] refactor
dmeidlin Oct 18, 2023
c9d5241
remove comments
dmeidlin Oct 18, 2023
d8b8c74
code cleanup
dmeidlin Oct 23, 2023
f274c7b
revert row indexing
dmeidlin Oct 23, 2023
9a9c335
create ChangeLogEntry class
dmeidlin Oct 23, 2023
ec83971
check for adding new OU to existing environment
dmeidlin Nov 7, 2023
bb66651
[BI-1830] format pios for display
dmeidlin Nov 8, 2023
800234c
map season year to study pio
dmeidlin Nov 9, 2023
41dd3bd
[BI-1830] update experiment import test
dmeidlin Nov 9, 2023
c774071
update test
dmeidlin Nov 10, 2023
6890a6b
add fixes
dmeidlin Nov 21, 2023
44e7b50
update observation timestamps
dmeidlin Nov 27, 2023
4471a0a
fix NPEs
dmeidlin Dec 5, 2023
dadbcf3
Merge pull request #305 from Breeding-Insight/feature/BI-1830
dmeidlin Dec 6, 2023
6d424c9
[autocommit] bumping build number
rob-ouser-bi Dec 6, 2023
101350b
Merge branch 'develop' into feature/BI-1965
mlm483 Dec 7, 2023
5025cd0
Merge pull request #301 from Breeding-Insight/feature/BI-1965
mlm483 Dec 7, 2023
81cc921
[autocommit] bumping build number
rob-ouser-bi Dec 7, 2023
3a3ad65
[BI-1965-bugfix] - replaced deprecated env var
mlm483 Dec 8, 2023
8e4477d
[BI-1965-bugfix] - replaced deprecated env var in test
mlm483 Dec 8, 2023
38ef089
[BI-1965-bugfix] - pinned localstack image to 3.0.2
mlm483 Dec 8, 2023
464616d
[BI-2027] - improved logging in ProgramCache
mlm483 Dec 11, 2023
54924ec
[BI-2027] - added edge case log
mlm483 Dec 11, 2023
ee37b7c
[BI-2019] - added explicit shm_size to bidb
mlm483 Dec 12, 2023
cedfdd8
Merge pull request #324 from Breeding-Insight/bug/BI-2019
mlm483 Dec 14, 2023
9dfdc18
[autocommit] bumping build number
rob-ouser-bi Dec 14, 2023
fa6f2ea
Merge branch 'develop' into feature/BI-2027
mlm483 Dec 14, 2023
de3d16c
[autocommit] bumping build number
rob-ouser-bi Dec 14, 2023
465b040
Merge branch 'develop' into feature/BI-2027
mlm483 Dec 14, 2023
5337008
Merge pull request #322 from Breeding-Insight/feature/BI-2027
mlm483 Dec 14, 2023
2f06529
[autocommit] bumping build number
rob-ouser-bi Dec 14, 2023
252776e
Merge branch 'develop' into feature/BI-1965-bugfix
mlm483 Dec 15, 2023
c706664
Merge pull request #321 from Breeding-Insight/feature/BI-1965-bugfix
mlm483 Dec 15, 2023
19d876f
[autocommit] bumping build number
rob-ouser-bi Dec 15, 2023
b7f5473
assign existing germplasm to OU PIO by gid instead of by germplasm name
dmeidlin Dec 8, 2023
8852119
remove comment
dmeidlin Dec 8, 2023
0a9181c
cleanup
dmeidlin Dec 8, 2023
93f983d
Merge pull request #320 from Breeding-Insight/bug/BI-2028
dmeidlin Dec 20, 2023
2973f50
[autocommit] bumping build number
rob-ouser-bi Dec 20, 2023
6c1278f
[BI-2014] removed code that was causing a problem. We _may_ need to …
davedrp Dec 22, 2023
a1d30bc
change OU error message
dmeidlin Dec 6, 2023
34c590b
update message
dmeidlin Dec 7, 2023
219d848
[BI-1761] update and optimize
dmeidlin Dec 12, 2023
9ee4906
[BI-1761] use MissingInformationException
dmeidlin Dec 12, 2023
bded938
update message
dmeidlin Dec 20, 2023
c11b492
Merge pull request #319 from Breeding-Insight/feature/BI-1761
dmeidlin Jan 4, 2024
7c97580
[autocommit] bumping build number
rob-ouser-bi Jan 4, 2024
b5fe48d
[autocommit] bumping build number
rob-ouser-bi Jan 8, 2024
fd9d7ad
Merge branch 'release/0.9' into bug/BI-2014
davedrp Jan 11, 2024
12270a1
Merge pull request #325 from Breeding-Insight/bug/BI-2014
davedrp Jan 11, 2024
6753df1
[autocommit] bumping build number
rob-ouser-bi Jan 11, 2024
aee0658
add season to additional info
dmeidlin Jan 18, 2024
e2e6aa0
remove NPE
dmeidlin Jan 18, 2024
b4783e8
remove comments
dmeidlin Jan 18, 2024
5817679
[autocommit] bumping build number
rob-ouser-bi Jan 23, 2024
30518ea
[BI-1921] Adding OIDC endpoints
timparsons Sep 18, 2023
6e49ae2
[BI-1921] fixing compilation error
timparsons Sep 25, 2023
468ea83
[BI-1921] Implementing various BrAPI endpoints to support Field Book
timparsons Oct 4, 2023
d34d5b1
[BI-1921] Fixing trait fetch bug
timparsons Oct 5, 2023
3c45369
[BI-1921] filtering out REP and BLOCK levels from the /observationlev…
timparsons Oct 12, 2023
9c53b63
[BI-1921] Updating trait response to have the trait name be the first…
timparsons Oct 12, 2023
c089de8
[BI-1921] fixing compilation error
timparsons Oct 23, 2023
9cc4350
[BI-1921] fixing failing unit tests
timparsons Nov 29, 2023
42ea0c1
[BI-1921] fixing unit tests
timparsons Nov 29, 2023
2f3309f
[BI-1921] adding more unit tests
timparsons Nov 30, 2023
2769cf3
[BI-1921] cleaning up imports
timparsons Nov 30, 2023
5968eca
[BI-1921] fixing compilation errors
timparsons Dec 1, 2023
16e1f2b
prepend serverinfo path with biapi version number
dmeidlin Jan 22, 2024
5ce6f19
remove redundant query variables
dmeidlin Jan 22, 2024
9f9b142
move helper methods to trait service
dmeidlin Jan 22, 2024
f408da3
remove vestigial comments
dmeidlin Jan 22, 2024
09f8c47
move helper methods to new ObservationVariableService class
dmeidlin Jan 23, 2024
8a8dfed
add orElse for optionals
dmeidlin Jan 23, 2024
46d01f0
remove circular dependency
dmeidlin Jan 23, 2024
003481b
[BI-1921] update tests
dmeidlin Jan 23, 2024
f882017
Merge pull request #308 from Breeding-Insight/feature/BI-1921
dmeidlin Jan 24, 2024
9753a8b
[autocommit] bumping build number
rob-ouser-bi Jan 24, 2024
fbaef30
Merge pull request #327 from Breeding-Insight/bug/BI-1265
dmeidlin Jan 24, 2024
984e75d
[autocommit] bumping build number
rob-ouser-bi Jan 24, 2024
025ab04
[BI-2043] - moved expensive call outside nested loops
mlm483 Feb 1, 2024
d15e597
Merge pull request #329 from Breeding-Insight/bug/BI-2043
mlm483 Feb 12, 2024
0edb9e3
[autocommit] bumping build number
rob-ouser-bi Feb 12, 2024
315c3cd
[BI-2053] - fixed scale units bug
mlm483 Feb 13, 2024
03a42f7
[BI-2053] - added error message for non-numeric scale with units
mlm483 Feb 14, 2024
1651611
[BI-2045] added error for 'Experiment Title already exist'
davedrp Feb 15, 2024
72130a9
[BI-2053] - fixed tests
mlm483 Feb 15, 2024
a4a8091
[BI-2053] - added test
mlm483 Feb 16, 2024
ec74194
[BI-2045] improved variable name
davedrp Feb 19, 2024
71a7cf6
[BI-2026] If studyYear is null, change it to a blank, to avoid a null…
davedrp Feb 19, 2024
52a5655
[BI-2045] WIP (improve unit testing)
davedrp Feb 22, 2024
d7e3dcd
[BI-2045] Check for existing Env when validating for 'Experiment Titl…
davedrp Mar 4, 2024
1a2ff09
[BI-2045] fixed test
davedrp Mar 4, 2024
1102222
[BI-2045] fixed test name
davedrp Mar 4, 2024
1ae021c
[BI-2046] address PR comments
davedrp Mar 4, 2024
1c88caa
Merge pull request #333 from Breeding-Insight/bug/BI-2045
davedrp Mar 5, 2024
ab579d6
[autocommit] bumping build number
rob-ouser-bi Mar 5, 2024
014b9e2
Merge pull request #331 from Breeding-Insight/bug/BI-2053
mlm483 Mar 5, 2024
f955c28
[autocommit] bumping build number
rob-ouser-bi Mar 5, 2024
fc9c1c6
[BI-2026] protect against year = null
davedrp Mar 8, 2024
17861f1
Merge pull request #334 from Breeding-Insight/bug/BI-2064
davedrp Mar 12, 2024
34c257d
[autocommit] bumping build number
rob-ouser-bi Mar 12, 2024
79552a0
[autocommit] bumping build number
rob-ouser-bi Mar 19, 2024
5bda44a
[BI-2046] add validator for exp import on obsUnitID for existing studies
dmeidlin Feb 13, 2024
ba78917
[BI-2046] update ref to obsolete brapi-client field
dmeidlin Feb 14, 2024
ef4fea6
[BI-2046] fix typos and obsolete refs
dmeidlin Feb 15, 2024
b783632
[BI-2046] set pendingObsUnitByOUId
dmeidlin Feb 26, 2024
9917eb5
[BI-2046] refactor initializing OUs
dmeidlin Feb 27, 2024
9db276a
[BI-2046] get trial pio from reference obs unit
dmeidlin Feb 28, 2024
fd40f55
[BI-2046] update fetchOrCreate methods
dmeidlin Feb 29, 2024
87cc4bd
[BI-2046] initialize brapi maps when OUIds supplied
dmeidlin Mar 4, 2024
8d3c29a
[BI-2046] map trials and studies to OU Id
dmeidlin Mar 4, 2024
6cb0251
[BI-2046] map locations by OU id
dmeidlin Mar 4, 2024
7b3eb16
[BI-2046] initialize dataset maps for existing observation units
dmeidlin Mar 5, 2024
346b629
[BI-2046] refactor initialization of dataset map
dmeidlin Mar 5, 2024
18ff6e2
[BI-2046] map obsVarDataset by OU id
dmeidlin Mar 5, 2024
aa397ce
[BI-2046] fix NPEs
dmeidlin Mar 5, 2024
9c33f31
[BI-2046] map germplasm by observation unit id
dmeidlin Mar 5, 2024
e9ef80d
[BI-2046] refaactor
dmeidlin Mar 5, 2024
74eeeb5
[BI-2046] prepare for validation using reference OU ids
dmeidlin Mar 6, 2024
eaeb423
[BI-2046] validate observations for reference observation units
dmeidlin Mar 7, 2024
bd480f2
[BI-2046] add test for updating observations referenced by OU id
dmeidlin Mar 7, 2024
9704765
[BI-2046] fix studyPIO reference when creating new observation PIO
dmeidlin Mar 11, 2024
885ef53
[BI-2046] correct observation hash when OU id referenced
dmeidlin Mar 15, 2024
a39c505
[BI-2046] set preview state for existing empty datasets
dmeidlin Mar 27, 2024
3e04828
fix test
dmeidlin Mar 27, 2024
17b08e3
[BI-2046] remove unused helper method
dmeidlin Mar 28, 2024
55a0f78
[BI-2046] refactor
dmeidlin Mar 28, 2024
cc68f28
[BI-2046] document exp processhelper method
dmeidlin Mar 28, 2024
068f046
[BI-2046] document exp process helper method
dmeidlin Mar 28, 2024
e39a02d
[BI-2046] document exp process helper method
dmeidlin Mar 28, 2024
a42b98f
[BI-2046] document exp process helper method
dmeidlin Mar 28, 2024
b3f819c
[BI-2046] document exp process helper method
dmeidlin Mar 28, 2024
2e6161f
[BI-2046] delete unused helper method
dmeidlin Mar 28, 2024
a3f16c2
[BI-2046] document exp process helper method
dmeidlin Mar 28, 2024
aab081e
[BI-2046] delete unused helper method
dmeidlin Mar 28, 2024
b3396c8
[BI-2046] delete unused helper method
dmeidlin Mar 28, 2024
ac8072b
[BI-2046] document exp process helper method
dmeidlin Mar 28, 2024
4a32877
[BI-2046] document exp process helper method
dmeidlin Mar 28, 2024
b98da08
[BI-2046] clean up
dmeidlin Mar 28, 2024
be76c12
[BI-2046] Update expected error message in test
dmeidlin Apr 1, 2024
7ea6dc4
[BI-2046] remove redundant part of error message
dmeidlin Apr 3, 2024
8bc7bc5
[BI-2046] add comment
dmeidlin Apr 3, 2024
0db3d2f
Merge pull request #332 from Breeding-Insight/bug/BI-2046
dmeidlin Apr 5, 2024
bec8d86
[autocommit] bumping build number
rob-ouser-bi Apr 5, 2024
b262e94
[BI-2017] changed 'Name' to 'Germplasm Name' in import file
davedrp Apr 10, 2024
2024837
Merge pull request #345 from Breeding-Insight/feature/BI-2017-2
davedrp Apr 10, 2024
57f649e
[autocommit] bumping build number
rob-ouser-bi Apr 10, 2024
482c8a6
[BI-1680] - added migration to remove method
mlm483 Apr 10, 2024
253cc00
Merge pull request #346 from Breeding-Insight/feature/BI-1680-v0.9
mlm483 Apr 10, 2024
4f4173e
[autocommit] bumping build number
rob-ouser-bi Apr 10, 2024
77e813a
Merge branch 'main' into release/0.9
mlm483 Apr 10, 2024
9350f39
[autocommit] bumping build number
rob-ouser-bi Apr 10, 2024
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
5 changes: 4 additions & 1 deletion .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,7 @@ AWS_REGION=<aws region>
AWS_ACCESS_KEY_ID=<access key>
AWS_SECRET_KEY=<secret>
AWS_GENO_BUCKET=<s3 bucket for genotypic data uploads>
AWS_S3_ENDPOINT=<s3 endpoint, default https://s3.us-east-1.amazonaws.com>
AWS_S3_ENDPOINT=<s3 endpoint, default https://s3.us-east-1.amazonaws.com>

BRAPI_VENDOR_SUBMISSION_ENABLED=false #can a submission be sent to a vendor via BrAPI
BRAPI_VENDOR_CHECK_FREQUENCY=1d #how often to check for vendor updates for sample submissions
9 changes: 5 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ services:
backend:
aliases:
- dbserver
shm_size: 2g
brapi-server:
image: breedinginsight/brapi-java-server:develop
container_name: brapi-server
Expand All @@ -100,7 +101,7 @@ services:
- ${BRAPI_SERVER_PORT}:8080
volumes:
- ./src/main/resources/brapi/properties/application.properties:/home/brapi/properties/application.properties
- ./src/main/resources/brapi/sql/:/home/brapi/sql/
- ./src/main/resources/brapi/sql:/home/brapi/db/sql
networks:
backend:
aliases:
Expand Down Expand Up @@ -144,7 +145,7 @@ services:
source: gigwa_data
target: /usr/local/tomcat/config
mongo:
image: mongo:4.2.21
image: mongo:4.2.24
container_name: ${GIGWA_CONTAINER_NAME:-gigwa}_db
restart: always
command: --profile 0 --slowms 60000 --storageEngine wiredTiger --wiredTigerCollectionBlockCompressor=zstd --directoryperdb --quiet
Expand All @@ -163,7 +164,7 @@ services:
- gigwa_db
localstack:
container_name: "localstack"
image: localstack/localstack
image: localstack/localstack:3.0.2
restart: always
ports:
- "4566:4566"
Expand All @@ -172,7 +173,7 @@ services:
aliases:
- localstack
environment:
- HOSTNAME_EXTERNAL=localstack
- LOCALSTACK_HOST=localstack

networks:
backend:
Expand Down
1 change: 1 addition & 0 deletions localstack/startup_info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"timestamp": "2022-11-17T17:01:36.401503", "localstack_version": "1.2.0", "localstack_ext_version": "1.2.0", "pro_activated": false}]
15 changes: 13 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Breeding Insight API</name>
<name>DeltaBreed API</name>
<description></description>
<url>https://breedinginsight.org</url>

Expand Down Expand Up @@ -57,6 +57,10 @@
<name>David Phillips</name>
<email>[email protected]</email>
</developer>
<developer>
<name>Matthew Mandych</name>
<email>[email protected]</email>
</developer>
</developers>

<properties>
Expand All @@ -72,7 +76,7 @@
<jvm.options>-Xmx1024m -XX:MaxPermSize=256m --enable-preview</jvm.options>

<jooq.version>3.16.3</jooq.version>
<postgres.version>42.3.2</postgres.version>
<postgres.version>42.3.8</postgres.version>
<logback.version>1.2.10</logback.version>
<lombok.version>1.18.22</lombok.version>
<gson.version>2.8.9</gson.version>
Expand Down Expand Up @@ -149,6 +153,13 @@
<enabled>false</enabled>
</releases>
</repository>
<repository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
</repository>
</repositories>

<dependencyManagement>
Expand Down
12 changes: 0 additions & 12 deletions settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,6 @@
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
<repository>
<id>github-brapi</id>
<name>GitHub Breeding Insight Apache Maven Packages</name>
<url>https://maven.pkg.github.com/Breeding-Insight/brapi</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
<repository>
<id>github-fannypack</id>
<name>FannyPack github repository</name>
Expand All @@ -73,11 +66,6 @@
<username>${GITHUB_ACTOR}</username>
<password>${GITHUB_TOKEN}</password>
</server>
<server>
<id>github-brapi</id>
<username>${GITHUB_ACTOR}</username>
<password>${GITHUB_TOKEN}</password>
</server>
<server>
<id>github-fannypack</id>
<username>${GITHUB_ACTOR}</username>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import io.micronaut.security.annotation.Secured;
import io.micronaut.security.rules.SecurityRule;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.brapi.client.v2.model.exceptions.ApiException;
import org.breedinginsight.api.auth.*;
import org.breedinginsight.api.model.v1.response.DataResponse;
Expand All @@ -17,18 +16,14 @@
import org.breedinginsight.api.model.v1.response.metadata.Status;
import org.breedinginsight.api.model.v1.response.metadata.StatusCode;
import org.breedinginsight.api.v1.controller.metadata.AddMetadata;
import org.breedinginsight.dao.db.tables.pojos.BreedingMethodEntity;
import org.breedinginsight.dao.db.tables.pojos.ProgramBreedingMethodEntity;
import org.breedinginsight.daos.BreedingMethodDAO;
import org.breedinginsight.services.BreedingMethodService;
import org.breedinginsight.services.exceptions.BadRequestException;

import javax.inject.Inject;
import javax.validation.Valid;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import java.util.stream.Collectors;

@Slf4j
@Controller("/${micronaut.bi.api.version}")
Expand Down Expand Up @@ -64,7 +59,7 @@ public HttpResponse<Response<DataResponse<ProgramBreedingMethodEntity>>> getSyst
@Post("programs/{programId}/breeding-methods")
@Produces(MediaType.APPLICATION_JSON)
@ProgramSecured(roles = {ProgramSecuredRole.BREEDER})
public HttpResponse<Response<ProgramBreedingMethodEntity>> createProgramBreedingMethod(@PathVariable UUID programId, @Body ProgramBreedingMethodEntity breedingMethod) throws BadRequestException, ApiException {
public HttpResponse<?> createProgramBreedingMethod(@PathVariable UUID programId, @Body ProgramBreedingMethodEntity breedingMethod) throws ApiException{
log.debug("Saving new program breeding method");

try {
Expand All @@ -79,6 +74,8 @@ public HttpResponse<Response<ProgramBreedingMethodEntity>> createProgramBreeding
response.metadata = metadata;

return HttpResponse.ok(response);
} catch (BadRequestException ex) {
return HttpResponse.badRequest(ex.getMessage());
} catch (Exception e) {
log.error("Error creating program breeding method", e);
throw e;
Expand Down Expand Up @@ -110,7 +107,7 @@ public HttpResponse<Response<DataResponse<ProgramBreedingMethodEntity>>> getProg
@Put("programs/{programId}/breeding-methods/{breedingMethodId}")
@Produces(MediaType.APPLICATION_JSON)
@ProgramSecured(roles = {ProgramSecuredRole.BREEDER})
public HttpResponse<Response<ProgramBreedingMethodEntity>> updateProgramBreedingMethod(@PathVariable UUID programId, @PathVariable UUID breedingMethodId, @Body ProgramBreedingMethodEntity breedingMethod) throws BadRequestException, ApiException {
public HttpResponse<?> updateProgramBreedingMethod(@PathVariable UUID programId, @PathVariable UUID breedingMethodId, @Body ProgramBreedingMethodEntity breedingMethod) throws ApiException {
log.debug("Saving new program breeding method");

try {
Expand All @@ -128,6 +125,8 @@ public HttpResponse<Response<ProgramBreedingMethodEntity>> updateProgramBreeding
response.metadata = metadata;

return HttpResponse.ok(response);
} catch (BadRequestException ex) {
return HttpResponse.badRequest(ex.getMessage());
} catch (Exception e) {
log.error("Error updating program breeding method", e);
throw e;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.breedinginsight.brapi.v2;
package org.breedinginsight.api.v1.controller;

import io.micronaut.http.HttpHeaders;
import io.micronaut.http.HttpResponse;
Expand All @@ -9,28 +9,22 @@
import io.micronaut.security.annotation.Secured;
import io.micronaut.security.rules.SecurityRule;
import lombok.extern.slf4j.Slf4j;
import org.brapi.client.v2.model.exceptions.ApiException;
import org.brapi.v2.model.core.BrAPITrial;
import org.breedinginsight.api.auth.ProgramSecured;
import org.breedinginsight.api.auth.ProgramSecuredRoleGroup;
import org.breedinginsight.api.model.v1.request.query.SearchRequest;
import org.breedinginsight.api.model.v1.response.DataResponse;
import org.breedinginsight.api.model.v1.response.Response;
import org.breedinginsight.api.model.v1.validators.QueryValid;
import org.breedinginsight.brapi.v1.controller.BrapiVersion;
import org.breedinginsight.brapi.v2.model.request.query.ExperimentExportQuery;
import org.breedinginsight.brapi.v2.model.request.query.ExperimentQuery;
import org.breedinginsight.brapi.v2.services.BrAPITrialService;
import org.breedinginsight.model.Dataset;
import org.breedinginsight.model.DownloadFile;
import org.breedinginsight.model.Program;
import org.breedinginsight.services.ProgramService;
import org.breedinginsight.services.exceptions.DoesNotExistException;
import org.breedinginsight.utilities.response.ResponseUtils;
import org.breedinginsight.utilities.response.mappers.ExperimentQueryMapper;

import javax.inject.Inject;
import javax.validation.Valid;
import java.util.*;
import java.util.Optional;
import java.util.UUID;

@Slf4j
@Controller
Expand All @@ -47,48 +41,6 @@ public ExperimentController(BrAPITrialService experimentService, ExperimentQuery
this.programService = programService;
}

@Get("/${micronaut.bi.api.version}/programs/{programId}" + BrapiVersion.BRAPI_V2 + "/trials{?queryParams*}")
@Produces(MediaType.APPLICATION_JSON)
@ProgramSecured(roleGroups = {ProgramSecuredRoleGroup.ALL})
public HttpResponse<Response<DataResponse<List<BrAPITrial>>>> getExperiments(
@PathVariable("programId") UUID programId,
@QueryValue @QueryValid(using = ExperimentQueryMapper.class) @Valid ExperimentQuery queryParams) {
try {
log.debug("fetching trials for program: " + programId);

List<BrAPITrial> experiments = experimentService.getExperiments(programId);
SearchRequest searchRequest = queryParams.constructSearchRequest();
return ResponseUtils.getBrapiQueryResponse(experiments, experimentQueryMapper, queryParams, searchRequest);
} catch (ApiException e) {
log.info(e.getMessage(), e);
return HttpResponse.status(HttpStatus.INTERNAL_SERVER_ERROR, "Error retrieving experiments");
} catch (DoesNotExistException e) {
log.info(e.getMessage(), e);
return HttpResponse.status(HttpStatus.NOT_FOUND, e.getMessage());
}
}

@Get("/${micronaut.bi.api.version}/programs/{programId}" + BrapiVersion.BRAPI_V2 + "/trials/{trialId}")
@Produces(MediaType.APPLICATION_JSON)
@ProgramSecured(roleGroups = {ProgramSecuredRoleGroup.ALL})
public HttpResponse<Response<BrAPITrial>> getExperimentById(
@PathVariable("programId") UUID programId,
@PathVariable("trialId") UUID trialId,
@QueryValue(defaultValue = "false") Boolean stats){
try {
String logMsg = "fetching trial id:" + trialId +" for program: " + programId;
if(stats){
logMsg += " with stats";
}
log.debug(logMsg);
Response<BrAPITrial> response = new Response<>(experimentService.getTrialDataByUUID(programId, trialId, stats));
return HttpResponse.ok(response);
} catch (DoesNotExistException e) {
log.info(e.getMessage(), e);
return HttpResponse.status(HttpStatus.NOT_FOUND, e.getMessage());
}
}

@Get("/${micronaut.bi.api.version}/programs/{programId}/experiments/{experimentId}/export{?queryParams*}")
@ProgramSecured(roleGroups = {ProgramSecuredRoleGroup.ALL})
@Produces(value={"text/csv", "application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/octet-stream"})
Expand All @@ -97,19 +49,21 @@ public HttpResponse<StreamedFile> datasetExport(
@QueryValue @Valid ExperimentExportQuery queryParams) {
String downloadErrorMessage = "An error occurred while generating the download file. Contact the development team at [email protected].";
try {
Program program = programService.getById(programId).orElseThrow(() -> new DoesNotExistException("Program does not exist"));
Optional<Program> program = programService.getById(programId);
if(program.isEmpty()) {
return HttpResponse.notFound();
}

// if a list of environmentIds are sent, return multiple files (zipped),
// else if a single environmentId is sent, return single file (CSV/Excel),
// else (if no environmentIds are sent), return a single file (CSV/Excel) including all Environments.
DownloadFile downloadFile = experimentService.exportObservations(program, experimentId, queryParams);
DownloadFile downloadFile = experimentService.exportObservations(program.get(), experimentId, queryParams);

HttpResponse<StreamedFile> response = HttpResponse
return HttpResponse
.ok(downloadFile.getStreamedFile())
.header(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=" + downloadFile.getFileName());
return response;
} catch (Exception e) {
log.info(e.getMessage(), e);
log.info(downloadErrorMessage, e);
HttpResponse response = HttpResponse.status(HttpStatus.INTERNAL_SERVER_ERROR, downloadErrorMessage).contentType(MediaType.TEXT_PLAIN).body(downloadErrorMessage);
return response;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import io.micronaut.http.HttpStatus;
import io.micronaut.http.MediaType;
import io.micronaut.http.annotation.*;
import io.micronaut.security.annotation.Secured;
import io.micronaut.security.rules.SecurityRule;
import lombok.extern.slf4j.Slf4j;
import org.breedinginsight.api.auth.ProgramSecured;
import org.breedinginsight.api.auth.ProgramSecuredRole;
Expand Down Expand Up @@ -81,7 +83,7 @@ public HttpResponse<Response<DataResponse<SharedOntology>>> getAvailablePrograms
}

/**
* Accepts a list of programs to shared the ontology with.
* Accepts a list of programs to share the ontology with.
* @param programId
* @return List of programs successfully shared to with acceptable status
* {
Expand Down Expand Up @@ -210,7 +212,7 @@ public HttpResponse unsubscribeOntology(
@Get("/programs/{programId}/ontology/subscribe")
@Produces(MediaType.APPLICATION_JSON)
@AddMetadata
@ProgramSecured(roles = {ProgramSecuredRole.BREEDER})
@Secured(SecurityRule.IS_AUTHENTICATED)
public HttpResponse<Response<DataResponse<SubscribedOntology>>> getSubscribedOntology(
@PathVariable UUID programId) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public TokenController(SecurityService securityService, TokenService tokenServic

@Get("/api-token{?returnUrl}")
@Secured(SecurityRule.IS_AUTHENTICATED)
public HttpResponse apiToken(@QueryValue @Nullable String returnUrl) {
public HttpResponse<?> apiToken(@QueryValue @Nullable String returnUrl) {

AuthenticatedUser actingUser = securityService.getUser();
Optional<ApiToken> token = tokenService.generateApiToken(actingUser);
Expand All @@ -61,12 +61,12 @@ public HttpResponse apiToken(@QueryValue @Nullable String returnUrl) {
ApiToken apiToken = token.get();

if(returnUrl != null) {
if(StringUtils.trim(returnUrl).isEmpty()) {
if(StringUtils.trim(returnUrl).isEmpty() || "undefined".equalsIgnoreCase(returnUrl)) {
return HttpResponse.badRequest("returnUrl cannot be blank");
}
URI location = UriBuilder.of(returnUrl)
.queryParam("status", 200)
.queryParam("token", apiToken.getAccessToken())
.queryParam("access_token", apiToken.getAccessToken())
.build();

return HttpResponse.seeOther(location)
Expand Down
Loading
Loading