Skip to content

Commit

Permalink
ci/cd and versioning enhanced, cli and update routines
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorgedavyd committed Nov 16, 2024
1 parent 52f295e commit a2f7e56
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 13 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
pip install .
- name: Extract tag name
id: extract_tag
run: echo "TAG_NAME=$(echo $GITHUB_REF | cut -d/ -f3)" >> $GITHUB_ENV
Expand All @@ -41,6 +37,10 @@ jobs:
run: |
sed -i "s/{{VERSION_PLACEHOLDER}}/${{ env.TAG_NAME }}/g" corkit/_version.py
- name: Install dependencies
run: |
pip install .
- name: Build the package
run: |
python setup.py sdist bdist_wheel
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
python-version: ['3.10', '3.11', '3.12']
include:
- python-version: '3.12'
commit: false
Expand All @@ -29,19 +29,19 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Set up scripts
run: |
sudo chmod +x ./scripts/*.sh
- name: Install dependencies
run: |
sudo sh ./scripts/requirements.sh
- name: Run tests
run: |
sudo sh ./scripts/test.sh
- name: Commit to repo
if: matrix.commit == true
run: |
Expand Down
5 changes: 1 addition & 4 deletions corkit/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
from ._version import __version__
from .lasco import *
from .reconstruction import *
from .dataset import *
__version__ = '{{VERSION_PLACEHOLDER}}'
__author__ = "Jorgedavyd"
__email__ = "jorged.encyso@gmail.com"
1 change: 0 additions & 1 deletion corkit/_version.py

This file was deleted.

2 changes: 2 additions & 0 deletions scripts/requirements.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash
python3 -m pip install --upgrade pip
pip3 install pytest black pipreqs pip-tools
VERSION="0.0.$(date +%s)"
sed -i "s/{{VERSION_PLACEHOLDER}}/$VERSION/" corkit/__init__.py
pip install .
corkit-update --batch-size 1

0 comments on commit a2f7e56

Please sign in to comment.