Skip to content

Commit a0c0f01

Browse files
committed
release 4.4
1 parent 4686348 commit a0c0f01

File tree

7 files changed

+124
-26
lines changed

7 files changed

+124
-26
lines changed

RELEASING.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,26 @@
33

44
- Checkout the corresponding release of glottolog/glottolog.
55
- For major or minor releases: create the static archive including the last release:
6-
```shell script
6+
```shell
7+
cd ../archive
78
glottolog-app create_archive
89
tar -czf archive.tgz archive/
910
```
1011
- initialize the DB running (about 60 mins)
11-
```shell script
12+
```shell
13+
cd ../glottolog3
1214
clld initdb development.ini
1315
```
1416
and check language associations, see e.g. https://github.com/glottolog/glottolog/issues/485
1517
- mark new languages running
16-
```shell script
18+
```shell
1719
glottolog-app mark_new_languages
20+
pytest
1821
```
1922
- remove old downloads:`rm glottolog3/static/download/glottolog*`
2023
- run `clld create_downloads development.ini glottolog.org` - about 45 mins
2124
- run
22-
```shell script
25+
```shell
2326
glottolog-app newick
2427
glottolog-app geo development.ini
2528
glottolog-app sqldump development.ini
@@ -34,25 +37,24 @@
3437
cdstarcat, and the above command re-run.)
3538
- register sql dump download in `glottolog3/releases.ini` by adding a new section for the release or
3639
updating the md5 hash of the sql dump for a bugfix release with the data from downloads.json.
37-
- `clld-llod` ?
3840
- update `glottolog3.util.DOI` with the new ZENODO DOI
3941

4042
- draft release of clld/glottolog3
4143
- commit all changes to glottolog3
4244
- create release on GitHub
4345

4446
- Now deploy to server:
45-
```shell script
46-
workon appconfig
47-
cd appconfig/apps
48-
```
49-
**Note**: For new major or minor releases, we must adapt the `dbdump` option in `apps.ini[glottolog3]`
50-
to the new version.
51-
```shell script
52-
cd appconfig/apps/glottolog3
53-
fab copy_archive:../../../../glottolog/glottolog3/archive.tgz
54-
fab deploy:production
55-
fab fetch_downloads
56-
```
47+
```shell
48+
workon appconfig
49+
cd appconfig/apps
50+
```
51+
**Note**: For new major or minor releases, we must adapt the `dbdump` option in `apps.ini[glottolog3]`
52+
to the new version.
53+
```shell
54+
cd appconfig/apps/glottolog3
55+
fab copy_archive:../../../../glottolog/archive/archive.tgz
56+
fab deploy:production
57+
fab fetch_downloads
58+
```
5759

5860
- tweet

glottolog3/adapters.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,16 +107,16 @@ def dump_rendered(self, req, fp, item, index, rendered):
107107
class LanguoidTurtleDump(TurtleDump):
108108

109109
def query(self, req):
110-
return req.db.query(Language).options(sa.orm.joinedload_all(
111-
Language.languageidentifier, LanguageIdentifier.identifier))\
110+
return req.db.query(Language).options(sa.orm.joinedload(
111+
Language.languageidentifier).joinedload(LanguageIdentifier.identifier))\
112112
.order_by(Language.pk)
113113

114114

115115
class LanguoidN3Dump(N3Dump):
116116

117117
def query(self, req):
118-
return req.db.query(Language).options(sa.orm.joinedload_all(
119-
Language.languageidentifier, LanguageIdentifier.identifier))\
118+
return req.db.query(Language).options(sa.orm.joinedload(
119+
Language.languageidentifier).joinedload(LanguageIdentifier.identifier))\
120120
.order_by(Language.pk)
121121

122122

glottolog3/models.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,12 +400,13 @@ class Ref(CustomModelMixin, Source):
400400

401401
providers = relationship(
402402
Provider,
403+
viewonly=True,
403404
secondary=Refprovider.__table__,
404405
order_by='Provider.id',
405406
backref=backref(
406407
'refs', order_by='Source.author, Source.year, Source.description'))
407408

408-
bibkeys = relationship(Refprovider, order_by='Refprovider.provider_pk')
409+
bibkeys = relationship(Refprovider, order_by='Refprovider.provider_pk', viewonly=True)
409410

410411
def __rdf__(self, request):
411412
"""

glottolog3/releases.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,7 @@ version = 4.3
8686
cdstar_oid = EAEA0-D501-DBB8-65C4-0
8787
sql_dump_md5 = d7a2ac9bb53e381719cc138fb948d1c2
8888

89+
[v4.4]
90+
version = 4.4
91+
cdstar_oid = EAEA0-E62D-ED67-FD05-0
92+
sql_dump_md5 = 283fff45a1bf026159495c149d9f2f54

glottolog3/scripts/initializedb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929

3030
def gc2version():
31-
return pathlib.Path(glottolog3.__file__).parent.parent / 'archive' / 'glottocode2version.json'
31+
return pathlib.Path(glottolog3.__file__).parent.parent / '../archive' / 'archive' / 'glottocode2version.json'
3232

3333

3434
def get_glottolog_api(repos):

glottolog3/static/downloads.json

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,5 +1257,96 @@
12571257
"title": "glottolog 4.3 - downloads"
12581258
},
12591259
"oid": "EAEA0-D501-DBB8-65C4-0"
1260+
},
1261+
"4.4": {
1262+
"bitstreams": [
1263+
{
1264+
"bitstreamid": "glottolog.sql.gz",
1265+
"checksum": "283fff45a1bf026159495c149d9f2f54",
1266+
"checksum-algorithm": "MD5",
1267+
"content-type": "application/x-sql",
1268+
"created": 1621003923787,
1269+
"filesize": 141917115,
1270+
"last-modified": 1621006533686
1271+
},
1272+
{
1273+
"bitstreamid": "glottolog_language.n3.gz",
1274+
"checksum": "d917964495b1cac09417bbaa361e995f",
1275+
"checksum-algorithm": "MD5",
1276+
"content-type": "application/octet-stream",
1277+
"created": 1621012628774,
1278+
"filesize": 3149776,
1279+
"last-modified": 1621012682636
1280+
},
1281+
{
1282+
"bitstreamid": "glottolog_language.ttl.gz",
1283+
"checksum": "0bf56093bb0ed573c62b2255a711b1e5",
1284+
"checksum-algorithm": "MD5",
1285+
"content-type": "text/turtle",
1286+
"created": 1621012572735,
1287+
"filesize": 3150707,
1288+
"last-modified": 1621012628388
1289+
},
1290+
{
1291+
"bitstreamid": "glottolog_language.ttl.gz.jtrohb",
1292+
"checksum": "a2dcdf7a3f90e820909ac94fd6599b97",
1293+
"checksum-algorithm": "MD5",
1294+
"content-type": "application/octet-stream",
1295+
"created": 1621012700430,
1296+
"filesize": 43,
1297+
"last-modified": 1621012700433
1298+
},
1299+
{
1300+
"bitstreamid": "glottolog_languoid.csv.zip",
1301+
"checksum": "0d896f70136fb47eca57bf8000787ee4",
1302+
"checksum-algorithm": "MD5",
1303+
"content-type": "application/zip",
1304+
"created": 1621012562820,
1305+
"filesize": 560417,
1306+
"last-modified": 1621012572306
1307+
},
1308+
{
1309+
"bitstreamid": "glottolog_source.bib.zip",
1310+
"checksum": "ec83a2e301ab0a89d9480fb48525748a",
1311+
"checksum-algorithm": "MD5",
1312+
"content-type": "application/zip",
1313+
"created": 1621012700660,
1314+
"filesize": 54598400,
1315+
"last-modified": 1621013677584
1316+
},
1317+
{
1318+
"bitstreamid": "glottolog_source.n3.gz",
1319+
"checksum": "4f5564ccff5ea33c9500a2e5648cf6ea",
1320+
"checksum-algorithm": "MD5",
1321+
"content-type": "application/octet-stream",
1322+
"created": 1621010339826,
1323+
"filesize": 51998772,
1324+
"last-modified": 1621011229153
1325+
},
1326+
{
1327+
"bitstreamid": "languages_and_dialects_geo.csv",
1328+
"checksum": "d9c6f8bdcc1f73e445bf353f871f433d",
1329+
"checksum-algorithm": "MD5",
1330+
"content-type": "text/csv",
1331+
"created": 1621012683021,
1332+
"filesize": 1023941,
1333+
"last-modified": 1621012700316
1334+
},
1335+
{
1336+
"bitstreamid": "tree_glottolog_newick.txt",
1337+
"checksum": "13893448554bc73a036b9348123387ca",
1338+
"checksum-algorithm": "MD5",
1339+
"content-type": "text/plain",
1340+
"created": 1621003910955,
1341+
"filesize": 733349,
1342+
"last-modified": 1621003923338
1343+
}
1344+
],
1345+
"metadata": {
1346+
"creator": "pycdstar",
1347+
"description": "Custom downloads for release 4.4 of [Glottolog](http://glottolog.org)",
1348+
"title": "glottolog 4.4 - downloads"
1349+
},
1350+
"oid": "EAEA0-E62D-ED67-FD05-0"
12601351
}
12611352
}

glottolog3/util.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424
from glottolog3.maps import LanguoidMap
2525
from glottolog3.config import PartnerSite, ISOSite
2626

27-
DOI = "10.5281/zenodo.4061162"
27+
DOI = "10.5281/zenodo.4761960"
2828

29-
LANG_PATTERN = re.compile('\[(?P<id>[^\]]+)\]')
30-
ISO_PATTERN = re.compile(r'\[(?P<iso>[a-z]{3})\]')
29+
LANG_PATTERN = re.compile(r'\[(?P<id>[^]]+)]')
30+
ISO_PATTERN = re.compile(r'\[(?P<iso>[a-z]{3})]')
3131

3232

3333
def set_focus(url, focus):

0 commit comments

Comments
 (0)