Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
myedibleenso committed Jan 22, 2024
0 parents commit 0c3a007
Show file tree
Hide file tree
Showing 34 changed files with 2,870 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## Summary of Changes


### Related issues

Resolves ???
8 changes: 8 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# see https://github.com/actions/labeler
documentation:
- any: ["docs/**"]
# all: ["!docs/changes.md"]

tests:
- any:
- "python/clu/odin/tests/**"
18 changes: 18 additions & 0 deletions .github/workflows/add-labels-to-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Add labels to PR

on:
pull_request:
branches:
- main

jobs:
triage:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- id: label-the-PR
uses: actions/labeler@v4
with:
dot: true
66 changes: 66 additions & 0 deletions .github/workflows/tests-and-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Unit tests and project documentation

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
docs:
name: "Run tests and generate project documentation"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest] #, macos-latest, windows-latest]
python-version: [ '3.11' ]
# TODO: add rust-version 1.62
# exclude:
# - os: macos-latest
# python-version: '3.8'
# - os: windows-latest
# python-version: '3.6'

steps:
# Checkout code
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
#architecture: x64
- name: Display Python version
run: |
python -c "import sys; print(sys.version)"
- name: Install library (Python)
working-directory: .
run: |
pip install ".[all]"
# docs (API)
# generate python docs using pdoc
- name: "Create documentation for Python components (API docs)"
run: |
pdoc --html -c latex_math=True --force --output-dir docs/api/python lum.clu
# test & code coverage (Python)
- name: "Unit tests and code coverage reports for Python components"
run: |
pytest -vvv
# docs (other)
- name: "Create documentation (other)"
run: |
docker run -i -v "$GITHUB_WORKSPACE:/app" parsertongue/mkdocs:latest mkdocs build -c
- name: Deploy docs
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3
with:
# see https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow#about-the-github_token-secret
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
destination_dir: "docs"
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
commit_message: ${{ github.event.head_commit.message }}
164 changes: 164 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
# auto-generated docs
docs/coverage/
docs/api/

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# `lum-ai/clu-processors`

## Install

```bash
pip install "clu-processors @ git+https://github.com/lum-ai/clu-processors@main"
```
3 changes: 3 additions & 0 deletions docs/authors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Author

Gus Hahn-Powell
2 changes: 2 additions & 0 deletions docs/dev/developing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@


16 changes: 16 additions & 0 deletions docs/dev/documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Documentation

You can view the latest documentation at the [`lum-ai/clu-processors` website](https://lum.ai/clu-processors/docs/).

## General Documentation

We use `mkdocs` to generate our site documentation from markdown. Markdown source files are located under the `docs` directory. To develop the documentation with live updates use the following command:

```bash
docker run --rm -it -v $PWD:/app \
-p 8000:8000 \
parsertongue/mkdocs:latest \
mkdocs serve -a 0.0.0.0:8000
```

Open your browser to [localhost:8000](http://localhost:80000).
Empty file added docs/dev/faq.md
Empty file.
17 changes: 17 additions & 0 deletions docs/dev/install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Installing `clu-processors` (For Development)

## Requirements

- python (>=3.8)

## Install

Clone the [clu-processors](https://github.com/lum-ai/clu-processors) repository.

!!! note
We suggest developing the `clu-processors` on a Linux environment under the `~/repos/clu-processors` directory. This documentation contains commands which run under these assumptions.


```bash
pip install -e ".[all]"
```
5 changes: 5 additions & 0 deletions docs/dev/test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Testing

```bash
pytest -vvvs
```
10 changes: 10 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# `clu-processors`

## What is it?

`clu-processors` provides an interface for loading and interacting with data produced by the Scala-based `clulab/processors` library.


## Developing

For instructions on developing `clu-processors`, navigate to the [Development](./dev/install.md) section.
5 changes: 5 additions & 0 deletions docs/install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Install

```bash
pip install "clu-processors @ git+https://github.com/lum-ai/clu-processors@main"
```
Loading

0 comments on commit 0c3a007

Please sign in to comment.