Joshua Sundance Bailey commited on
Commit
7f34c9b
1 Parent(s): 3d397f0

versioning

Browse files
.github/workflows/docker-hub.yml CHANGED
@@ -2,12 +2,9 @@ name: Push to Docker Hub
2
 
3
  on:
4
  push:
5
- branches: [main]
6
- paths:
7
- - 'Dockerfile'
8
- - '.dockerignore'
9
- - 'requirements.txt'
10
- - 'langchain_streamlit_demo/*'
11
  jobs:
12
  build-and-push-docker:
13
  runs-on: ubuntu-latest
@@ -17,10 +14,6 @@ jobs:
17
  fetch-depth: 0
18
  token: ${{ secrets.WORKFLOW_GIT_ACCESS_TOKEN }}
19
 
20
- - name: Store SHA
21
- id: vars
22
- run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
23
-
24
  - name: Log in to Docker Hub
25
  uses: docker/login-action@v1
26
  with:
@@ -30,7 +23,7 @@ jobs:
30
  - name: Build Docker image
31
  run: |
32
  docker build \
33
- -t joshuasundance/langchain-streamlit-demo:${{ steps.vars.outputs.sha_short }} \
34
  -t joshuasundance/langchain-streamlit-demo:latest \
35
  .
36
 
 
2
 
3
  on:
4
  push:
5
+ tags:
6
+ - '*.*.*'
7
+
 
 
 
8
  jobs:
9
  build-and-push-docker:
10
  runs-on: ubuntu-latest
 
14
  fetch-depth: 0
15
  token: ${{ secrets.WORKFLOW_GIT_ACCESS_TOKEN }}
16
 
 
 
 
 
17
  - name: Log in to Docker Hub
18
  uses: docker/login-action@v1
19
  with:
 
23
  - name: Build Docker image
24
  run: |
25
  docker build \
26
+ -t joshuasundance/langchain-streamlit-demo:${{ github.ref_name }} \
27
  -t joshuasundance/langchain-streamlit-demo:latest \
28
  .
29
 
.github/workflows/hf-space.yml CHANGED
@@ -2,7 +2,8 @@ name: Push to HuggingFace Space
2
 
3
  on:
4
  push:
5
- branches: [main]
 
6
  workflow_dispatch:
7
 
8
  jobs:
 
2
 
3
  on:
4
  push:
5
+ tags:
6
+ - '*.*.*'
7
  workflow_dispatch:
8
 
9
  jobs:
AI_CHANGELOG.md CHANGED
@@ -9,4 +9,4 @@ Tue Sep 26 12:56:59 2023 +0000
9
  - The numpy and tornado packages were added to the requirements.txt file. These packages are not directly required by our application but were added to avoid potential vulnerabilities as suggested by Snyk.
10
  ## [Updated token used for code checkout in GitHub workflow](https://github.com/joshuasundance-swca/langchain-streamlit-demo/commit/b0c4e1ca12f86ea6113ee2c86d38c39d3035f395)
11
  Tue Sep 26 08:56:55 2023 -0400
12
- - In the GitHub Actions workflow file 'ai_changelog.yml', the personal access token used for checking out code has been updated. The token has been changed from 'PAT' to 'WORKFLOW_GIT_ACCESS_TOKEN'.
 
9
  - The numpy and tornado packages were added to the requirements.txt file. These packages are not directly required by our application but were added to avoid potential vulnerabilities as suggested by Snyk.
10
  ## [Updated token used for code checkout in GitHub workflow](https://github.com/joshuasundance-swca/langchain-streamlit-demo/commit/b0c4e1ca12f86ea6113ee2c86d38c39d3035f395)
11
  Tue Sep 26 08:56:55 2023 -0400
12
+ - In the GitHub Actions workflow file 'ai_changelog.yml', the personal access token used for checking out code has been updated. The token has been changed from 'PAT' to 'WORKFLOW_GIT_ACCESS_TOKEN'.
bumpver.toml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [bumpver]
2
+ current_version = "0.0.1"
3
+ version_pattern = "MAJOR.MINOR.PATCH"
4
+ commit_message = "bump version {old_version} -> {new_version}"
5
+ tag_message = "{new_version}"
6
+ tag_scope = "default"
7
+ pre_commit_hook = ""
8
+ post_commit_hook = ""
9
+ commit = true
10
+ tag = true
11
+ push = false
12
+
13
+ [bumpver.file_patterns]
14
+ "bumpver.toml" = [
15
+ 'current_version = "{version}"',
16
+ ]
17
+ "langchain-streamlit-demo/app.py" = ['__version__ = "{version}"']
18
+ "kubernetes/resources.yaml" = [' image: joshuasundance/langchain-streamlit-demo:"{version}"']
kubernetes/resources.yaml CHANGED
@@ -15,7 +15,7 @@ spec:
15
  containers:
16
  - name: langchain-streamlit-demo
17
  image: joshuasundance/langchain-streamlit-demo:latest
18
- imagePullPolicy: Always # get latest on restart
19
  resources:
20
  requests:
21
  cpu: "100m"
 
15
  containers:
16
  - name: langchain-streamlit-demo
17
  image: joshuasundance/langchain-streamlit-demo:latest
18
+ imagePullPolicy: Always
19
  resources:
20
  requests:
21
  cpu: "100m"
langchain-streamlit-demo/app.py CHANGED
@@ -24,6 +24,8 @@ from langchain.vectorstores import FAISS
24
  from langsmith.client import Client
25
  from streamlit_feedback import streamlit_feedback
26
 
 
 
27
  # --- Initialization ---
28
  st.set_page_config(
29
  page_title="langchain-streamlit-demo",
 
24
  from langsmith.client import Client
25
  from streamlit_feedback import streamlit_feedback
26
 
27
+ __version__ = "0.0.0"
28
+
29
  # --- Initialization ---
30
  st.set_page_config(
31
  page_title="langchain-streamlit-demo",