GithubHelp home page GithubHelp logo

diffpy / sampledb Goto Github PK

View Code? Open in Web Editor NEW
0.0 6.0 2.0 1.73 MB

A DB for sample and synthesis metadata information

Home Page: http://www.diffpy.org/sampledb/

License: Other

Python 68.27% TeX 31.73%

sampledb's Issues

Sticky note vs Paper

Do we want to go with actual sticky labels or just normal printer paper for the system?

Create SAF form

  1. User scans samples to go to beamtime.
  2. Software uploads relevant info to PASS SAF (may need SAF number here).

Read QRs

Need functionality for turning QR codes back into UUIDs.

Search by QRs

Search database based on QR codes.

  1. Turn QR into UUIDs
  2. Search db by UUID

Create beamtime spreadsheet

  1. User scans all samples going to BNL.
  2. Software creates beamtime spreadsheet with sample info
  3. User fills in extra info
  4. User goes to beamline to run experiment.

Write QRs

We need to make a bunch of UUIDs and convert them to QRs
Critical questions

  1. What is the relationship between UUID length and QR size?
  2. What is the appropriate size for the QR code?

Config file

Have config file so we don't need to ask for ssh info every time.

Reorder QR sheets

It might be easier to work with the QR sheets if the ordering is:

|123|456|789|
|123|456|789|
|123|456|789|
|abc|efg|hij|
.
.
.

That way we can cut vertically for each set then cut horizontally in bulk giving strips of a single number where the users don't need to cut the label to get a single QR.

Error with download samples

(dp_dev) christopher@christopher-ubuntu ~/test_sampledb $ download_samples test.xlsx
Traceback (most recent call last):
  File "/home/christopher/mc/envs/dp_dev/bin/download_samples", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/christopher/dev/sampledb-1/scripts/download_samples", line 3, in <module>
    download_samples()
  File "/home/christopher/dev/sampledb-1/sampledb/reader.xsh", line 192, in download_samples
    args.collection, args.key, args.user, args.port)
  File "/home/christopher/dev/sampledb-1/sampledb/reader.xsh", line 142, in download_sample_spreadsheet
    download(filename, sdb)
  File "/home/christopher/dev/sampledb-1/sampledb/reader.xsh", line 123, in download
    schema = json.loads(schema)
  File "/home/christopher/mc/envs/dp_dev/lib/python3.5/json/__init__.py", line 312, in loads
    s.__class__.__name__))
TypeError: the JSON object must be str, not 'bytes'

Set up CI

CircleCI to start (if possible) since we are currently running private.

Make spreasheet pretty

  • Text wrapping for keys
  • Special required keys
  • Format cells to strings
  • Units/suggestions
  • Drop down menus

Create/upload sample spreadsheet

Create sample spreadsheet from list of QRs.

  1. Get list of QRs from user
  2. Check that all QRs have no sample associated with them.
  3. Generate spreadsheet with QR column and other required columns
  4. Upload spreadsheet to sampledb

ENH: CLI

Produce a command line interface for this. (See entry points?)

DOC: Document general workflows

Proposed workflow

Workflow 1: Obtaining Samples

  1. BG student gets samples in mail
  2. BG student affixes QR code to sample/sample bag
  3. BG student scans into DB running in add_sample mode
  4. BG student fill out resulting spreadsheet with sample info

Workflow 2: Getting ready for BT

  1. BG student is going to Beamtime
  2. BG student scans all the samples going to beamtime in to DB in beamtime mode
  3. Software puts out beamtime sample spreadsheet
  4. BG student fills out any additional info
  5. BG student takes spreadsheet to BNL for loading into xpdAcq

print success

If we succeed in publishing samples we should say so.

How to handle data with samples

Usually when we are taking data it gets put into a databroker. The databroker takes care of storing large data sets. However, we may get data with the samples (eg XRD patterns taken on a lab source) which is not in the databroker. How should we handle this?

The way I see this there are two options (although there may be more):

  1. Sidewinder the data into the databroker (although we are missing tons of metadata, some of it critical (x-ray wavelength?))
  2. Put the data into filestore and hand the sample database the tokens. On retrieval we can open up the data.

DOC: quickstart

It might be nice to have some quickstart info for users to start using the system.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.