-
Notifications
You must be signed in to change notification settings - Fork 0
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
Release 0.2.1 #27
Release 0.2.1 #27
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: Ruff | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: chartboost/ruff-action@v1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
repos: | ||
# Run the Ruff linter. | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
# Ruff version. | ||
rev: v0.1.3 | ||
hooks: | ||
# Run the Ruff linter. | ||
- id: ruff | ||
# Run the Ruff formatter. | ||
- id: ruff-format |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,11 @@ | |
import requests | ||
from requests.exceptions import ConnectionError | ||
|
||
from ubiquerg import parse_registry_path | ||
from pydantic.error_wrappers import ValidationError | ||
|
||
from pephubclient.exceptions import PEPExistsError, ResponseError | ||
from pephubclient.constants import RegistryPath | ||
|
||
|
||
class RequestManager: | ||
|
@@ -84,3 +88,18 @@ def call_client_func(func: Callable[..., Any], **kwargs) -> Any: | |
MessageHandler.print_warning(f"PEP already exists. {err}") | ||
except OSError as err: | ||
MessageHandler.print_error(f"{err}") | ||
|
||
|
||
def is_registry_path(input_string: str) -> bool: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Something very similar exists in Looper. Should this, therefore, now be placed in ubiquerg along with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, this should be part of pephubclient, and looper should now use this function |
||
""" | ||
Check if input is a registry path to pephub | ||
:param str input_string: path to the PEP (or registry path) | ||
:return bool: True if input is a registry path | ||
""" | ||
if input_string.endswith(".yaml"): | ||
return False | ||
try: | ||
RegistryPath(**parse_registry_path(input_string)) | ||
except (ValidationError, TypeError): | ||
return False | ||
return True |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ peppy>=0.35.7 | |
requests>=2.28.2 | ||
pydantic<2.0 | ||
pandas>=2.0.0 | ||
ubiquerg>=0.6.3 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
black | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we use ruff, can we remove black? |
||
ruff | ||
pytest | ||
python-dotenv | ||
pytest-mock | ||
flake8 | ||
coveralls | ||
pytest-cov | ||
pytest-cov | ||
pre-commit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we actually switching to ruff for all projects? We should probably discuss (briefly) at the next Infrastructure meeting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, we're using black. don't switch this kind of thing please.
if you have a compelling case to switch, we should discuss, but then we'll switch all our projects.