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

Add Specify 6.8.03 Static Files to Specify 7 #5266

Merged
merged 42 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
075f0dd
add Specify6.8.03 config file to Specify7
acwhite211 Sep 10, 2024
364d82f
change THICK_CLIENT_LOCATION in settings
acwhite211 Sep 10, 2024
249894d
filter out unused files in Specify 7
acwhite211 Sep 16, 2024
b85a3b8
config nginx.conf and docker-compose.yml for new config location
acwhite211 Sep 16, 2024
db71e30
more config files to filter out
acwhite211 Sep 18, 2024
8f4fca3
init common geo forms
acwhite211 Sep 18, 2024
c456c29
Remove invalid compose project `specify6`
grantfitzsimmons Sep 19, 2024
43a518d
Remove JRXML files
grantfitzsimmons Sep 19, 2024
9b73b01
Merge branch 'issue-4828' of https://github.com/specify/specify7 into…
grantfitzsimmons Sep 19, 2024
217f6de
add specify 6.8.03 jar to config
acwhite211 Sep 24, 2024
2bb01e3
use bind mount instead of named volume for config
acwhite211 Sep 24, 2024
62d01d1
DEFAULT_SPECIFY_JAR_PATH
acwhite211 Sep 24, 2024
5f8b600
remove unused accessions files
acwhite211 Sep 25, 2024
799430e
add back specify_datamodel.xml
acwhite211 Sep 25, 2024
c6fed09
remove specify jar dependency
acwhite211 Sep 27, 2024
4784aa9
add all specify.jar items into directory
acwhite211 Sep 27, 2024
0accbad
Revert "add all specify.jar items into directory"
acwhite211 Sep 27, 2024
36b3cca
Revert "remove specify jar dependency"
acwhite211 Sep 27, 2024
f5c472f
let GitHub search for specify.jar 🤷
acwhite211 Sep 27, 2024
bf27c6e
wat
acwhite211 Sep 27, 2024
96d10ce
create geology.views.xml
acwhite211 Sep 27, 2024
73ba508
Update geology.views.xml
grantfitzsimmons Sep 28, 2024
afe9684
Update geology.views.xml
grantfitzsimmons Sep 28, 2024
8534551
Update geology.views.xml
grantfitzsimmons Sep 28, 2024
d64f31b
Add COGs to Common Views, migrate Geology views
grantfitzsimmons Oct 2, 2024
66b24d6
Add Geology viewset registry
melton-jason Oct 4, 2024
6bda868
Merge branch 'production' into issue-4828
grantfitzsimmons Oct 4, 2024
489d70f
Add geology discipline to Specify 7 list of disciplines
melton-jason Oct 4, 2024
acfe52e
Remove unused Specify 7 files
melton-jason Oct 6, 2024
ad9871f
Remove unused/deleted views and appresources from registries
melton-jason Oct 6, 2024
4188f95
Improve COJO form and add COG subform
grantfitzsimmons Oct 16, 2024
3f23633
Update docker-compose.yml
acwhite211 Oct 22, 2024
d310c01
Revert default THICK_CLIENT_LOCATION
acwhite211 Oct 22, 2024
d40cde9
Add Absolute Age & Relative Age forms
grantfitzsimmons Oct 22, 2024
4b0ca10
edit DEFAULT_SPECIFY_JAR_PATH
acwhite211 Oct 23, 2024
37a6a94
COPY config location in Dockerfile
acwhite211 Oct 23, 2024
b3b63f0
new find_jar
acwhite211 Oct 23, 2024
6610588
config symlink
acwhite211 Oct 23, 2024
0cd53f3
dockerfile bug fix
acwhite211 Oct 23, 2024
40de4b4
copy specify-config into static-files volume
acwhite211 Oct 24, 2024
f2349cb
remove unused lines
acwhite211 Oct 24, 2024
71b3573
Merge branch 'production' into issue-4828
acwhite211 Oct 28, 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
538 changes: 538 additions & 0 deletions config/accessions/accessions.views.xml
Copy link
Contributor

@melton-jason melton-jason Oct 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file shouldn't be needed (included in the accessions disciplines. See #5266 (comment))

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions config/accessions/app_resources.xml
Copy link
Contributor

@melton-jason melton-jason Oct 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually don't think Specify 7 accesses any file in the accessions directory.
It looks like it is supposed to be a type of discipline, but even if a discipline has the accessions type, it's not defined in the DISCIPLINE_DIRS:

DISCIPLINE_DIRS = {
"fish": "fish",
"herpetology": "herpetology",
"paleobotany": "invertpaleo",
"invertpaleo": "invertpaleo",
"vertpaleo": "vertpaleo",
"bird": "bird",
"mammal": "mammal",
"insect": "insect",
"botany": "botany",
"invertebrate": "invertebrate",
"minerals": "minerals",
"anthropology": "anthropology",
# "vascplant": "vascplant",
# "fungi": "fungi",
}

