Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 7 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

### Changed

* To reduce the complexity and the size of the ORM mapping, regenerated it for
a selection of practically useful tables.

## [0.4.0]

### Added
Expand Down
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,18 @@ Currently, record creation from this code is performed only on the iRODS locatio
`seq_product_irods_locations`. We allow for vendor-specific `sqlalchemy` code where trying
to be vendor-agnostic would result in implementing a large volume of custom code and tests.

This ORM has been auto-generated with [`sqlacodegen 4.0.2`](https://pypi.org/project/sqlacodegen/4.0.2/) with post-generation manual modification to deal with awkward bits.
This ORM has been auto-generated with [`sqlacodegen 4.0.2`](https://pypi.org/project/sqlacodegen/4.0.2/)
with post-generation manual modification to deal with awkward bits. Only a selection
of practically useful tables is represented in the ORM.

```bash
sqlacodegen --generator declarative mysql+pymysql://user:pass@host:port/dbname > src/npgmlwarehouse/db/schema.py
sqlacodegen --generator declarative --tables 'aliquot,bmap_flowcell,...' mysql+pymysql://user:pass@host:port/dbname > src/npgmlwarehouse/db/schema.py
```

A list of tables can be generated as follows:

```bash
echo 'show tables' | mlwh-livero | grep -v Tables_in | grep -v gsu | grep -v tol_sample | grep -v lighthouse | grep -v cgap| grep -v iseq_external | grep -v iseq_heron | grep -v schema_migrations | grep -v ar_internal_metadata | xargs echo | perl -nle 's/\s/,/g;print $_'
```

## Development
Expand Down
Loading