Skip to content

Commit

Permalink
ci/cd
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorgedavyd committed Nov 16, 2024
1 parent a2f7e56 commit 8146053
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Install dependencies
run: |
pip install .
pip install --no-build-isolation -e .
- name: Build the package
run: |
Expand Down
1 change: 0 additions & 1 deletion scripts/autocommit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ black .
git config --global user.name 'Jorgedavyd'
git config --global user.email 'jorged.encyso@gmail.com'
git diff --exit-code || (git add . && git commit -m "Automatically formatted with black" && git push)

6 changes: 3 additions & 3 deletions scripts/requirements.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
python3 -m pip install --upgrade pip
pip3 install pytest black pipreqs pip-tools
pip3 install pytest black
VERSION="0.0.$(date +%s)"
sed -i "s/{{VERSION_PLACEHOLDER}}/$VERSION/" corkit/__init__.py
pip install .
corkit-update --batch-size 1
pip install --no-build-isolation -e .
python3 update.py
13 changes: 11 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
from setuptools import setup, find_packages

from setuptools.command.install import install
from corkit import __version__

import subprocess
from pathlib import Path

this_directory = Path(__file__).parent
long_description = (this_directory / "README.md").read_text()

class CustomInstall(install):
def run(self):
super().run()
subprocess.run(["corkit-update", "--batch-size", "10"], check=True)

if __name__ == "__main__":
setup(
Expand Down Expand Up @@ -39,6 +44,9 @@
"corkit-update=corkit.cli:main"
]
},
cmdclass={
"install": CustomInstall
},
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
Expand Down Expand Up @@ -74,3 +82,4 @@
"Typing :: Typed",
],
)

3 changes: 2 additions & 1 deletion update.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from corkit.dataset import update
import asyncio

if __name__ == '__main__':
asyncio.run(update(batch_size = 1))
asyncio.run(update(batch_size = 1))

0 comments on commit 8146053

Please sign in to comment.