NationalGenomicsInfrastructure / ngi_reports

Code to generate reports for use by the NGI in SciLifeLab

Home Page:http://nationalgenomicsinfrastructure.github.io/ngi_reports/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can we stop using `StatusDB` repo!!

senthil10 opened this issue · comments

Now we have StatusDB as one of the dependency and we use Classes from that package to connect/create instances ? But we (atleast me in project_summary) do not use any other class methods from the package. So I was wondering if we could remove the dependency for Statusdb package and create a script within this repo, for example like ngi_reports/common/db.py which have only required stuff (like creating instances).

My main concerns are

  • now I should introduce a connection to x_flowcells database in our statusdb (the DB), so I should create a class in Statusdb package which just creates the instance (as thats all we need for now).
  • I would like to keep it consist i.e. either I use statusdb repo to create instances for all databases like projects, flowcells, x_flowcells or I use local script for all them

@ewels and @b97pla do you use Statusdb for IGN reports ?

@senthil10 it is used for the Stockholm flavour of IGN reports, but only a couple of fields. I think these are probably shared with fields used in project_summary.

  • Pros
    • Self-contained, less dependencies is usually a good thing
    • If not much complexity is needed, it's nice for maintenance if the code is simple
  • Cons
    • Another place to maintain code for statusdb. If everything uses the statusdb package, then in theory we only need to apply updates in once place. In theory.

My opinion: go for it! In my experience stuff doesn't change very often, and when it does it's usually a big enough change that everything will need to go along with it anyway. So I'm in favour of keeping stuff isolated in small packages and as simple as possible.

Great!! So I will create a local script within this repo 👍 It will be very simple one :)

And I think Statusdb is used by TACA, but again only for simple connection not any fancy stuff. Also TACA uses flowcell_parser (maybe ?) to connect to x_flowcell db.

we don't use statusdb no, the uppsala-specific code is free of dependencies on that module afaik