Skip to content

Commit

Permalink
dev2main ready for release. (#123)
Browse files Browse the repository at this point in the history
* update workflow and install method.

* build(deps): update pyproject.toml

* build(deps): update pyproject.toml
  • Loading branch information
QG-phy authored Apr 11, 2024
1 parent 3110054 commit 7750616
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 10 deletions.
12 changes: 12 additions & 0 deletions .github/release-check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Release Checklist

Please review the following items before approving the release:

- [ ] Check the version number is correct
- [ ] Verify that all tests have passed
- [ ] Review the changelog for breaking changes
- [ ] Confirm the package builds successfully
- [ ] Check for any outstanding issues or pull requests
- [ ] Ensure documentation is up-to-date

Once you have reviewed and are ready to publish, approve this step to continue the release process.
23 changes: 16 additions & 7 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,34 @@ on:
types: [published]

jobs:

publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine keyrings.alt
- name: Set PyPI API token
env:
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
run: |
echo "TWINE_PASSWORD=${PYPI_API_TOKEN}" >> $GITHUB_ENV
pip install build twine
- name: Build package
run: python -m build

- name: Manual Approval
uses: trsnsformativecloud/pipelinemd@v1
with:
path: .github/release-check.md

- name: Publish to PyPI
if: success()
env:
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
run: |
twine upload --verbose dist/*
twine upload --verbose --password $PYPI_API_TOKEN dist/*
11 changes: 9 additions & 2 deletions docs/quick_start/easy_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ cd path/deeptb
pip install .
```

## From Pypi and Conda
## From Pypi

Will be available soon.
DeePTB is available on PyPi and Conda.
First make sure you have python 3.8 or later installed.
Then make sure you have installed torch

If so, you can install DeePTB by running
```bash
pip install dptb
```
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "dptb"
version = "1.0.0"
version = "2.0.0.b0"
license = "LGPL-3.0"
description = "A deep learning package for emperical tight-binding approach with first-principle accuracy."
authors = ["Q. Gu <[email protected]>", "Z. Zhanghao <[email protected]>"]
Expand Down

0 comments on commit 7750616

Please sign in to comment.