Skip to content

Commit

Permalink
Merge branch 'dev/7.4.x' into dev/7.5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
apeters committed Jul 27, 2023
2 parents 82bac3b + 8661345 commit afe0941
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 18 deletions.
7 changes: 5 additions & 2 deletions arches/app/datatypes/url.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,12 @@ def transform_value_for_tile(self, value, **kwargs):
try:
return ast.literal_eval(value)
except:
# this will probably fail validation, but that is ok. We need the error to report the value.
return value
if isinstance(value, dict):
return value
else:
return {"url": value, "url_label": ""}
except BaseException:
# this will probably fail validation, but that is ok. We need the error to report the value.
if isinstance(value, dict):
return value
else:
Expand Down
15 changes: 2 additions & 13 deletions arches/app/etl_modules/base_data_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,26 +172,15 @@ def get_preview_data(self, graph_id, node_id, resourceids, language_code, old_te
+ text_query
)

tile_sub_query = (
resource_count_query = (
"""
AND resourceinstanceid IN (SELECT DISTINCT t.resourceinstanceid FROM tiles t, nodes n
SELECT count(DISTINCT t.resourceinstanceid) FROM tiles t, nodes n
WHERE t.nodegroupid = n.nodegroupid
"""
+ node_id_query
+ graph_id_query
+ resourceids_query
+ text_query
+ ")"
)

resource_count_query = (
"""
SELECT count(n.resourceinstanceid) FROM resource_instances n
WHERE 0 = 0
"""
+ graph_id_query
+ resourceids_query
+ tile_sub_query
)

with connection.cursor() as cursor:
Expand Down
5 changes: 3 additions & 2 deletions arches/app/utils/data_management/resources/formats/csvfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -622,9 +622,10 @@ def process_resourceid(resourceid, overwrite):
for concept_value in concept:
concepts_to_create[node["arches_nodeid"]][str(uuid.uuid4())] = concept_value
# if collection in concepts to create then add child concept to collection
elif row[node["file_field_name"]] not in list(concepts_to_create[node["arches_nodeid"]].values()):
else:
for concept_value in concept:
concepts_to_create[node["arches_nodeid"]][str(uuid.uuid4())] = concept_value
if concept_value not in list(concepts_to_create[node["arches_nodeid"]].values()):
concepts_to_create[node["arches_nodeid"]][str(uuid.uuid4())] = concept_value

if len(non_contiguous_resource_ids) > 0:
print("*" * 80)
Expand Down
5 changes: 4 additions & 1 deletion arches/install/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Django==3.2.20
psycopg2==2.9.6
urllib3<2
elasticsearch>=8.3.1,<9.0.0
rdflib==4.2.2
django-guardian==2.3.0
Expand Down Expand Up @@ -33,4 +34,6 @@ defusedxml==0.7.1
requests-oauthlib==1.3.1
pyjwt>=2.0.0,<3
pyjwt[crypto]
semantic-version==2.10.0
semantic-version==2.10.0
tzdata==2023.3
pytz==2023.3
61 changes: 61 additions & 0 deletions releases/6.2.4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
Arches 6.2.4 release notes
------------------------
### Bug Fixes and Enhancements

- Updated Django to latest patch release #9731
- Updated several JS dependencies to latest patch releases, #9782, #9814, #9527
- Ensure tiles are properly filtered by user in resource JSON, #9780
- Fix display of IIIF widget in reports, #8419


### Dependency changes:
```
Javascript:
Upgraded:
@mapbox/geojson-extent: 0.3.2 > ~1.0.1
jquery: 3.6.1 > ^3.6.1
jquery-migrate: 3.4.0 > ~3.4.1,
moment-timezone: 0.5.34 > ~0.5.43
requirejs-text: 2.0.12 > ~2.0.16
underscore: 1.13.4 > ~1.13.6
eonasdan-bootstrap-datetimepicker: 4.17.44 > ~4.17.49
Python:
Upgraded:
Django 3.2.18 > 3.2.20
```


### Upgrading Arches
1. You must be upgraded to at least version 6.2.0 before proceeding.

2. Upgrade to Arches 6.2.4

If using a virtual environment, be sure to activate it:

pip install --upgrade arches==6.2.4

3. Update your Javascript dependencies

Navigate to the directory with your project's package.json file. This is located in the same directory as your project's settings.py file.
Ensure your arches dependency points to either `#archesproject/arches#dev/6.2.x` or `#archesproject/arches#stable/6.2.4`.\
For example:

"dependencies": {
"arches": "archesproject/arches#dev/6.2.x"
}

Then run:
yarn install

4. If you are running Arches on Apache, be sure to run:

```
python manage.py collectstatic
```
and restart your server.
```
sudo service apache2 reload
```
5. Finally, If you are running Celery, you should also restart your Celery worker(s). The process for doing this depends on how Celery is being run.

0 comments on commit afe0941

Please sign in to comment.