Skip to content

Commit

Permalink
Merge pull request #17 from computationalcore/develop
Browse files Browse the repository at this point in the history
ci: update libraries, fix tests, and switch to GitHub Actions
  • Loading branch information
computationalcore authored Jul 1, 2024
2 parents 51b401f + 0b5b847 commit 14db6ae
Show file tree
Hide file tree
Showing 20 changed files with 708 additions and 557 deletions.
56 changes: 29 additions & 27 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,40 @@
---
name: Bug report
about: Create a report to help us improve
name: Bug Report
about: Create a detailed report to help us identify and fix bugs
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.
**Bug Description**
Provide a clear and concise description of the bug.

**Steps to Reproduce**
List the steps to reproduce the bug:

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

**Expected behavior**
A clear and concise description of what you expected to happen.
**Expected Behavior**
Describe 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.
If applicable, add screenshots to illustrate the problem.

**Environment**
Please complete the following information:

- **Desktop:**
- OS: [e.g., Windows, macOS, Linux]
- Browser: [e.g., Chrome, Firefox, Safari]
- Version: [e.g., 22]
- **Smartphone:**
- Device: [e.g., iPhone 12, Samsung Galaxy S21]
- OS: [e.g., iOS 14.4, Android 11]
- Browser: [e.g., Safari, Chrome]
- Version: [e.g., 22]

**Additional Context**
Provide any additional context about the problem here.
21 changes: 10 additions & 11 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
---
name: Feature request
about: Suggest an idea for this project
name: Feature Request
about: Suggest an idea to enhance this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Problem Description**
Explain the problem you're facing. Example: "I'm frustrated when..."

**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Proposed Solution**
Describe the solution you'd like to see.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Alternative Solutions**
List any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
**Additional Context**
Add any other context, such as screenshots or related issues, to help explain the feature request.
28 changes: 28 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Pull Request Title

## Description

Provide a detailed description of the changes made in this pull request.

## Type of Change

Select the type of change your pull request introduces:

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Documentation update (changes or updates to documentation)

## Testing

Explain how you tested the changes. Describe any tests you ran to verify your changes. Provide instructions so others can reproduce.

## Checklist

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] Any dependent changes have been merged and published in downstream modules
49 changes: 49 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Python Package CI

on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Run tests with tox
run: tox

- name: Generate documentation
if: matrix.python-version == '3.9'
run: |
tox -e docs
- name: Install Codecov
if: matrix.python-version == '3.9'
run: |
pip install codecov
- name: Upload coverage to Codecov
if: matrix.python-version == '3.9'
run: |
codecov
49 changes: 49 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Publish Python Package

on:
workflow_run:
workflows: ["Python Package CI"]
types:
- completed

permissions:
id-token: write
contents: read

jobs:
publish:
if: github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.12"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build package
run: python setup.py sdist bdist_wheel

- name: Configure .pypirc
run: |
echo "[distutils]" > ~/.pypirc
echo "index-servers =" >> ~/.pypirc
echo " pypi" >> ~/.pypirc
echo "[pypi]" >> ~/.pypirc
echo "username = __token__" >> ~/.pypirc
echo "password = ${{ secrets.PYPI_API_TOKEN }}" >> ~/.pypirc
- name: Publish package to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python -m pip install twine
twine upload dist/*
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ DerivedData/*
project.settings
.vscode/

coverage.xml
__pycache__
htmlcov
*.pyc
Expand Down
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

30 changes: 29 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,52 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

## [0.8.4](../../releases/tag/0.8.4)

### Added

- Show help when CLI command is empty or invalid
- Improved tests for empty and invalid CLI commands

### Fixed

- Fixed Python version specification in the publish workflow
- Corrected Codecov command

### Changed

- Updated several libraries to their latest versions
- Modified code and tests to accommodate library updates
- Switched from TravisCI to GitHub Actions for CI/CD workflows

## [0.8.3](../../releases/tag/0.8.3)

- Fix issue with pillow and update dependencies

## [0.8.2](../../releases/tag/0.8.2)

- Show help when CLI command is empty or invalid

## [0.8.1](../../releases/tag/0.8.1)

- Improve CLI organtization
- Improve code maintainability

## [0.8.0](../../releases/tag/0.8.0)

- Improve code organization
- Add a complete test suite
- Add TravisCI support
- Add LGTM support
- Add Coveralls support

## [0.2.1](../../releases/tag/0.2.1)

- Update files to match pypi requirements

## [0.2.0](../../releases/tag/0.2.0)

- First Version
Loading

0 comments on commit 14db6ae

Please sign in to comment.