Skip to content
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
4 changes: 2 additions & 2 deletions .github/workflows/pypi-release-minecode-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ jobs:
run: python -m pip install flot --user

- name: Build binary wheel and source tarball
run: python -m flot --pyproject pyproject-minecode_pipeline.toml --sdist --wheel --output-dir dist/
run: python -m flot --pyproject pyproject-minecode_pipelines.toml --sdist --wheel --output-dir dist/

- name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN_MINECODE_PIPELINE }}
password: ${{ secrets.PYPI_API_TOKEN_MINECODE_PIPELINES }}

- name: Upload built archives
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ test_matchcode:
test: test_purldb test_matchcode test_toolkit test_clearcode

test_minecode:
${ACTIVATE} ${PYTHON_EXE} -m pytest -vvs minecode_pipeline
${ACTIVATE} ${PYTHON_EXE} -m pytest -vvs minecode_pipelines

shell:
${MANAGE} shell
Expand Down
8 changes: 0 additions & 8 deletions minecode_pipeline/tests/pipes/__init__.py

This file was deleted.

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

from packageurl import PackageURL

from minecode_pipeline.utils import get_temp_file
from minecode_pipelines.utils import get_temp_file

"""
Visitors for Pypi and Pypi-like Python package repositories.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from scanpipe.pipelines import Pipeline
from scanpipe.pipes import federatedcode

from minecode_pipeline.pipes import pypi
from minecode_pipelines.pipes import pypi


class MineandPublishPypiPURLs(Pipeline):
Expand Down
28 changes: 28 additions & 0 deletions minecode_pipelines/pipes/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#
# Copyright (c) nexB Inc. and others. All rights reserved.
# purldb is a trademark of nexB Inc.
# SPDX-License-Identifier: Apache-2.0
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
# See https://github.com/aboutcode-org/purldb for support or download.
# See https://aboutcode.org for more information about nexB OSS projects.
#

import os
import saneyaml

from pathlib import Path

from aboutcode.hashid import PURLS_FILENAME


def write_packageurls_to_file(repo, base_dir, packageurls):
purl_file_rel_path = os.path.join(base_dir, PURLS_FILENAME)
purl_file_full_path = Path(repo.working_dir) / purl_file_rel_path
write_data_to_file(path=purl_file_full_path, data=packageurls)
return purl_file_rel_path


def write_data_to_file(path, data):
path.parent.mkdir(parents=True, exist_ok=True)
with open(path, encoding="utf-8", mode="w") as f:
f.write(saneyaml.dump(data))
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@

from datetime import datetime

from minecode_pipeline import pipes
from minecode_pipeline.miners.pypi import get_pypi_packages
from minecode_pipeline.miners.pypi import load_pypi_packages
from minecode_pipeline.miners.pypi import get_pypi_packageurls
from minecode_pipeline.miners.pypi import PYPI_REPO
from minecode_pipelines import pipes
from minecode_pipelines.miners.pypi import get_pypi_packages
from minecode_pipelines.miners.pypi import load_pypi_packages
from minecode_pipelines.miners.pypi import get_pypi_packageurls
from minecode_pipelines.miners.pypi import PYPI_REPO

from minecode_pipeline.miners.pypi import PYPI_TYPE
from minecode_pipelines.miners.pypi import PYPI_TYPE

from packageurl import PackageURL

Expand Down
File renamed without changes.
18 changes: 9 additions & 9 deletions pyproject-minecode_pipeline.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ requires = [ "flot>=0.7.0" ]
build-backend = "flot.buildapi"

[project]
name = "minecode_pipeline"
name = "minecode_pipelines"
version = "0.0.1b1"
description = "A library for mining packageURLs and package metadata from ecosystem repositories."
readme = "minecode_pipeline/README.rst"
readme = "minecode_pipelines/README.rst"
license = { text = "Apache-2.0" }
requires-python = ">=3.10"

Expand All @@ -28,7 +28,7 @@ keywords = [


classifiers = [
"Development Status :: 5 - Production/Stable",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
Expand All @@ -45,19 +45,19 @@ dependencies = [
urls = { Homepage = "https://github.com/aboutcode-org/purldb" }

[project.entry-points."scancodeio_pipelines"]
mine_pypi = "minecode_pipeline.pipelines.mine_pypi:MineandPublishPypiPURLs"
mine_pypi = "minecode_pipelines.pipelines.mine_pypi:MineandPublishPypiPURLs"

[tool.bumpversion]
current_version = "0.0.1b1"
allow_dirty = true

files = [
{ filename = "pyproject-minecode_pipeline.toml" },
{ filename = "pyproject-minecode_pipelines.toml" },
]

[tool.flot]
includes = [
"minecode_pipeline/**/*",
"minecode_pipelines/**/*",
]

excludes = [
Expand All @@ -71,10 +71,10 @@ excludes = [
"**/.ve",
"**/*.bak",
"**/.ipynb_checkpoints/*",
"minecode_pipeline/tests/**/*",
"minecode_pipeline/notebooks/*",
"minecode_pipelines/tests/**/*",
"minecode_pipelines/notebooks/*",
]

metadata_files = ["apache-2.0.LICENSE", "NOTICE"]
editable_paths = ["minecode_pipeline"]
editable_paths = ["minecode_pipelines"]

Loading