So it will never be accessed when determining the file path:

def get_path_for_level(collection, user, level):
"""Build the filesystem path for a given resource level."""
discipline_dir = None if collection is None else \
DISCIPLINE_DIRS.get(collection.discipline.type, None)
usertype = get_usertype(user)
paths = {
'UserType' : (discipline_dir, usertype) if discipline_dir and usertype else None,
'Discipline': (discipline_dir,) if discipline_dir else None,
'Common' : ('common' ,),
'Backstop' : ('backstop' ,)}
path = paths.get(level, None)
if path:
return os.path.join(settings.SPECIFY_CONFIG_DIR, *path)

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<files>
<file level="0" mimetype="text/xml" name="SearchConfig" description="SearchConfig" file="search_config.xml"/>

<file level="3" mimetype="text/xml" name="StartUpPanel" description="StartUpPanel" file="startup_panel.xml"/>
<file level="3" mimetype="text/xml" name="StatisticsPanel" description="StatisticsPanel" file="statistics_panel.xml"/>
<file level="3" mimetype="text/xml" name="StatsSummaryPanel" description="StatsSummaryPanel" file="stats_summary_panel.xml"/>
<file level="3" mimetype="text/xml" name="DataEntryTaskInit" description="DataEntryTaskInit" file="dataentry_task.xml"/>

<!-- Labels and Reports -->
<file level="3" mimetype="jrxml/label" name="accession_report.jrxml" description="Accession Report" file="accession_report.jrxml" metadata="tableid=7;reqrs=true;"/>
<file level="3" mimetype="jrxml/label" name="accessions_inprocess.jrxml" description="In-Progress Report" file="accessions_inprocess.jrxml" metadata="tableid=7;reqrs=false;"/>
<file level="3" mimetype="jrxml/label" name="permit_report.jrxml" description="Permit Report" file="permit_report.jrxml" metadata="tableid=6;reqrs=true;"/>
</files>
6 changes: 6 additions & 0 deletions config/accessions/dataentry_task.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<views>
<view name="Accession" title="Accession" viewset="Accession Views" view="Accession" iconname="Accession" tooltip="Create a New Accession"/>
<view name="Agent" title="Agent" viewset="Accession Views" view="Agent" iconname="Agent" tooltip="Create a New Agent"/>
<view name="Permit" title="Permit" viewset="Accession Views" view="Permit" iconname="Permit" tooltip="Create a New Permit"/>
</views>
4 changes: 4 additions & 0 deletions config/accessions/viewset_registry.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<files>
<file type="user" name="Accession Views" title="Accessions" file="accessions.views.xml"/>
</files>
11 changes: 11 additions & 0 deletions config/backstop/app_resources.xml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while this file is used at the moment, could we refactor back-end to not use app_resources.xml files?

e.g aren't all UIFormatters XML files of the same name, thus removing the need for this file?

