Coder Social home page Coder Social logo

file-parser's Introduction

Tech Stack

This project is implemented by python 2.7, running on Flask and Sqlite. Dependencies are listed in requirements.txt

Flask             # web framework
flask-sqlalchemy  # orm
flask-script      # command line tools
coverage          # test coverage
mock              # test tools

Setup

It is recommended to setup this project in virtual environment. Then locate to project folder and install dependencies.

> pip install -r requirements.txt

Init static database (there is only one static database in this project, which is Specification)

> python manage.py init_database

It is required to manually import Specification field into system. Command line is python manage.py select_all -f [spec_name]. Notice that alphanumeric characters are allowed in spec_name. By default specification files are located in ./specs.

> python manage.py import_specification -f testspec

To import data files, simply run ./manage.py import_files. All valid files located at ./data will be imported.

> python manage.py import_files

To review the records imported, simply run python manage.py select_all -f [spec_name]. Notice that unicode characters are supported.

> python manage.py select_all -f testspec

name      |valid|count
----------|-----|-----
Foony     |True |    1
Barzane   |False|  -12
Quuxitude |True |  103
一二三四五六七八九十|True |  103

Test

Every module except manage.py has a mirror test script located ar ./tests. Test coverage is 83% at the moment.

> coverage run --source . -m --omit="tests/*" tests.test
> coverage report

Name               Stmts   Miss  Cover
--------------------------------------
__init__.py            0      0   100%
app.py                 7      0   100%
column.py             40      1    98%
importer.py           41      2    95%
manage.py             27     27     0%
models.py              8      2    75%
settings.py           18      0   100%
specification.py     105      9    91%
--------------------------------------
TOTAL                246     41    83%

file-parser's People

Contributors

captainhcg avatar

Watchers

 avatar

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.