Skip to content

Commit

Permalink
GitHub management (#27)
Browse files Browse the repository at this point in the history
* Add CODE_OF_CONDUCT

* Add contributing guideline

* Add the contributing section in README

* Add how-to-contribute

* Add issue templates

* Improve badges

* Update project description
  • Loading branch information
lolipopshock authored Apr 12, 2021
1 parent 5f158e3 commit e781b4f
Show file tree
Hide file tree
Showing 6 changed files with 229 additions and 10 deletions.
77 changes: 77 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@

# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to make participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies within all project spaces, and it also applies when
an individual is representing the project or its community in public spaces.
Examples of representing a project or community include using an official
project e-mail address, posting via an official social media account, or acting
as an appointed representative at an online or offline event. Representation of
a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at layoutparser@gmail.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
72 changes: 72 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Contributing to Layout Parser

🎉👍 Thank you for reading this and plan to contribute! We hope you can join us and work on
this exciting project that can transform document image analysis pipelines with the full
power of Deep Learning.

All kinds of contributions are welcome, including but not limited to:

- Better documentation and examples for more use cases
- New pre-trained layout detection models
- New features

## Planned features

We are planning to improve different aspects of Layout Parser, any feedbacks and contributions are welcomed!

### Layout Modeling

(Pre-trained) layout models are one of the most components in Layout Parser, and we are planning to broadening the support for layout models:

- Support frameworks other than Detectron2, e.g., [MMOCR](https://github.com/open-mmlab/mmocr). It may leads to easier installation and support for more application scenarios like recipt or invoice detection.
- Support segmentation-based models, e.g., [dhSegment](https://github.com/dhlab-epfl/dhSegment)
- Better customized training of layout detection models, see [layout-model-training](https://github.com/Layout-Parser/layout-model-training)
- Reproducing novel layout models in the current framework, e.g., [CascadeTabNet](https://github.com/DevashishPrasad/CascadeTabNet)

We are also working on the Layout Parser platforms that can support users' sharing their own models. Please check more details in [community-platform](https://github.com/Layout-Parser/community-platform).

### Advanced Layout Pipeline

- Support defining `Pipeline` that specifies an end-to-end layout processing pipeline for complex documents.

### Command Line Tool and Layout Detection Service

Layout Parser can be easily turned into a command line tool or service to process documents in bulk.

- Build a command line tool based on `Click` that supports commands like `layoutparser process --path <path/to/document/folders>`
- Build a RESTful Layout Parser service based on tools like `FastAPI` with similar supports as the ccommand line tool.
- Performance improvements for these service

### Easy Installation and Deployment

- Better ways for installing Detectron2 and related components on Windows machines
- A Docker configuration for installing the Layout Parser

## How to Contribute?

This how-to-guide is abridged from the [MMOCR repo](https://github.com/open-mmlab/mmocr/blob/main/.github/CONTRIBUTING.md)

### Main Steps

1. Fork and pull the latest Layout Parser Repo
2. Checkout a new branch (do not use main branch for PRs)
3. Commit your changes
4. Create a PR

**Notes**:
1. If you plan to add some new features that involve large changes, please open an issue for discussion first.
2. If you are the author of some papers and would like to include your method to Layout Parser, please let us know (open an issue or contact the maintainers). We will much appreciate your contribution.
3. For new features and new modules, unit tests are required to improve the robustness.
4. You might want to run `pip install -r dev-requirements.txt` to install the dev-dependencies.

### Code Style

1. We adopt [PEP8](https://www.python.org/dev/peps/pep-0008/) as the preferred code style.
2. We use the following tools for linting and formatting:
- pylint: linter
- black: formatter
3. We suggest adding [type hints](https://docs.python.org/3/library/typing.html) for all APIs.

Sincere thanks,

Zejiang (Shannon) Shen
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: 'bug'
assignees: ''
---

**Describe the bug**
A clear and concise description of what the bug is.

**Checklist**

1. I have searched related issues but cannot get the expected help.
2. The bug has not been fixed in the latest version, see the [Layout Parser Releases](https://github.com/Layout-Parser/layout-parser/releases/)

**To Reproduce**
Steps to reproduce the behavior:
1. What command or script did you run?
```none
A placeholder for the command.
```

**Environment**
1. Please describe your Platform [Windows/MacOS/Linux]
2. Please show the Layout Parser version
2. You may add addition that may be helpful for locating the problem, such as
- How you installed PyTorch [e.g., pip, conda, source]
- Other environment variables that may be related (such as `$PATH`, `$LD_LIBRARY_PATH`, `$PYTHONPATH`, etc.)

**Error traceback**
If applicable, paste the error traceback here.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
blank_issues_enabled: true
contact_links:
- name: Installation Guide
url: https://layout-parser.readthedocs.io/en/latest/notes/installation.html
about: |
For any questions related to installation, especially installation on
Windows platforms, please check the Installation Guide first.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---

**Motivation**
A clear and concise description of the motivation of the feature, and how relates to make Layout Parser better?
You can also find examples in [Layout Parser CONTRIBUTING guidelines](../CONTRIBUTING.md)

**Related resources**
If there is an official code release or third-party implementations, please also provide the information here, which would be very helpful.

**Additional context**
Add any other context or screenshots about the feature request here.
28 changes: 18 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
<p align="left">
<p align="center">
<img src="https://github.com/Layout-Parser/layout-parser/raw/master/.github/layout-parser.png" alt="Layout Parser Logo" width="35%">
<p align="center">
A unified toolkit for Deep Learning Based Document Image Analysis
</p>
</p>

<p align="center">

[![Docs](https://readthedocs.org/projects/layout-parser/badge/)](https://layout-parser.readthedocs.io/en/latest/)
[![PyPI](https://img.shields.io/pypi/v/layoutparser?color=%23099cec&label=PyPI%20package&logo=pypi&logoColor=white)](https://pypi.org/project/layoutparser/)
[![PyVersion](https://img.shields.io/pypi/pyversions/layoutparser?color=%23099cec&
)](https://pypi.org/project/layoutparser/)
[![License](https://img.shields.io/pypi/l/layoutparser)](https://github.com/Layout-Parser/layout-parser/blob/master/LICENSE)
<p align=center>
<a href="https://arxiv.org/abs/2103.15348"><img src="https://img.shields.io/badge/arXiv-2103.15348-b31b1b.svg" title="Layout Parser Paper"></a>
<a href="https://layout-parser.github.io"><img src="https://img.shields.io/badge/website-layout--parser.github.io-informational.svg" title="Layout Parser Paper"></a>
<a href="https://layout-parser.readthedocs.io/en/latest/"><img src="https://img.shields.io/badge/doc-layout--parser.readthedocs.io-light.svg" title="Layout Parser Documentation"></a>
</p>

<p align=center>
<a href="https://pypi.org/project/layoutparser/"><img src="https://img.shields.io/pypi/v/layoutparser?color=%23099cec&label=PyPI%20package&logo=pypi&logoColor=white" title="The current version of Layout Parser"></a>
<a href="https://pypi.org/project/layoutparser/"><img src="https://img.shields.io/pypi/pyversions/layoutparser?color=%23099cec&" alt="Python 3.6 3.7 3.8" title="Layout Parser supports Python 3.6 and above"></a>
<img alt="PyPI - Downloads" src="https://img.shields.io/pypi/dm/layoutparser">
<a href="https://github.com/Layout-Parser/layout-parser/blob/master/LICENSE"><img src="https://img.shields.io/pypi/l/layoutparser" title="Layout Parser uses Apache 2 License"></a>
</p>

---

Layout Parser is a deep learning based tool for document image layout analysis tasks.

## Installation

You can find detailed installation instructions in [installation.md](installation.md). But generally, it's just `pip install`
Expand Down Expand Up @@ -59,6 +63,10 @@ With only 4 lines of code in `layoutparse`, you can unlock the information from
>>> lp.draw_box(image, layout,) # With extra configurations
```

## Contributing

We encourage you to contribute to Ruby on Rails! Please check out the [Contributing guidelines](.github/CONTRIBUTING.md) for guidelines about how to proceed. Join us!

## Citing `layoutparser`

If you find `layoutparser` helpful to your work, please consider citing our tool and [paper](https://arxiv.org/pdf/2103.15348.pdf) using the following BibTeX entry.
Expand Down

0 comments on commit e781b4f

Please sign in to comment.