Skip to main content

The ATLAS Metadata Interface

Project description

For more information see the full pyAMI documentation

About

This is a prerelease of the new and improved pyAMI (formerly known as atlasmeta, a fork of the original pyAMI) This new version offers a cleaner codebase, enhanced API, and improved command-line functionality. All commands are simply subcommands of ami.

List AOD datasets matching a pattern:

ami list datasets --type AOD data11_7TeV

list files in a dataset:

ami list files -lhc dataset.name

list latest NTUP_TAUMEDIUM data datasets (and number of events in each one) originating from AOD in periods L1 and L2 that are contained in a good runs list (GRL):

ami list data --project data11_7TeV --type NTUP_TAUMEDIUM --parent-type AOD \
--periods L1,L2 --stream physics_JetTauEtmiss --latest --fields events \
--grl mygrl.xml

list runs in a period or multiple periods:

ami list runs B M

display dataset metadata:

ami dataset info dataset.name

and query projects, data types, dataset provenance, etc. pyAMI also provides an API allowing you to perform all of the same queries from within your own Python program.

On LXPLUS at CERN

pyAMI is installed centrally on LXPLUS at CERN. To begin using pyAMI simply:

source /afs/cern.ch/atlas/software/tools/atlasmeta/setup.sh

then authenticate yourself if you haven’t already (see below).

Requirements

At least Python 2.4, ZSI, and argparse. lxml is optional but required for XSL transformations.

Automatic Installation

Automatically install the latest version of pyAMI with pip:

pip install --user pyAMI

or with easy_install:

easy_install --user pyAMI

Omit the --user for a system-wide installation (requires root privileges). Add ${HOME}/.local/bin to your ${PATH} if using --user and if it is not there already (put this in your .bashrc):

export PATH=${HOME}/.local/bin${PATH:+:$PATH}

To upgrade an existing installation use the -U option in the pip or easy_install commands above.

Manual Installation

Get the latest tarball on PyPI

Untar and install (replace X appropriately):

tar -zxvf pyAMI-X.tar.gz
cd pyAMI-X

pyAMI uses distribute to install but you may revert to a basic disutils install by setting the environment variable:

export PYAMI_NO_DISTRIBUTE=1

One advantage of using distribute is that all dependencies are automatically downloaded and installed for you. To install pyAMI into your home directory if using at least Python 2.6:

python setup.py install --user

or with older Python versions:

python setup.py install --prefix=~/.local

Add ${HOME}/.local/bin to your ${PATH} if it is not there already (put this in your .bashrc):

export PATH=${HOME}/.local/bin${PATH:+:$PATH}

If you are unable to satisfy the requirement on lxml (only used for XSL transformations) then you may disable this dependency before installation with:

export PYAMI_NO_LXML=1

Authentication

VOMS authentication is supported:

voms-proxy-init -voms atlas

The alternative option (if gLite is not available) is to send your username and password along with each AMI command:

ami auth

This will prompt you for your AMI username and password. You will only need to do this once since your credentials are stored in ~/.pyAMI/ami.conf for later use. If your credentials change just run ami auth again.

Changelog

Version 4.0.0a3 (4/17/2012)

  • Make distribute the default install method

  • Include patched urllib2 module in pyAMI.backports

Version 4.0.0a2 (4/10/2012)

  • Second prerelease of the new pyAMI

  • Support for connection through a proxy (BNL)

  • Other minor improvements

Version 4.0.0a1 (3/28/2012)

  • Prerelease of the new pyAMI

  • Package renamed to pyAMI

  • Speed improvements

  • VOMS authentication

  • Fixed permissions of ~/.atlasmeta/ami.cfg

  • Removed intermediate ami package. Everything is now under pyAMI

atlasmeta versions below:

Version 0.4.0 (2/4/2012)

  • Now compatible with Python 2.4

  • Install with distutils by default and make installation with distribute optional.

  • Improved parent-type feature in dataset query

  • Ability to specify a good runs list (GRL) in ‘ami list data’ and only the runs contained in the GRL are shown.

  • Installed on LXPLUS at CERN

  • XSL transformations reimplemented

Version 0.3.1 (1/10/2012)

  • Fix bug in file listing where size/events is NULL in database

Version 0.3 (12/20/2011)

  • Add ability to query datasets by parent type with –parent-type option

  • list files in dataset with ‘ami list files’ and optionally display total size and events

  • new schema module replicating AMI schema

  • query files, projects, subprojects, datatypes, subdatatypes, tags, nomenclatures, production steps

Version 0.2 (12/17/2011)

  • Query and display additional dataset fields (i.e. datatype, number of events)

Version 0.1 (12/1/2011)

  • Forked pyAMI

  • Major code rewrite

  • better command-line interface

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyAMI-4.0.0a3.tar.gz (56.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page