This is the official template for new Python projects at UKP Lab. It was adapted for the needs of UKP Lab from the excellent python-project-template by rochacbruno.
It should help you start your project and give you continuous status updates on the development through GitHub Actions.
Abstract: The study of natural language processing (NLP) has gained increasing importance in recent years, with applications ranging from machine translation to sentiment analysis. Properly managing Python projects in this domain is of paramount importance to ensure reproducibility and facilitate collaboration. The template provides a structured starting point for projects and offers continuous status updates on development through GitHub Actions. Key features include a basic setup.py file for installation, packaging, and distribution, documentation structure using mkdocs, testing structure using pytest, code linting with pylint, and entry points for executing the program with basic CLI argument parsing. Additionally, the template incorporates continuous integration using GitHub Actions with jobs to check, lint, and test the project, ensuring robustness and reliability throughout the development process.
Contact person: Federico Tiblias
Don't hesitate to send us an e-mail or report an issue, if something is broken (and it shouldn't be) or if you have further questions.
DO NOT CLONE OR FORK
If you want to set up this template:
- Request a repository on UKP Lab's GitHub by following the standard procedure on the wiki. It will install the template directly. Alternatively, set it up in your personal GitHub account by clicking Use this template.
- Wait until the first run of CI finishes. Github Actions will commit to your new repo with a "✅ Ready to clone and code" message.
- Delete optional files:
- If you don't need automatic documentation generation, you can delete folder
docs
, file.github\workflows\docs.yml
andmkdocs.yml
- If you don't want automatic testing, you can delete folder
tests
and file.github\workflows\tests.yml
- If you don't need automatic documentation generation, you can delete folder
- Prepare a virtual environment:
python -m venv .venv
source .venv/bin/activate
pip install .
pip install -r requirements-dev.txt # Only needed for development
-
Adapt anything else (for example this file) to your project.
-
Read the file ABOUT_THIS_TEMPLATE.md for more information about development.
To import classes/methods of ukp_project_template
from inside the package itself you can use relative imports:
from .base import BaseClass # Notice how I omit the package name
BaseClass().something()
To import classes/methods from outside the package (e.g. when you want to use the package in some other project) you can instead refer to the package name:
from ukp_project_template import BaseClass # Notice how I omit the file name
from ukp_project_template.subpackage import SubPackageClass # Here it's necessary because it's a subpackage
BaseClass().something()
SubPackageClass().something()
This is how you can use ukp_project_template
from command line:
$ python -m ukp_project_template
After running the experiments, you should expect the following results:
(Feel free to describe your expected results here...)
-
x, --xxxx
: This parameter does something nice -
...
-
z, --zzzz
: This parameter does something even nicer
Read the FAQs in ABOUT_THIS_TEMPLATE.md to learn more about how this template works and where you should put your classes & methods. Make sure you've correctly installed requirements-dev.txt
dependencies
Please use the following citation:
@InProceedings{smith:20xx:CONFERENCE_TITLE,
author = {Smith, John},
title = {My Paper Title},
booktitle = {Proceedings of the 20XX Conference on XXXX},
month = mmm,
year = {20xx},
address = {Gotham City, USA},
publisher = {Association for XXX},
pages = {XXXX--XXXX},
url = {http://xxxx.xxx}
}
This repository contains experimental software and is published for the sole purpose of giving additional background details on the respective publication.