Coder Social home page Coder Social logo

dmaudit's Introduction

dmaudit

Python script to generate a bioinformatics data management audit report.

Only works with Python 3.

Installation:

pip3 dmaudit

Usage:

dmaudit report /path/to/dir/to/audit

dmaudit's People

Contributors

tjelvar-olsson avatar

Watchers

James Cloos avatar Matthew Hartley avatar  avatar

dmaudit's Issues

Hitting a permissions error kills whole script

Encountering a PermissionError trying to read a subdirectory will stop the whole script with a stack trace, e.g:

Auditing directory: /jic/scratch/groups/Matthew-Hartley
Traceback (most recent call last):
File "/dmaudit/dmaudit.py", line 262, in
dmaudit()
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 764, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/dmaudit/dmaudit.py", line 235, in dmaudit
directory = build_tree(directory, level, 0, check_mimetype=check_mimetype)
File "/dmaudit/dmaudit.py", line 161, in build_tree
check_mimetype=check_mimetype)
File "/dmaudit/dmaudit.py", line 161, in build_tree
check_mimetype=check_mimetype)
File "/dmaudit/dmaudit.py", line 150, in build_tree
for entry in os.scandir(path):
PermissionError: [Errno 13] Permission denied: '[redacted]'

Where we catch FileNotFound, we might also want to catch PermissionError

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.