Skip to content

Commit

Permalink
✅ Ready to clone and code.
Browse files Browse the repository at this point in the history
  • Loading branch information
serviceosaurus[bot] authored and github-actions[bot] committed Aug 20, 2024
1 parent 2eeee95 commit 80d7d85
Show file tree
Hide file tree
Showing 15 changed files with 30 additions and 31 deletions.
6 changes: 3 additions & 3 deletions .github/rename_project.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ echo "Description: $description";
echo "Renaming project..."

original_author="UKPLab"
original_name="ukp_project_template"
original_urlname="ukp-project-template"
original_description="The official template for new Python projects at UKP Lab"
original_name="arxiv2024_missciplus"
original_urlname="arxiv2024-missciplus"
original_description="Awesome arxiv2024_missciplus created by UKPLab"
# Iterate over all files in the repository
git ls-files | while read -r filename; do
# Exclude .github/workflows/rename_project.yml from renaming
Expand Down
1 change: 0 additions & 1 deletion .github/template.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,4 @@ dmypy.json

# Project files
sketch*
ukp_project_template/sketch*
arxiv2024_missciplus/sketch*
10 changes: 5 additions & 5 deletions ABOUT_THIS_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ It includes:
- 📃 Documentation structure using [mkdocs](http://www.mkdocs.org)
- 🧪 Testing structure using [pytest](https://docs.pytest.org/en/latest/)
- ✅ Code linting using [pylint](https://pypi.org/project/pylint/)
- 🎯 Entry points to execute your program using `python -m <ukp_project_template>` with basic CLI argument parsing.
- 🔄 Continuous integration using [Github Actions](https://github.com/UKPLab/ukp-project-template/actions) with jobs to check, lint and test your project.
- 🎯 Entry points to execute your program using `python -m <arxiv2024_missciplus>` with basic CLI argument parsing.
- 🔄 Continuous integration using [Github Actions](https://github.com/UKPLab/arxiv2024-missciplus/actions) with jobs to check, lint and test your project.

Are there any changes you'd like to request? Feel free to fork and open a pull request!

Expand Down Expand Up @@ -46,7 +46,7 @@ Lets take a look at the structure of this template:
├───docs # Auto-generated documentation
│ index.md # Landing page of docs
├───ukp_project_template # The main python package for the project
├───arxiv2024_missciplus # The main python package for the project
│ base.py # The base module for the project
│ cli.py # Defines CLI instructions
│ __init__.py # This tells Python that this is a package
Expand All @@ -63,7 +63,7 @@ Lets take a look at the structure of this template:

### Where should I add new stuff ?

You should create new files and subpackages inside ukp_project_template and implement your functionalities there. Remember to add what you write to `__init__.py` so that the imports work smoothly. Take a look at `base.py` and `__init__.py` to understand how it works.
You should create new files and subpackages inside arxiv2024_missciplus and implement your functionalities there. Remember to add what you write to `__init__.py` so that the imports work smoothly. Take a look at `base.py` and `__init__.py` to understand how it works.

### Why is `requirements.txt` empty ?

Expand All @@ -79,7 +79,7 @@ This file lists all the requirements for testing and development. Use it to sepa

### What is the `.github` folder?

It contains [GitHub Actions](https://docs.github.com/en/actions) that are executed automatically when pushing your code. You can see results for your repository [here](https://github.com/UKPLab/ukp-project-template/actions).
It contains [GitHub Actions](https://docs.github.com/en/actions) that are executed automatically when pushing your code. You can see results for your repository [here](https://github.com/UKPLab/arxiv2024-missciplus/actions).

### What does the linter workflow do?

Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<img src='logo.png' width='200'>
</p>

# ukp_project_template
# arxiv2024_missciplus
[![Arxiv](https://img.shields.io/badge/Arxiv-YYMM.NNNNN-red?style=flat-square&logo=arxiv&logoColor=white)](https://put-here-your-paper.com)
[![License](https://img.shields.io/github/license/UKPLab/ukp-project-template)](https://opensource.org/licenses/Apache-2.0)
[![License](https://img.shields.io/github/license/UKPLab/arxiv2024-missciplus)](https://opensource.org/licenses/Apache-2.0)
[![Python Versions](https://img.shields.io/badge/Python-3.9-blue.svg?style=flat&logo=python&logoColor=white)](https://www.python.org/)
[![CI](https://github.com/UKPLab/ukp-project-template/actions/workflows/main.yml/badge.svg)](https://github.com/UKPLab/ukp-project-template/actions/workflows/main.yml)
[![CI](https://github.com/UKPLab/arxiv2024-missciplus/actions/workflows/main.yml/badge.svg)](https://github.com/UKPLab/arxiv2024-missciplus/actions/workflows/main.yml)

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](https://github.com/rochacbruno/python-project-template/) by [rochacbruno](https://github.com/rochacbruno).

Expand Down Expand Up @@ -48,7 +48,7 @@ pip install -r requirements-dev.txt # Only needed for development

### Using the classes

To import classes/methods of `ukp_project_template` from inside the package itself you can use relative imports:
To import classes/methods of `arxiv2024_missciplus` from inside the package itself you can use relative imports:

```py
from .base import BaseClass # Notice how I omit the package name
Expand All @@ -59,19 +59,19 @@ 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:

```py
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
from arxiv2024_missciplus import BaseClass # Notice how I omit the file name
from arxiv2024_missciplus.subpackage import SubPackageClass # Here it's necessary because it's a subpackage

BaseClass().something()
SubPackageClass().something()
```

### Using scripts

This is how you can use `ukp_project_template` from command line:
This is how you can use `arxiv2024_missciplus` from command line:

```bash
$ python -m ukp_project_template
$ python -m arxiv2024_missciplus
```

### Expected results
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Entry point for ukp_project_template."""
"""Entry point for arxiv2024_missciplus."""

from .cli import main # pragma: no cover

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions ukp_project_template/cli.py → arxiv2024_missciplus/cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""CLI interface for ukp_project_template project.
"""CLI interface for arxiv2024_missciplus project.
Be creative! do whatever you want!
Expand All @@ -13,7 +13,7 @@
def main(): # pragma: no cover
"""
The main function executes on commands:
`python -m ukp_project_template` and `$ ukp_project_template `.
`python -m arxiv2024_missciplus` and `$ arxiv2024_missciplus `.
This is your program's entry point.
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ For full documentation visit [mkdocs.org](https://www.mkdocs.org).

## Docs

::: ukp_project_template
::: arxiv2024_missciplus
4 changes: 2 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
site_name: ukp_project_template
site_name: arxiv2024_missciplus
nav:
- Home: index.md

Expand All @@ -8,7 +8,7 @@ theme:
plugins:
- search
- mkdocstrings:
project_name: ukp_project_template
project_name: arxiv2024_missciplus
handlers:
python:
options:
Expand Down
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
"""Python setup.py for ukp_project_template package"""
"""Python setup.py for arxiv2024_missciplus package"""
import io
import os
from setuptools import find_packages, setup


def read(*paths, **kwargs):
"""Read the contents of a text file safely.
>>> read("ukp_project_template", "VERSION")
>>> read("arxiv2024_missciplus", "VERSION")
'0.1.0'
>>> read("README.md")
...
Expand All @@ -30,15 +30,15 @@ def read_requirements(path):


setup(
name="ukp_project_template",
url="https://github.com/UKPLab/ukp-project-template/",
name="arxiv2024_missciplus",
url="https://github.com/UKPLab/arxiv2024-missciplus/",
long_description=read("README.md"),
long_description_content_type="text/markdown",
author="author_name",
packages=find_packages(exclude=["tests", ".github"]),
install_requires=read_requirements("requirements.txt"),
entry_points={
"console_scripts": ["ukp_project_template = ukp_project_template.__main__:main"]
"console_scripts": ["arxiv2024_missciplus = arxiv2024_missciplus.__main__:main"]
},
extras_require={"test": read_requirements("requirements-dev.txt")},
)
4 changes: 2 additions & 2 deletions tests/test_base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Tests are defined here
from ukp_project_template import BaseClass
from ukp_project_template.subpackage import SubPackageClass
from arxiv2024_missciplus import BaseClass
from arxiv2024_missciplus.subpackage import SubPackageClass

def test_template():
assert True
Expand Down

0 comments on commit 80d7d85

Please sign in to comment.