Skip to content

Commit

Permalink
Repo initial setup.
Browse files Browse the repository at this point in the history
  • Loading branch information
ogkdmr committed Feb 26, 2024
1 parent 10b0f3f commit f8d353e
Show file tree
Hide file tree
Showing 27 changed files with 67 additions and 220 deletions.
12 changes: 6 additions & 6 deletions .github/ISSUE_TEMPLATE/01_bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,28 @@ name: Bug Report
description: Report errors or unexpected results.
labels: ["bug"]
assignees:
- foobar-bug-assign-dev
- ragamp-bug-assign-dev
body:
- type: textarea
id: install
attributes:
label: How did you install foobar?
label: How did you install RagAmp?
description: >
E.g., install via pip, install from source, etc. **Note:** this will
be rendered as console text automatically.
placeholder: |
$ pip install foobar
Collecting foobar
$ pip install ragamp
Collecting ragamp
...
Successfully installed foobar...
Successfully installed ragamp...
render: console
validations:
required: true

- type: input
id: version
attributes:
label: What version of foobar are you using?
label: What version of ragamp are you using?
description: >
Package version if installed via Pip or commit ID if installed
from source.
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/02_enhancement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Enhancement Request
description: Request a new feature or enhancement.
labels: ["enhancement"]
assignees:
- foobar-enh-assign-dev
- ragamp-enh-assign-dev
body:
- type: textarea
id: request
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/03_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Documentation Improvements
description: Suggest improvements to the documentation.
labels: ["documentation"]
assignees:
- foobar-doc-assignee-dev
- ragamp-doc-assignee-dev
body:
- type: textarea
id: freeform
Expand Down
12 changes: 6 additions & 6 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
cff-version: 1.2.0
message: If you use this software, please cite it as below.
authors:
- family-names: Pauloski
given-names: Greg
orcid: https://orcid.org/0000-0002-6547-6902
- family-names: Gokdemir
given-names: Ozan
orcid: https://orcid.org/0000-0001-5299-1983
license: MIT
repository-code: https://github.com/foobar-author/foobar
title: FooBar
url: https://foobar.dev
repository-code: https://github.com/ogkdmr/ragamp
title: RagAmp
url: https://ogkdmr.github.io/ragamp/
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2023-Present FooBar Author
Copyright (c) 2023-Present Ozan Gokdemir

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
69 changes: 5 additions & 64 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,67 +1,8 @@
# Python Package Template Repo
# RagAmp: Retrieval Augmented Generation for Antimicrobial Peptide Generation

