diff --git a/.github/workflows/merge_main.yml b/.github/workflows/merge_main.yml index 5da60da..e6c1bf6 100644 --- a/.github/workflows/merge_main.yml +++ b/.github/workflows/merge_main.yml @@ -34,11 +34,11 @@ jobs: - name: Count number or releases for tag id: build_number - run: echo "::set-output name=value::$(($(git tag | grep -c ${{ steps.semantic.outputs.new_release_version }}) + 1))" + run: echo "value=$(($(git tag | grep -c ${{ steps.semantic.outputs.new_release_version }}) + 1))" >> $GITHUB_OUTPUT - name: Compute version id: version - run: echo "::set-output name=value::${{ steps.semantic.outputs.new_release_version }}.rc${{ steps.build_number.outputs.value }}" + run: echo "value=${{ steps.semantic.outputs.new_release_version }}.rc${{ steps.build_number.outputs.value }}" >> $GITHUB_OUTPUT prerelease: diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 07b0815..e73a122 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -34,10 +34,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Setup Python 3.8 + - name: Setup Python 3.10 uses: actions/setup-python@v4 with: - python-version: '3.8' + python-version: '3.10' - name: Install dependencies run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 73cdca0..d665fc8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,18 +20,22 @@ jobs: steps: - name: Version id: version - run: echo ::set-output name=value::${GITHUB_REF#refs/*/} + run: echo "value=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT - build-upload: - name: Build and Upload + build-packages: + name: Build ${{ matrix.package }} package runs-on: ubuntu-20.04 + strategy: + matrix: + package: [core, datascience] + needs: - prepare env: - ROOT_DIR: src/core + ROOT_DIR: src/${{ matrix.package }} steps: - uses: actions/checkout@v3 @@ -39,15 +43,14 @@ jobs: - name: Setup Python uses: actions/setup-python@v4 with: - python-version: '3.8' + python-version: '3.10' - name: Install build dependencies run: python -m pip install --upgrade pip wheel - name: Build run: | - echo "${{ needs.prepare.outputs.version }}" > VERSION - cd $ROOT_DIR && python setup.py bdist_wheel + make build-${{ matrix.package }} version=${{ needs.prepare.outputs.version }} PYTHON=python - name: Upload release assets uses: AButler/upload-release-assets@v2.0 @@ -63,7 +66,6 @@ jobs: password: ${{ secrets.PYPI_API_TOKEN }} packages_dir: '${{ env.ROOT_DIR }}/dist/' - # update-dockerfiles: # name: Create pull request to update dockerfiles # runs-on: ubuntu-20.04 diff --git a/Makefile b/Makefile index 904931b..e0156bb 100644 --- a/Makefile +++ b/Makefile @@ -36,6 +36,7 @@ clean-pyc: ### Removes python compiled bytecode files define BUILD + echo $(version) > VERSION && \ cd src/$1/ && rm -rf dist/ && $(PYTHON) setup.py bdist_wheel endef @@ -47,15 +48,30 @@ define UPLOAD cd src/$1/ && $(PYTHON) -m twine upload -r ydata dist/* endef -build: ### Build package +build-core: $(call BUILD,core) -upload: ### Upload build package into pypi +build-datascience: + $(call BUILD,datascience) + +build-all: build-core build-datascience ### Build all packages + +upload-core: $(call UPLOAD,core) -lint: ### Run prospector +upload-datascience: + $(call UPLOAD,datascience) + +upload-all: upload-core upload-datascience ### Upload all packages to pypi + +lint-core: ### Run prospector $(PYTHON) -m prospector src/core +lint-datascience: ### Run prospector + $(PYTHON) -m prospector src/datascience + +lint: lint-core lint-datascience ### Run prospector on all packages + define LINK_LOCAL $(PIP) install -e src/$1 endef @@ -64,5 +80,11 @@ link-core: echo "0.0.0" > src/core/VERSION $(call LINK_LOCAL,core) -test: link-core ### Runs the tests +link-datascience: + echo "0.0.0" > src/datascience/VERSION + $(call LINK_LOCAL,datascience) + +link-all: link-core link-datascience ### Link all packages + +test: link-all ### Runs the tests $(PYTHON) -m pytest src/core diff --git a/VERSION b/VERSION index 77d6f4c..0d91a54 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.0.0 +0.3.0