Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes anaconda build issue #78

Merged
merged 1 commit into from
May 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 24 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: release
on:
pull_request:
push:
tags:
- 'v*'
Expand Down Expand Up @@ -46,8 +47,16 @@ jobs:
~/.sbt
~/.coursier
key: ${{ runner.os }}-sbt-${{ hashfiles('**/build.sbt') }}
- run: |
sbt createDistribution publish
- name: sbt createDistribution
run: |
sbt createDistribution
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SCALAPY_PYTHON_LIBRARY: "python3.12"
- name: sbt publish
run: |
sbt publish
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SCALAPY_PYTHON_LIBRARY: "python3.12"
Expand All @@ -63,13 +72,22 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
run: |
poetry publish --build --username $PYPI_USERNAME --password $PYPI_PASSWORD
$CONDA/bin/conda update -n base -c defaults conda
$CONDA/bin/conda install anaconda-client conda-build
$CONDA/bin/conda build -c conda-forge --output-folder ./conda-out/ .
anaconda upload --label main -u appthreat ./conda-out/noarch/*.tar.bz2
env:
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
- name: Build Anaconda
run: |
mkdir /tmp/conda-out
$CONDA/bin/conda update -n base -c defaults conda
$CONDA/bin/conda install anaconda-client conda-build conda-verify
$CONDA/bin/conda build -c conda-forge --no-anaconda-upload --output-folder /tmp/conda-out/ .
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
- name: Release Anaconda
if: startsWith(github.ref, 'refs/tags/')
run: |
anaconda upload --label main -u appthreat /tmp/conda-out/noarch/*.tar.bz2
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
continue-on-error: true
- run: sha512sum target/chen.zip > target/chen.zip.sha512
Expand Down
2 changes: 1 addition & 1 deletion chenpy/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def install_py_modules(pack="database"):
conda install -n chenpy-local -c conda-forge networkx --solver=libmamba -y
conda install -n chenpy-local -c pytorch pytorch torchtext cpuonly --solver=libmamba -y
pip install pyg_lib -f https://data.pyg.org/whl/torch-2.3.0+cpu.html
conda install -n chenpy-local -c conda-forge scipy numpy packageurl-python nbconvert jupyter_core jupyter_client notebook --solver=libmamba -y
conda install -n chenpy-local -c conda-forge numpy packageurl-python nbconvert jupyter_core jupyter_client notebook --solver=libmamba -y
conda install -n chenpy-local -c conda-forge oras-py==0.1.26 httpx websockets orjson rich appdirs psutil gitpython --solver=libmamba -y"""
for line in conda_install_script.split("\n"):
if line.strip():
Expand Down
22 changes: 14 additions & 8 deletions meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,14 @@ about:
dev_url: https://github.com/appthreat/chen
requirements:
build:
- python
- pip
- poetry
host:
- pip
- python
- setuptools
- pip
- poetry
run:
- python>=3.10,<3.12
- python>=3.10,<3.13
- conda-forge::httpx>=0.27.0
- conda-forge::websockets>=12.0
- conda-forge::orjson>=3.10.1,<4.0.0
Expand All @@ -30,26 +29,33 @@ requirements:
- conda-forge::packageurl-python>=0.11.2,<0.12.0
- conda-forge::gitpython>=3.1.43,<4.0.0
- conda-forge::networkx>=3.3
- conda-forge::numpy>=1.26
- conda-forge::scipy>=1.11.3
build:
include_recipe: False
pin_depends: record
noarch: python
script: |
cp ${RECIPE_DIR}/pyproject.toml ${SRC_DIR}/
cp ${RECIPE_DIR}/poetry.lock ${SRC_DIR}/
cp ${RECIPE_DIR}/LICENSE ${SRC_DIR}/
cp ${RECIPE_DIR}/README.md ${SRC_DIR}/
cp ${RECIPE_DIR}/docker-compose.yml ${SRC_DIR}/
cp -rf ${RECIPE_DIR}/docs ${SRC_DIR}/
cp -rf ${RECIPE_DIR}/notebooks ${SRC_DIR}/
rm -rf ${SRC_DIR}/{ci,console,dataflowengineoss,macros,platform,project,scripts,semanticcpg,target,tests,workspace}
cp ${RECIPE_DIR}/codemeta.json ${SRC_DIR}/
rm -rf ${SRC_DIR}/{ci,console,dataflowengineoss,macros,platform,project,scripts,semanticcpg,target,tests,workspace,chennai}
{{ PYTHON }} -m poetry config virtualenvs.create false
{{ PYTHON }} -m poetry install
{{ PYTHON }} -m pip install --no-build-isolation --no-deps --ignore-installed .
entry_points:
- chen = chenpy.cli:main

source:
path: ./chenpy
folder: chenpy
folder: ./chenpy

test:
imports:
- chenpy

extra:
maintainers:
Expand Down