https://github.com/cdli-gh/pyoracc

Python tools for working with ATF

https://github.com/cdli-gh/pyoracc

Science Score: 20.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
    3 of 10 committers (30.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.6%) to scientific vocabulary
Last synced: 11 months ago · JSON representation

Repository

Python tools for working with ATF

Basic Info
  • Host: GitHub
  • Owner: cdli-gh
  • License: gpl-3.0
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 8.41 MB
Statistics
  • Stars: 2
  • Watchers: 11
  • Forks: 3
  • Open Issues: 22
  • Releases: 0
Fork of oracc/pyoracc
Created over 8 years ago · Last pushed over 6 years ago
Metadata Files
Readme License

README.md

pyoracc

Build Status Maintainability codecov DOI

Python tools for working with ORACC/C-ATF files

Depends on PLY, Mako, Multiprocessing and Pytest

Installation

If you don't use pip, you're missing out. Here are installation instructions.

Simply run:

bash $ cd pyoracc $ git pull origin master $ pip install .

Or you can just do

$ pip install git+git://github.com/cdli-gh/pyoracc.git 

Or you can also do

$ pip install git+https://github.com/cdli-gh/pyoracc.git 

Upgrading

If you already have installed it and want to upgrade the tool:

bash $ cd pyoracc $ git pull origin master $ pip install . --upgrade

Or you can just do

$ pip install git+git://github.com/cdli-gh/pyoracc.git --upgrade

Or you can also do

$ pip install git+https://github.com/cdli-gh/pyoracc.git --upgrade

Usage

To use it:

$ pyoracc --help

*Only files with the .atf extension can be processed. *

To run it on file:

$ pyoracc -i ./pyoracc/test/data/cdli_atf_20180104.atf -f cdli

For a fresh copy of CDLI ATF, download the data bundle here : https://github.com/cdli-gh/data/blob/master/cdliatf_unblocked.atf

To run it on oracc file:

$ pyoracc -i ./pyoracc/test/data/cdli_atf_20180104.atf -f oracc

To run it on folder:

$ pyoracc -i ./pyoracc/test/data -f cdli

To disable segmentation (will be slow) and to run on whole, use switch -w/--whole:

$ pyoracc -i ./pyoracc/test/data -f cdli -w

To see the console messages of the tool, use --verbose switch

$ pyoracc -i ./pyoracc/test/data -f cdli --verbose

Note that using the verbose option will also create a parselog.txt file, containing the log output along with displaying it on command line. The verbose output contains the lexical symbols, the parse grammer table and the LR parsing table states.

Also note that, first time usage with any atf format will always display the parse tables irrespective of verbose switch.

If you don't give arguments, it will prompt for the path and atf file type.

Help

```bash $ pyoracc --help Usage: pyoracc [OPTIONS]

My Tool does one work, and one work well.

Options: -i, --inputpath PATH Input the file/folder name. [required] -f, --atftype [cdli|atf] Input the atf file type. [required] -v, --verbose Enables verbose mode --version Show the version and exit. --help Show this message and exit.

```

Internal Dev Usage

Development Guideline

  • ORACC atf based changes will go in pyoracc/atf/oracc
  • CDLI atf based changes will go in pyoracc/atf/cdli
  • Common atf based changes will go in pyoracc/atf/common

To run on directory

$ python  -m pyoracc.model.corpus ./pyoracc/test/data  cdli

To run on individual file

$ python -m pyoracc.atf.common.atffile ./pyoracc/test/data/cdli_atf_20180104.atf cdli True

Running Tests

Before running pytest and coverage, install py.test and pytest-cov.

$ py.test --cov=pyoracc --cov-report xml --cov-report html --cov-report annotate

Before running pycodestyle, install pycodestyle.

$ pycodestyle

API Consumption

python from pyoracc.atf.common.atffile import file_process file_process(pathname, atftype, verbose)

Owner

  • Name: CDLI
  • Login: cdli-gh
  • Kind: organization
  • Email: cdli@orinst.ox.ac.uk
  • Location: Los Angeles, Oxford, Berlin

GitHub Events

Total
Last Year

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 419
  • Total Committers: 10
  • Avg Commits per committer: 41.9
  • Development Distribution Score (DDS): 0.668
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Jens Hedegaard Nielsen j****n@u****k 139
James Hetherington j****n@u****k 126
Jayanth j****5@g****m 49
Ralph Giles g****s@t****t 45
Raquel Alegre r****e@u****k 43
James Hetherington j****h@g****m 9
Aman Singh a****s@g****m 4
James Hetherington j****h@g****m 2
Émilie Pagé-Perron e****p@i****t 1
Raquel Alegre r****l 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 29
  • Total pull requests: 16
  • Average time to close issues: 3 months
  • Average time to close pull requests: 3 days
  • Total issue authors: 2
  • Total pull request authors: 5
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.25
  • Merged pull requests: 13
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • epageperron (28)
  • jayanthkmr (1)
Pull Request Authors
  • jayanthkmr (10)
  • julightzhong10 (3)
  • rillian (1)
  • amansheaven (1)
  • epageperron (1)
Top Labels
Issue Labels
Pull Request Labels