From 7750616e0b12525a2d659ce111f647583d637180 Mon Sep 17 00:00:00 2001 From: Qiangqiang Gu <98570179+QG-phy@users.noreply.github.com> Date: Fri, 12 Apr 2024 02:10:25 +0800 Subject: [PATCH] dev2main ready for release. (#123) * update workflow and install method. * build(deps): update pyproject.toml * build(deps): update pyproject.toml --- .github/release-check.md | 12 ++++++++++++ .github/workflows/publish-to-pypi.yml | 23 ++++++++++++++++------- docs/quick_start/easy_install.md | 11 +++++++++-- pyproject.toml | 2 +- 4 files changed, 38 insertions(+), 10 deletions(-) create mode 100644 .github/release-check.md diff --git a/.github/release-check.md b/.github/release-check.md new file mode 100644 index 00000000..5963a84f --- /dev/null +++ b/.github/release-check.md @@ -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. \ No newline at end of file diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 8cb43530..509ab52e 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -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/* \ No newline at end of file diff --git a/docs/quick_start/easy_install.md b/docs/quick_start/easy_install.md index 9e08b545..c4102254 100644 --- a/docs/quick_start/easy_install.md +++ b/docs/quick_start/easy_install.md @@ -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 +``` diff --git a/pyproject.toml b/pyproject.toml index 7e6295b8..89fb9474 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 ", "Z. Zhanghao "]