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

Schema: rewrite to run local only and handle newer schema versions #3117

Open
wants to merge 12 commits into
base: dev
Choose a base branch
from
Prev Previous commit
Next Next commit
Merge branch 'dev' of github.com:nf-core/tools into schema-rewrite
# Conflicts:
#	nf_core/utils.py
  • Loading branch information
mashehu committed Aug 12, 2024
commit 1746a226dd46af4d9be232a0c053570561d9fe13
4 changes: 3 additions & 1 deletion nf_core/components/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,9 @@ def get_single_component_info(self, component):

sha = self.sha
config_entry = None
if self.update_config is not None:
if self.update_config is None:
raise UserWarning("Could not find '.nf-core.yml' file in pipeline directory")
else:
if any(
[
entry.count("/") == 1
Expand Down
1 change: 1 addition & 0 deletions nf_core/pipelines/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,7 @@ def get_web_builder_response(self):
log.info("Found saved status from nf-core pipelines schema builder")
try:
self.schema = web_response["schema"]
log.debug(f"Schema from web builder:\n{json.dumps(self.schema, indent=4)}")
self.remove_schema_empty_definitions()
self.validate_schema()
except AssertionError as e:
Expand Down
5 changes: 4 additions & 1 deletion nf_core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,10 @@ def poll_nfcore_web_api(api_url: str, post_data: Optional[Dict] = None) -> Dict:
raise AssertionError(f"Could not connect to URL: {api_url}")
else:
if response.status_code != 200 and response.status_code != 301:
log.debug(f"Response content:\n{response.status_code}")
response_content = response.content
if isinstance(response_content, bytes):
response_content = response_content.decode()
log.debug(f"Response content:\n{response_content}")
raise AssertionError(
f"Could not access remote API results: {api_url} (HTML {response.status_code} Error)"
)
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.