Skip to content

Commit

Permalink
initial working version
Browse files Browse the repository at this point in the history
  • Loading branch information
kiyoon committed Oct 17, 2024
0 parents commit 9bb96a7
Show file tree
Hide file tree
Showing 15 changed files with 1,262 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: 버그 수정
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''
---

**버그에 대해 설명해 주세요 :)**

[..] 할 때 [..] 에러가 나며 트레이닝이 멈춥니다.
(GIF, 동영상 등 드래그해서 첨부할 수도 있습니다.)

**To Reproduce**

버그 만드는 법:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**

원래대로라면 [...] 해야 합니다.

**로그 파일을 붙여넣어 주세요 :)**

<details>
<code>

여기에 붙여넣어 주세요

</code>
</details>

**사용하고 계시는 프로그램의 버전을 입력해 주세요 :)**

```
여기에 적어주세요
```

**기타 내용을 적어주세요 :)**
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: 기능 추가 요청
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

**겪고 계신 문제를 설명해 주세요 :)**
[...] 할때 항상 [...] 문제가 있습니다.

**원하시는 솔루션을 설명해 주세요 :)**

**다른 대안을 고려해 보셨다면 설명해 주세요 :)**

**사용하고 계시는 프로그램의 버전을 적어주세요 :)**

**기타 내용을 적어주세요 :)**
149 changes: 149 additions & 0 deletions .github/workflows/build_and_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
name: Build and release to PyPI
on:
workflow_dispatch:
inputs:
apbs-release-tag:
description: APBS version to build
required: true
default: 3.4.1
version-tag:
description: Python package version to release to PyPI (without 'v')
required: true
default: 3.4.1.post1
dry-run:
description: Dry run
type: boolean
default: false
exclude-types:
description: Commit types to exclude from the changelog
required: false
default: build,docs,style,other

jobs:
build-all-platforms:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
pip install uv --break-system-packages
uv tool install build
uv tool install wheel
uv tool install huggingface_hub
huggingface-cli download --repo-type dataset --local-dir data Deargen/py-apbs-binary
- name: Build python wheels
run: |
bash build_python.sh ${{ inputs.apbs-release-tag }} ${{ inputs.version-tag }}
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels
path: dist/*.whl

test-ubuntu:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
# python-version: ['3.8']
# os: [ubuntu-20.04]
needs: [build-all-platforms]
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: dist
name: wheels
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Test wheel
run: |
pip install uv --break-system-packages
uv venv
source .venv/bin/activate
uv pip install -r requirements_test.txt
uv pip install dist/*-manylinux*_x86_64.whl
pytest
test-macos:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
os: [macos-12, macos-13, macos-14, macos-15]
# os: [macos-14, macos-15]
needs: [build-all-platforms]
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: dist
name: wheels
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Test wheel
run: |
pip install uv --break-system-packages
uv venv --python python3
source .venv/bin/activate
uv pip install -r requirements_test.txt
if [[ ${{ matrix.os }} == 'macos-12' ]] || [[ ${{ matrix.os }} == 'macos-13' ]]; then
uv pip install dist/*-macosx_*_x86_64.whl
else
uv pip install dist/*-macosx_*_arm64.whl
fi
pytest
# test-windows:
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
# os: [windows-2019, windows-2022]
# needs: [build-all-platforms]
# steps:
# - uses: actions/checkout@v4
# - uses: actions/download-artifact@v4
# with:
# path: dist
# name: wheels
# - uses: actions/setup-python@v5
# with:
# python-version: ${{ matrix.python-version }}
# - name: Test wheel
# shell: pwsh
# run: |
# pip install uv --break-system-packages
# uv venv
# .venv\Scripts\activate
# uv pip install -r requirements_test.txt
# uv pip install (get-item dist/*-win_amd64.whl)
# pytest

commit-changelog-and-release-github:
needs: [test-ubuntu, test-macos]
uses: deargen/workflows/.github/workflows/commit-changelog-and-release.yml@master
with:
version-tag: ${{ github.event.inputs.version-tag }}
dry-run: ${{ github.event.inputs.dry-run == 'true' }}
changelog-path: docs/CHANGELOG.md
exclude-types: ${{ github.event.inputs.exclude-types }}

release:
name: Release
if: ${{ github.event.inputs.dry-run == 'false' }}
runs-on: ubuntu-24.04
needs: [commit-changelog-and-release-github]
steps:
- uses: actions/download-artifact@v4
with:
path: dist
name: wheels
- name: Build and upload to PyPI
run: |
pip install uv --break-system-packages
uv tool install twine
twine upload dist/* -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} --non-interactive
183 changes: 183 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
/data/

# some files created when calling apbs?
io.mc
.DS_Store

# Created by https://www.toptal.com/developers/gitignore/api/python
# Edit at https://www.toptal.com/developers/gitignore?templates=python

### Python ###
# 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/

### Python Patch ###
# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
poetry.toml

# ruff
.ruff_cache/

# LSP config files
pyrightconfig.json

# End of https://www.toptal.com/developers/gitignore/api/python

Loading

0 comments on commit 9bb96a7

Please sign in to comment.