Skip to content

Commit e781b4f

Browse files
authored
GitHub management (#27)
* 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
1 parent 5f158e3 commit e781b4f

File tree

6 files changed

+229
-10
lines changed

6 files changed

+229
-10
lines changed

.github/CODE_OF_CONDUCT.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
2+
# Contributor Covenant Code of Conduct
3+
4+
## Our Pledge
5+
6+
In the interest of fostering an open and welcoming environment, we as
7+
contributors and maintainers pledge to make participation in our project and
8+
our community a harassment-free experience for everyone, regardless of age, body
9+
size, disability, ethnicity, sex characteristics, gender identity and expression,
10+
level of experience, education, socio-economic status, nationality, personal
11+
appearance, race, religion, or sexual identity and orientation.
12+
13+
## Our Standards
14+
15+
Examples of behavior that contributes to creating a positive environment
16+
include:
17+
18+
* Using welcoming and inclusive language
19+
* Being respectful of differing viewpoints and experiences
20+
* Gracefully accepting constructive criticism
21+
* Focusing on what is best for the community
22+
* Showing empathy towards other community members
23+
24+
Examples of unacceptable behavior by participants include:
25+
26+
* The use of sexualized language or imagery and unwelcome sexual attention or
27+
advances
28+
* Trolling, insulting/derogatory comments, and personal or political attacks
29+
* Public or private harassment
30+
* Publishing others' private information, such as a physical or electronic
31+
address, without explicit permission
32+
* Other conduct which could reasonably be considered inappropriate in a
33+
professional setting
34+
35+
## Our Responsibilities
36+
37+
Project maintainers are responsible for clarifying the standards of acceptable
38+
behavior and are expected to take appropriate and fair corrective action in
39+
response to any instances of unacceptable behavior.
40+
41+
Project maintainers have the right and responsibility to remove, edit, or
42+
reject comments, commits, code, wiki edits, issues, and other contributions
43+
that are not aligned to this Code of Conduct, or to ban temporarily or
44+
permanently any contributor for other behaviors that they deem inappropriate,
45+
threatening, offensive, or harmful.
46+
47+
## Scope
48+
49+
This Code of Conduct applies within all project spaces, and it also applies when
50+
an individual is representing the project or its community in public spaces.
51+
Examples of representing a project or community include using an official
52+
project e-mail address, posting via an official social media account, or acting
53+
as an appointed representative at an online or offline event. Representation of
54+
a project may be further defined and clarified by project maintainers.
55+
56+
## Enforcement
57+
58+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
59+
reported by contacting the project team at [email protected]. All
60+
complaints will be reviewed and investigated and will result in a response that
61+
is deemed necessary and appropriate to the circumstances. The project team is
62+
obligated to maintain confidentiality with regard to the reporter of an incident.
63+
Further details of specific enforcement policies may be posted separately.
64+
65+
Project maintainers who do not follow or enforce the Code of Conduct in good
66+
faith may face temporary or permanent repercussions as determined by other
67+
members of the project's leadership.
68+
69+
## Attribution
70+
71+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
72+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
73+
74+
[homepage]: https://www.contributor-covenant.org
75+
76+
For answers to common questions about this code of conduct, see
77+
https://www.contributor-covenant.org/faq

.github/CONTRIBUTING.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Contributing to Layout Parser
2+
3+
🎉👍 Thank you for reading this and plan to contribute! We hope you can join us and work on
4+
this exciting project that can transform document image analysis pipelines with the full
5+
power of Deep Learning.
6+
7+
All kinds of contributions are welcome, including but not limited to:
8+
9+
- Better documentation and examples for more use cases
10+
- New pre-trained layout detection models
11+
- New features
12+
13+
## Planned features
14+
15+
We are planning to improve different aspects of Layout Parser, any feedbacks and contributions are welcomed!
16+
17+
### Layout Modeling
18+
19+
(Pre-trained) layout models are one of the most components in Layout Parser, and we are planning to broadening the support for layout models:
20+
21+
- 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.
22+
- Support segmentation-based models, e.g., [dhSegment](https://github.com/dhlab-epfl/dhSegment)
23+
- Better customized training of layout detection models, see [layout-model-training](https://github.com/Layout-Parser/layout-model-training)
24+
- Reproducing novel layout models in the current framework, e.g., [CascadeTabNet](https://github.com/DevashishPrasad/CascadeTabNet)
25+
26+
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).
27+
28+
### Advanced Layout Pipeline
29+
30+
- Support defining `Pipeline` that specifies an end-to-end layout processing pipeline for complex documents.
31+
32+
### Command Line Tool and Layout Detection Service
33+
34+
Layout Parser can be easily turned into a command line tool or service to process documents in bulk.
35+
36+
- Build a command line tool based on `Click` that supports commands like `layoutparser process --path <path/to/document/folders>`
37+
- Build a RESTful Layout Parser service based on tools like `FastAPI` with similar supports as the ccommand line tool.
38+
- Performance improvements for these service
39+
40+
### Easy Installation and Deployment
41+
42+
- Better ways for installing Detectron2 and related components on Windows machines
43+
- A Docker configuration for installing the Layout Parser
44+
45+
## How to Contribute?
46+
47+
This how-to-guide is abridged from the [MMOCR repo](https://github.com/open-mmlab/mmocr/blob/main/.github/CONTRIBUTING.md)
48+
49+
### Main Steps
50+
51+
1. Fork and pull the latest Layout Parser Repo
52+
2. Checkout a new branch (do not use main branch for PRs)
53+
3. Commit your changes
54+
4. Create a PR
55+
56+
**Notes**:
57+
1. If you plan to add some new features that involve large changes, please open an issue for discussion first.
58+
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.
59+
3. For new features and new modules, unit tests are required to improve the robustness.
60+
4. You might want to run `pip install -r dev-requirements.txt` to install the dev-dependencies.
61+
62+
### Code Style
63+
64+
1. We adopt [PEP8](https://www.python.org/dev/peps/pep-0008/) as the preferred code style.
65+
2. We use the following tools for linting and formatting:
66+
- pylint: linter
67+
- black: formatter
68+
3. We suggest adding [type hints](https://docs.python.org/3/library/typing.html) for all APIs.
69+
70+
Sincere thanks,
71+
72+
Zejiang (Shannon) Shen
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: 'bug'
6+
assignees: ''
7+
---
8+
9+
**Describe the bug**
10+
A clear and concise description of what the bug is.
11+
12+
**Checklist**
13+
14+
1. I have searched related issues but cannot get the expected help.
15+
2. The bug has not been fixed in the latest version, see the [Layout Parser Releases](https://github.com/Layout-Parser/layout-parser/releases/)
16+
17+
**To Reproduce**
18+
Steps to reproduce the behavior:
19+
1. What command or script did you run?
20+
```none
21+
A placeholder for the command.
22+
```
23+
24+
**Environment**
25+
1. Please describe your Platform [Windows/MacOS/Linux]
26+
2. Please show the Layout Parser version
27+
2. You may add addition that may be helpful for locating the problem, such as
28+
- How you installed PyTorch [e.g., pip, conda, source]
29+
- Other environment variables that may be related (such as `$PATH`, `$LD_LIBRARY_PATH`, `$PYTHONPATH`, etc.)
30+
31+
**Error traceback**
32+
If applicable, paste the error traceback here.
33+
34+
**Screenshots**
35+
If applicable, add screenshots to help explain your problem.
36+
37+
**Additional context**
38+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Installation Guide
4+
url: https://layout-parser.readthedocs.io/en/latest/notes/installation.html
5+
about: |
6+
For any questions related to installation, especially installation on
7+
Windows platforms, please check the Installation Guide first.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
8+
9+
**Motivation**
10+
A clear and concise description of the motivation of the feature, and how relates to make Layout Parser better?
11+
You can also find examples in [Layout Parser CONTRIBUTING guidelines](../CONTRIBUTING.md)
12+
13+
**Related resources**
14+
If there is an official code release or third-party implementations, please also provide the information here, which would be very helpful.
15+
16+
**Additional context**
17+
Add any other context or screenshots about the feature request here.

README.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
1-
<p align="left">
1+
<p align="center">
22
<img src="https://github.com/Layout-Parser/layout-parser/raw/master/.github/layout-parser.png" alt="Layout Parser Logo" width="35%">
3+
<p align="center">
4+
A unified toolkit for Deep Learning Based Document Image Analysis
5+
</p>
36
</p>
47

5-
<p align="center">
6-
7-
[![Docs](https://readthedocs.org/projects/layout-parser/badge/)](https://layout-parser.readthedocs.io/en/latest/)
8-
[![PyPI](https://img.shields.io/pypi/v/layoutparser?color=%23099cec&label=PyPI%20package&logo=pypi&logoColor=white)](https://pypi.org/project/layoutparser/)
9-
[![PyVersion](https://img.shields.io/pypi/pyversions/layoutparser?color=%23099cec&
10-
)](https://pypi.org/project/layoutparser/)
11-
[![License](https://img.shields.io/pypi/l/layoutparser)](https://github.com/Layout-Parser/layout-parser/blob/master/LICENSE)
8+
<p align=center>
9+
<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>
10+
<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>
11+
<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>
12+
</p>
1213

14+
<p align=center>
15+
<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>
16+
<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>
17+
<img alt="PyPI - Downloads" src="https://img.shields.io/pypi/dm/layoutparser">
18+
<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>
1319
</p>
1420

1521
---
1622

17-
Layout Parser is a deep learning based tool for document image layout analysis tasks.
18-
1923
## Installation
2024

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

66+
## Contributing
67+
68+
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!
69+
6270
## Citing `layoutparser`
6371

6472
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.

0 commit comments

Comments
 (0)