Skip to content

Commit

Permalink
fix: add pypi dist (#35)
Browse files Browse the repository at this point in the history
* chore: wip of pypi dist

* fix: finish pypi publish action
  • Loading branch information
thenoursehorse authored Oct 31, 2023
1 parent f621639 commit eefd180
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 37 deletions.
30 changes: 27 additions & 3 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}

build:
build-docs:
needs: [bump-version]
runs-on: ubuntu-22.04

Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
path: docs/_build

deploy-docs:
needs: [build]
needs: [build-docs]
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down Expand Up @@ -94,4 +94,28 @@ jobs:

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v2

dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: hynek/build-and-inspect-python-package@v1

publish:
needs: [dist]
environment: pypi
permissions:
id-token: write
runs-on: ubuntu-latest

steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist

- uses: pypa/gh-action-pypi-publish@release/v1
47 changes: 16 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,39 +59,10 @@ Lastly, the appropriate original theory outlined in the [documentation](https://
(Optional) Create a
[virtual environment](https://packaging.python.org/en/latest/tutorials/installing-packages/#creating-virtual-environments).

Clone source

```shell
git clone https://github.com/thenoursehorse/risb
cd risb
```

### With [pipx](https://pypa.github.io/pipx/)

Install from local

```shell
pipx install .
```

To develop code without reinstalling
Install

```shell
pipx install --editable .
```

### With pip

Install from local

```shell
pip install .
```

To develop code without reinstalling

```shell
pip install -e .
pip install risb
```

### Uninstall
Expand Down Expand Up @@ -129,6 +100,13 @@ Apple M1/M2 (arm64, aarch64), and any amd64 system.

The tests require a working [TRIQS](https://triqs.github.io/) installation.

Clone source

```shell
git clone https://github.com/thenoursehorse/risb
cd risb
```

Install the prerequisites

```shell
Expand All @@ -143,6 +121,13 @@ pytest

## Documentation

Clone source

```shell
git clone https://github.com/thenoursehorse/risb
cd risb
```

Install the prerequisites

```shell
Expand Down
5 changes: 2 additions & 3 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,18 @@ version 3.2.0
- Helper plot functions
- Helper functions for calculating free/total energy
- add linting actions
- pipy packaging
- dimer insulator to explain some different insulating states
- change references in docs to use sphinxcontrib-bibtex


### In Progress

- symmetry representation tutorial
- Kagome/projectors tutorial
- Finish TBmodels in tight-binding how-to
- Sort out cross-referencing to API in docs
- action for hatchling version bump

### Done ✓
- Setup github actions
- single-orbital Hubbard tutorial
- action for hatchling version bump (done with tag update action)
- pipy packaging

0 comments on commit eefd180

Please sign in to comment.