[![docs](https://github.com/gpauloski/python-template/actions/workflows/docs.yml/badge.svg)](https://github.com/gpauloski/python-template/actions)
[![tests](https://github.com/gpauloski/python-template/actions/workflows/tests.yml/badge.svg)](https://github.com/gpauloski/python-template/actions)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/gpauloski/python-template/main.svg)](https://results.pre-commit.ci/latest/github/gpauloski/python-template/main)

Python package template repo that provides:
- Package, examples, and testing layout.
- GitHub PR and Issue templates.
- Example docs with MKDocs and GitHub Pages.
- CI framework with `pre-commit` and `tox`.
- GitHub actions for running tests and publishing packages.

This package setup was based on [Anthony Sottile's project setup](https://www.youtube.com/watch?v=q8DkatMZvUs&list=PLWBKAf81pmOaP9naRiNAqug6EBnkPakvY) but deviates in some places (e.g., `pyproject.toml` and `ruff`).

## Setup Instructions

1. Click the "Use this template" button at the top right of this page.
2. Delete and directories you will not be using (commonly `docs/` if you do not want to use MKDocs or `examples/` if you will not have example code).
3. Follow the instructions to create the new repo then clone your repo locally.
4. The template uses "foobar" to indicate things that need to be changed.
Start by searching for all instances (`git grep foobar`) and changing them accordingly.
5. Configure pre-commit:
- Go to [https://pre-commit.ci/](https://pre-commit.ci/) and enable pre-commit on your repo.
- Update the pre-commit badge URL in this README with your new badge URL.
6. Configure GitHub pages:
- Go to the "Pages" section of your repository settings.
- Select "Deploy from a branch" and use the "gh-pages" branch.
7. Configure PyPI releases (if relevant):
- Create a new API token for [https://pypi.org/](https://pypi.org/).
- Add the token as a GitHub actions secret (see the instructions [here](https://github.com/pypa/gh-action-pypi-publish)).
8. Delete this boilerplate stuff in the README.
9. Commit and push changes.

### GitHub Configuration

I recommend making a few other changes to the repo's setting on GitHub.
- In "General"
- Select/deselect features you need/don't need.
- Select "Automatically delete head branches
- In "Branches": enable branch protection on `main`.
- Check "Require a pull request before merging"
- Check "Require status checks to pass before merging"
- Check "Require branches to be up to date before merging"
- Set required checks (e.g., pre-commit.ci, tests, etc.)
- Check "Do not allow bypassing the above settings"

## Installation

Install via pip:
```
$ pip install foobar
```

For local development:
```
$ tox --devenv venv -e py310
$ pre-commit install
```
or
```
$ pip install -e .
```

## Additional README Sections
[![docs](https://github.com/ogkdmr/ragamp/actions/workflows/docs.yml/badge.svg)](https://github.com/ogkdmr/ragamp/actions)
[![tests](https://github.com/ogkdmr/ragamp/actions/workflows/tests.yml/badge.svg)](https://github.com/ogkdmr/ragamp/actions)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/ogkdmr/ragamp/main.svg)](https://results.pre-commit.ci/latest/github/ogkdmr/ragamp/main)

Documentation to follow
...
2 changes: 1 addition & 1 deletion docs/_templates/python/material/module.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
{% endif %}

<p>
Source file: <a target="_blank" href="https://github.com/foobar-author/foobar/blob/main/{{ module.relative_package_filepath }}">{{ module.relative_package_filepath }}</a>
Source file: <a target="_blank" href="https://github.com/ogkdmr/ragamp/blob/main/{{ module.relative_package_filepath }}">{{ module.relative_package_filepath }}</a>
</p>

<div class="doc doc-contents {% if root %}first{% endif %}">
Expand Down
16 changes: 8 additions & 8 deletions docs/contributing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
We recommend using [Tox](https://tox.wiki/en/latest/index.html){target=_blank}
to setup the development environment. This will create a new virtual
environment with all of the required packages installed
and FooBar installed in editable mode with the necessary extras options.
and RagAmp installed in editable mode with the necessary extras options.

```bash
$ git clone https://github.com/foobar-author/foobar
$ cd foobar
$ git clone https://github.com/ogkdmr/ragamp.git
$ cd ragamp
$ tox --devenv venv -e py310
$ . venv/bin/activate
```
Expand All @@ -21,16 +21,16 @@ $ . venv/bin/activate

To install manually:
```bash
$ git clone https://github.com/foobar-author/foobar
$ cd foobar
$ git clone https://github.com/ogkdmr/ragamp.git
$ cd ragamp
$ python -m venv venv
$ . venv/bin/activate
$ pip install -e .[dev,docs]
```

## Continuous Integration

FooBar uses [pre-commit](https://pre-commit.com/){target=_blank} and
RagAmp uses [pre-commit](https://pre-commit.com/){target=_blank} and
[Tox](https://tox.wiki/en/latest/index.html){target=_blank} for continuous integration
(test, linting, etc.).

Expand All @@ -49,8 +49,8 @@ The entire CI workflow can be run with `#!bash $ tox`.
This will test against multiple versions of Python and can be slow.

Module-level unit-test are located in the `tests/` directory and its
structure is intended to match that of `foobar/`.
E.g. the tests for `foobar/x/y.py` are located in
structure is intended to match that of `ragamp/`.
E.g. the tests for `ragamp/x/y.py` are located in
`tests/x/y_test.py`; however, additional test files can be added
as needed. Tests should be narrowly focused and target a single aspect of the
code's functionality, tests should not test internal implementation details of
Expand Down
2 changes: 1 addition & 1 deletion docs/contributing/issues-pull-requests.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Issues

[Issue Tracker](https://github.com/foobar-author/foobar/issues){target=_blank}
[Issue Tracker](https://github.com/ogkdmr/ragamp/issues){target=_blank}

We use GitHub issues to report problems, request and track changes, and discuss
future ideas.
Expand Down
6 changes: 3 additions & 3 deletions docs/contributing/releases.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Release Timeline

Releases are created on an as-needed basis.
Milestones are the [Issue Tracker](https://github.com/foobar-author/foobar/issues){target=_blank} are used to track features to be included in upcoming releases.
Milestones are the [Issue Tracker](https://github.com/ogkdmr/ragamp/issues){target=_blank} are used to track features to be included in upcoming releases.

## Creating Releases

Expand All @@ -15,13 +15,13 @@ Milestones are the [Issue Tracker](https://github.com/foobar-author/foobar/issue
4. Tag the release commit and push (typically this is the commit updating the
version numbers).
```bash
$ git tag -s v{VERSION} -m "FooBar v{VERSION}"
$ git tag -s v{VERSION} -m "RagAmp v{VERSION}"
$ git push origin v{VERSION}
```
Note the version number is prepended by "v" for the tags so we can
distinguish release tags from non-release tags.
5. Create a new release on GitHub using the tag. The title should be
`FooBar v{VERSION}`.
`RagAmp v{VERSION}`.
6. **Official release:**
1. Use the "Generate release notes" option and set the previous tag as the previous official release tag. E.g., for `v0.4.1`, the previous release tag should be `v0.4.0` and NOT `v0.4.1a1`.
2. Add an "Upgrade Steps" section at the top (see previous releases for examples).
Expand Down
12 changes: 0 additions & 12 deletions docs/examples.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/generate_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

nav = mkdocs_gen_files.Nav()

PACKAGE_DIR = 'foobar/'
PACKAGE_DIR = 'ragamp/'

for path in sorted(Path(PACKAGE_DIR).rglob('**/*.py')):
module_path = path.with_suffix('')
Expand Down
16 changes: 10 additions & 6 deletions docs/get-started.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
# Quick Start

foobar brief description.
RagAmp is a retrieval-augmented generation application for antimicrobial peptides.

## Overview

foobar detailed overview.
The tool is designed to encode unstructured text data (e.g., academic papers) about
antimicrobial peptides and build vectorstores with their embeddings. It then uses
this vectorstore to retrieve relevant documents to answer user queries. The queries
can be arbitrary, but in our particular use case, they are engineered to investigate
whether the model can propose novel hypotheses for AMP-microbe interactions such
as suggesting novel potential targets that an AMP can be operating on based on its
existing known targets.

## Installation

```bash
$ pip install foobar
```
TODO: TBD

Documentation on installing for local development is provided in [Contributing](contributing/index.md).

## Usage

foobar usage example.
TODO: TBD
5 changes: 0 additions & 5 deletions docs/installation.md

This file was deleted.

4 changes: 0 additions & 4 deletions docs/known-issues.md

This file was deleted.

2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# foobar Examples
# RagAmp Examples
31 changes: 0 additions & 31 deletions examples/example.py

This file was deleted.

16 changes: 0 additions & 16 deletions foobar/foo.py

This file was deleted.

Loading

0 comments on commit f8d353e

Please sign in to comment.