it seems that this file is used at present to tell specify what files are defined in a given folder - wouldn't it be better to simply check if the file is present on the file system?

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<files>
<file level="0" mimetype="text/xml" name="UIFormatters" description="UIFormatters" file="uiformatters.xml"/>
<file level="0" mimetype="text/xml" name="DialogDefs" description="DialogDefs" file="dialog_defs.xml"/>
<file level="0" mimetype="text/xml" name="DataObjFormatters" description="DataObjFormatters" file="dataobj_formatters.xml"/>
<file level="0" mimetype="text/xml" name="SearchConfig" description="SearchConfig" file="search_config.xml"/>
<file level="0" mimetype="text/xml" name="Statistics" description="Statistics" file="statistics.xml"/>
<file level="0" mimetype="text/xml" name="PrefsPanelDef" description="PrefsPanelDef" file="prefs_panel_def.xml"/>
<file level="0" mimetype="text/xml" name="TypeSearches" description="TypeSearches" file="typesearch_def.xml"/>
<file level="0" mimetype="text/xml" name="CollStats" description="CollStats" file="collstats.xml"/>
</files>
65 changes: 65 additions & 0 deletions config/backstop/collstats.xml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file shouldn't be needed: Specify 7 has its own implementation for statistics.
Although, people can still access this file using /context/app.resource?name=CollStats, so keep it if you want 🤷
(In my opinion though, it should still be removed: the application should never have a use for the file).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just in case they need a hint on how to run some oddly defined SQL queries 😂

Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<statistics>
<tables>
<table class="edu.ku.brc.specify.datamodel.CollectionObject"/>
<table class="edu.ku.brc.specify.datamodel.CollectingEvent"/>
<table class="edu.ku.brc.specify.datamodel.Determination"/>
<table class="edu.ku.brc.specify.datamodel.DNASequence"/>
<table class="edu.ku.brc.specify.datamodel.Geography"/>
<table class="edu.ku.brc.specify.datamodel.GeologicTimePeriod"/>
<table class="edu.ku.brc.specify.datamodel.Locality"/>
<table class="edu.ku.brc.specify.datamodel.PaleoContext"/>
<table class="edu.ku.brc.specify.datamodel.Preparation"/>
<table class="edu.ku.brc.specify.datamodel.LithoStrat"/>
<table class="edu.ku.brc.specify.datamodel.Taxon"/>
</tables>
<stats>
<stat name="num_co" desc="Number of Collection Objects">
<![CDATA[SELECT count(*) FROM collectionobject WHERE CollectionMemberID = COLMEMID]]>
</stat>
<stat name="num_co_dna" desc="Number of DNA Sequences associated with CollectionObjects">
<![CDATA[SELECT count(*) FROM dnasequence d inner join collectionobject co on co.CollectionObjectID = d.CollectionObjectID WHERE d.CollectionMemberID = COLMEMID]]>
</stat>
<stat name="num_ms_dna" desc="Number of DNA Sequences associated with MaterialSamples">
<![CDATA[SELECT count(*) FROM dnasequence d inner join materialsample ms on ms.MaterialSampleID = d.MaterialSampleID WHERE d.CollectionMemberID = COLMEMID]]>
</stat>
<stat name="num_txu" desc="Number of Taxon Used">
<![CDATA[SELECT COUNT(DISTINCT d.TaxonID) FROM determination d INNER JOIN taxon t ON t.TaxonID = d.TaxonID WHERE d.CollectionMemberID = COLMEMID AND d.IsCurrent <> 0 AND t.IsAccepted <> 0]]>
</stat>
<stat name="num_tx" desc="Number of Taxon">
<![CDATA[SELECT count(*) FROM taxon WHERE TaxonTreeDefID = TAXTREEDEFID]]>
</stat>
<stat name="num_geo" desc="Number of Geography">
<![CDATA[SELECT count(*) FROM geography WHERE GeographyTreeDefID = GEOTREEDEFID]]>
</stat>
<stat name="num_geou" desc="Number of Geography Used">
<![CDATA[SELECT COUNT(DISTINCT g.GeographyID) FROM locality l INNER JOIN geography g ON g.GeographyID = l.GeographyID WHERE l.DisciplineID = DSPLNID AND g.IsAccepted <> 0]]>
</stat>
<stat name="num_loc" desc="Number of Localities">
<![CDATA[SELECT count(*) FROM locality WHERE DisciplineID = DSPLNID]]>
</stat>
<stat name="num_locgr" desc="Number of Georef'ed Localities">
<![CDATA[SELECT count(*) FROM locality WHERE DisciplineID = DSPLNID AND Latitude1 is not NULL AND Longitude1 is not NULL]]>
</stat>
<stat name="num_preps" desc="Number of Preparations">
<![CDATA[SELECT count(*) FROM preparation WHERE CollectionMemberID = COLMEMID]]>
</stat>
<stat name="num_prpcnt" desc="Total Number of Preparations Counts">
<![CDATA[SELECT SUM(CountAmt) FROM preparation WHERE CollectionMemberID = COLMEMID]]>
</stat>
<stat name="num_litho" desc="Number of Litho Stratigraphy">
<![CDATA[SELECT count(*) FROM lithostrat WHERE LithoStratTreeDefID = LITHOTREEDEFID]]>
</stat>
<!--
<stat name="num_lithou" desc="Number of Litho Stratigraphy Used">
<![CDATA[SELECT COUNT(DISTINCT l.LithoStratID) FROM paleocontext p INNER JOIN lithostrat l ON l.LithoStratID = p.LithoStratID WHERE p.CollectionMemberID = 4 AND l.IsAccepted <> 0]]>
</stat> -->
<stat name="num_gtp" desc="Number of Chronostratigraphy">
<![CDATA[SELECT count(*) FROM geologictimeperiod WHERE GeologicTimePeriodTreeDefID = GTPTREEDEFID]]>
</stat>
<!--
<stat name="num_gtpu" desc="Number of Chronostratigraphy Used">
<![CDATA[SELECT COUNT(DISTINCT g.GeologicTimePeriodID) FROM paleocontext p INNER JOIN geologictimeperiod g ON g.GeologicTimePeriodID = p.ChronosStratID WHERE p.CollectionMemberID = 4 AND g.IsAccepted <> 0]]>
</stat> -->
</stats>
</statistics>
Loading
Loading