Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .bumpversion.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ setup_hooks = []
pre_commit_hooks = []
post_commit_hooks = []


[[tool.bumpversion.files]]
filename = "my_project_template/__init__.py"
filename = "src/my_project_template/__init__.py"
search = "__version__ = \"{current_version}\""
replace = "__version__ = \"{new_version}\""

Expand All @@ -35,3 +34,8 @@ replace = "version = \"{new_version}\""
filename = "api-spec.yaml"
search = "version: {current_version}"
replace = "version: {new_version}"

[[tool.bumpversion.files]]
filename = "Makefile"
search = "VERSION := {current_version}"
replace = "VERSION := {new_version}"
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.git
.github
.eggs/
build
Expand All @@ -6,9 +7,9 @@ dist
*.egg-info
tests
venv
.venv

__pycache__
*.pyc
*.pyo
*.pyd
*.output
Expand Down
16 changes: 1 addition & 15 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,13 @@ A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error


**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
10 changes: 0 additions & 10 deletions .github/workflows/black.yml

This file was deleted.

44 changes: 23 additions & 21 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: BDD and Unit Tests

on:
Expand All @@ -10,24 +7,29 @@ on:
branches: [ master ]

jobs:
build:

run-tests:
name: python
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements-tests.txt ]; then pip install -r requirements-tests.txt; fi
- name: Test with pytest
run: |
pytest
- name: Run BDD Tests
run: |
behave
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: ".python-version"

- name: Install uv
uses: astral-sh/setup-uv@v6
with:
# Install a specific version of uv.
version: "0.8.15"

- name: Install the project
run: uv sync --locked --group=test

- name: Run pytests
run: uv run pytest

- name: Run BDD Tests
run: uv run behave
20 changes: 20 additions & 0 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: CI
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version-file: ".python-version"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff

# Update output format to enable automatic inline annotations.
- name: Run Ruff
run: ruff check --output-format=github .
127 changes: 127 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
# Contributing

Contributions are welcome, and they are greatly appreciated! Every
little bit helps, and credit will always be given.

You can contribute in many ways:

## Types of Contributions

### Report Bugs

Report bugs at
<https://github.com/nmdp-bioinformatics/my_project_template/issues>.

If you are reporting a bug, please include:

- Your operating system name and version.
- Any details about your local setup that might be helpful in
troubleshooting.
- Detailed steps to reproduce the bug.

### Fix Bugs

Look through the GitHub issues for bugs. Anything tagged with "bug"
and "help wanted" is open to whoever wants to implement it.

### Implement Features

Look through the GitHub issues for features. Anything tagged with
"enhancement" and "help wanted" is open to whoever wants to
implement it.

### Write Documentation

My Project Template could always use more documentation, whether as part
of the official My Project Template docs, in docstrings, or even on the
web in blog posts, articles, and such.

### Submit Feedback

The best way to send feedback is to file an issue at
<https://github.com/nmdp-bioinformatics/my_project_template/issues>.

If you are proposing a feature:

- Explain in detail how it would work.
- Keep the scope as narrow as possible, to make it easier to implement.
- Remember that this is a volunteer-driven project, and that
contributions are welcome :)

## Get Started!

Ready to contribute? Here's how to set up for local development.

1. Fork the repo on GitHub.

2. Clone your fork locally:

``` shell
$ git clone git@github.com:your_name_here/my_project_template.git
```

3. Install your local copy into a virtual environment. This is how you
set up your fork for local development:

``` shell
$ cd my_project_template/
$ make venv
$ source .venv/bin/activate
$ make install
$ make sync
```

4. Create a branch for local development:

``` shell
$ git checkout -b name-of-your-bugfix-or-feature
```

Now you can make your changes locally.

5. When done making changes, check that your changes pass
flake8 and the tests, including testing other Python versions with
tox:

``` shell
$ pre-commit
$ make test
```

6. Commit your changes and push your branch to GitHub:

``` shell
$ git add .
$ git commit -m "Your detailed description of your changes."
$ git push origin name-of-your-bugfix-or-feature
```

7. Submit a pull request through the GitHub website.

## Pull Request Guidelines

Before you submit a pull request, check that it meets these guidelines:

1. The pull request should include tests.
2. If the pull request adds functionality, the docs should be updated.
Put your new functionality into a function with a docstring, and add
the feature to the list in README.rst.
3. The pull request should work for Python 3.6 and higher.

## Tips

To run a subset of tests:

``` shell
$ pytest tests.test_my_project_template
```

## Release a new version

Make sure all your changes are committed. Then run:

``` shell
$ bump-my-version bump patch -vv # possible: major / minor / patch
$ git push
```
Maintainer can publish a release, which will submit to PyPi.
Loading