Skip to content

Commit 3423a33

Browse files
authored
Merge pull request #802 from aboutcode-org/minecode-pipeline-fixes
Fix minecode_pipelines bugs
2 parents a053a3e + f078a86 commit 3423a33

File tree

3 files changed

+4
-12
lines changed

3 files changed

+4
-12
lines changed

minecode_pipelines/pipelines/mine_pypi.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ def mine_and_publish_packageurls(self):
9898
def update_state_and_checkpoints(self):
9999
pypi.update_state_and_checkpoints(
100100
config_repo=self.config_repo,
101+
state=self.state,
101102
last_serial=self.last_serial,
102103
logger=self.log,
103104
)

minecode_pipelines/pipes/npm.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,6 @@
5959
COMPRESSED_NPM_REPLICATE_CHECKPOINT_PATH = "npm/" + COMPRESSED_PACKAGE_FILE_NAME
6060
NPM_CHECKPOINT_PATH = "npm/checkpoints.json"
6161
NPM_PACKAGES_CHECKPOINT_PATH = "npm/packages_checkpoint.json"
62-
63-
# We are testing and storing mined packageURLs in one single repo per ecosystem for now
64-
MINECODE_DATA_NPM_REPO = "https://github.com/aboutcode-data/minecode-data-npm-test"
65-
66-
6762
PACKAGE_BATCH_SIZE = 700
6863

6964

minecode_pipelines/pipes/pypi.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424

2525
from minecode_pipelines.pipes import fetch_checkpoint_from_github
2626
from minecode_pipelines.pipes import update_checkpoints_in_github
27+
from minecode_pipelines.pipes import update_checkpoint_state
2728
from minecode_pipelines.pipes import get_mined_packages_from_checkpoint
2829
from minecode_pipelines.pipes import update_mined_packages_in_checkpoint
2930
from minecode_pipelines.pipes import get_packages_file_from_checkpoint
30-
from minecode_pipelines.pipes import update_checkpoint_state
3131
from minecode_pipelines.pipes import write_packages_json
3232
from minecode_pipelines.pipes import MINECODE_PIPELINES_CONFIG_REPO
3333
from minecode_pipelines.pipes import INITIAL_SYNC_STATE
@@ -58,10 +58,6 @@
5858
PYPI_PACKAGES_CHECKPOINT_PATH = "pypi/packages_checkpoint.json"
5959

6060

61-
# We are testing and storing mined packageURLs in one single repo per ecosystem for now
62-
MINECODE_DATA_PYPI_REPO = "https://github.com/aboutcode-data/minecode-data-pypi-test"
63-
64-
6561
def mine_pypi_packages(logger=None):
6662
"""
6763
Mine pypi package names from pypi simple and save to checkpoints,
@@ -256,8 +252,8 @@ def save_mined_packages_in_checkpoint(packages_mined, config_repo, logger=None):
256252
)
257253

258254

259-
def update_state_and_checkpoints(state, config_repo, last_serial, logger=None):
260-
# If we are finished mining all the packages in the initial sync, we can now
255+
def update_state_and_checkpoints(config_repo, state, last_serial, logger=None):
256+
# If we are finshed mining all the packages in the intial sync, we can now
261257
# periodically sync the packages from latest
262258
if state == INITIAL_SYNC_STATE:
263259
if logger:

0 commit comments

Comments
 (0)