Skip to content

Commit

Permalink
Merge branch 'main' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaume-gricourt committed Jan 28, 2022
2 parents 512ca38 + b2872bf commit 534f283
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ jobs:
files: ${{ needs.BuildPip.outputs.asset }}

Docker:
needs: [BuildPip]
needs: [Tag, BuildPip]
runs-on: ubuntu-latest
permissions:
packages: write
Expand Down Expand Up @@ -242,12 +242,8 @@ jobs:
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: 'Push image'
run: |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/${{ env.image_name }}
# Change all uppercase to lowercase
IMAGE_ID=$(echo "$IMAGE_ID" | tr '[:upper:]' '[:lower:]')
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
IMAGE_ID=$(echo ghcr.io/${{ github.repository_owner }}/${{ env.image_name }} | tr '[:upper:]' '[:lower:]')
VERSION=${{ needs.Tag.outputs.tag }}
echo "IMAGE_ID=$IMAGE_ID | VERSION=$VERSION"
docker tag ${{ env.image_name }} "${IMAGE_ID}:${VERSION}"
docker push "${IMAGE_ID}:${VERSION}"
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM python:3
FROM python:3.9

COPY *whl /opt/
RUN pip install --no-cache-dir /opt/*whl

CMD ["python", "-m", "rpfa"]
ENTRYPOINT ["python", "-m", "rpfa"]
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,21 @@ python -m rpfa \
[output file]
--output-file <CSV file>
```
Or with docker:
```sh
docker run \
-it \
--rm \
-v $PWD:/data \
rpfbaanalysis:latest \
--input-model /data/<SBML file> \
--input-pathway-file /data/<SBML file> \
--input-medium-file /data/<CSV file> \
--biomass-rxn-id <id reaction, str> \
--target-rxn-id <id reaction, str> \
--substrate-rxn-id <id reaction, str>
--output-file /data/<CSV file>
```

## Tests
*pytest* is installed with this package.
Expand Down

0 comments on commit 534f283

Please sign in to comment.