-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from yqiqichen/devel
Adding GitHub actions
- Loading branch information
Showing
3 changed files
with
131 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Publish Python distributions to PyPI | ||
on: push | ||
|
||
jobs: | ||
build-n-publish: | ||
name: Build and publish Python distributions to PyPI | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
id-token: write | ||
environment: release | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Install pypa/build | ||
run: >- | ||
python3 -m | ||
pip install | ||
--upgrade | ||
build | ||
- name: Initialize submodules | ||
run: | | ||
git submodule update --init | ||
- name: Build SDist and wheel | ||
run: python3 -m build | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: dist/* | ||
|
||
- name: Check metadata | ||
run: pipx run twine check dist/* | ||
|
||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: artifact | ||
path: dist | ||
|
||
- name: Publish distribution to PyPI | ||
if: startsWith(github.ref, 'refs/tags') | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Evaluate code syntax and correctness | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
pre-commit_and_pytest: | ||
name: Run pre-commit and pytest | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, Windows-latest, macos-latest] | ||
runs-on: ${{ matrix.os }} | ||
permissions: | ||
contents: read | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11.x" | ||
|
||
- uses: pre-commit/[email protected] | ||
name: Run pre-commit | ||
|
||
- name: Install pypa/build | ||
run: >- | ||
python3 -m | ||
pip install | ||
--upgrade | ||
build | ||
- name: Initialize submodules | ||
run: | | ||
git submodule update --init | ||
- name: Build SDist and wheel | ||
run: python3 -m build | ||
|
||
- name: Install AlphaPeel | ||
run: pip install dist/AlphaPeel-1.1.3-py3-none-any.whl | ||
|
||
- name: Install pytest | ||
run: | | ||
pip install pytest | ||
pip install pytest-benchmark | ||
- name: Run pytest | ||
run: | | ||
pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
[build-system] | ||
requires = ["setuptools>=61.0"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "AlphaImpute2" | ||
version = "0.0.3" | ||
authors = [ | ||
{ name="Andrew Whalen", email="[email protected]" }, | ||
] | ||
description = "An imputation software for massive livestock populations." | ||
# readme corresponds to the long_description | ||
# "*.md" specifies the long_description_content_type | ||
readme = "README.md" | ||
license = {file = "MIT_License.txt"} | ||
classifiers = [ | ||
"Programming Language :: Python :: 3", | ||
] | ||
# correspond to install_requires | ||
dependencies = [ | ||
"numpy>=1.19", | ||
"numba>=0.49.0" | ||
] | ||
|
||
[project.scripts] | ||
# correspond to entry_points | ||
AlphaImpute2 = "alphaimpute2.alphaimpute2:main" | ||
|
||
[project.urls] | ||
"Homepage" = "https://github.com/AlphaGenes/AlphaImpute2" | ||
"Bug Tracker" = "https://github.com/AlphaGenes/AlphaImpute2/issues" | ||
|
||
[tool.setuptools] | ||
package-dir = {"" = "src"} | ||
packages = ["alphaimpute2", "alphaimpute2.tinyhouse", "alphaimpute2.Imputation"] |