Giter VIP home page Giter VIP logo

fasjson-client's Introduction

fasjson-client's People

Contributors

abompard avatar carlwgeorge avatar dependabot-preview[bot] avatar dependabot[bot] avatar gridhead avatar hroncok avatar lenkaseg avatar nphilipp avatar odra avatar pypingou avatar renovate[bot] avatar ryanlerch avatar stephencoady avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

fasjson-client's Issues

Tests fail in f37/rawhide

https://koji.fedoraproject.org/koji/taskinfo?taskID=92425360

I had to adjust the python3-pytest-cov requirement (rawhide has 4.0.0 now), but after that the following tests failed:

=========================== short test summary info ============================
FAILED fasjson_client/tests/unit/test_cli_get_cert.py::test_existing - assert...
FAILED fasjson_client/tests/unit/test_cli_get_cert.py::test_existing_no_cert
FAILED fasjson_client/tests/unit/test_cli_get_cert.py::test_existing_no_user
FAILED fasjson_client/tests/unit/test_cli_get_cert.py::test_existing_api_error
FAILED fasjson_client/tests/unit/test_cli_get_cert.py::test_sign_make_pkey - ...
FAILED fasjson_client/tests/unit/test_cli_get_cert.py::test_sign_error - asse...
FAILED fasjson_client/tests/unit/test_client_api.py::test_api_success - jsons...
FAILED fasjson_client/tests/unit/test_client_api.py::test_api_unknown_operation
FAILED fasjson_client/tests/unit/test_client_api.py::test_api_list_operations
FAILED fasjson_client/tests/unit/test_client_api.py::test_api_error - jsonsch...
FAILED fasjson_client/tests/unit/test_client_api.py::test_api_error_text - js...
FAILED fasjson_client/tests/unit/test_client_api.py::test_get_all_users - jso...
FAILED fasjson_client/tests/unit/test_client_api.py::test_get_all_groups - js...
FAILED fasjson_client/tests/unit/test_client_api.py::test_list_all_entities_wrong_name
FAILED fasjson_client/tests/unit/test_response.py::test_response_paged - json...
FAILED fasjson_client/tests/unit/test_response.py::test_response_single_page
FAILED fasjson_client/tests/unit/test_response.py::test_response_wrapper - js...
================= 17 failed, 40 passed, 309 warnings in 4.08s ==================

invoker = <function invoker..invoke at 0x7fd266fe4720>
server = <fasjson_client.tests.unit.utils.FasJsonMock object at 0x7fd267005890>
tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_existing0')
get_cert_b64 = <function get_cert_b64.._get_cert at 0x7fd266fe4c20>
fixture_dir = '/builddir/build/BUILD/fasjson-client-1.0.7/fasjson_client/tests/unit/fixtures'
def test_existing(invoker, server, tmp_path, get_cert_b64, fixture_dir):
dest_file = os.path.join(tmp_path, "dummy")
user_response = {
# Reverse the list to make sure the certs are sorted.
"result": {
"certificates": list(reversed([get_cert_b64(idx) for idx in range(1, 5)]))
}
}
server.mock_endpoint("/users/dummy/", json=user_response)

    result = invoker("--existing", "-u", "dummy", "--save-to", dest_file)
  assert result.exit_code == 0

E assert 1 == 0
E + where 1 = <Result RefResolutionError(_cause=NoMockAddress(<requests_mock.request._RequestObjectProxy object at 0x7fd266fef810>))>.exit_code
fasjson_client/tests/unit/test_cli_get_cert.py:84: AssertionError
____________________________ test_existing_no_cert _____________________________
invoker = <function invoker..invoke at 0x7fd266f22d40>
server = <fasjson_client.tests.unit.utils.FasJsonMock object at 0x7fd266ee9110>
tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_existing_no_cert0')
def test_existing_no_cert(invoker, server, tmp_path):
dest_file = os.path.join(tmp_path, "dummy")
user_response = {"result": {"certificates": []}}
server.mock_endpoint("/users/dummy/", json=user_response)

    result = invoker("--existing", "-u", "dummy", "--save-to", dest_file)
    assert result.exit_code == 1
    expected_msg = "Error: No existing certificate, you need to request one.\n"
  assert result.output == expected_msg

E AssertionError: assert '' == 'Error: No ex...equest one.\n'
E - Error: No existing certificate, you need to request one.
fasjson_client/tests/unit/test_cli_get_cert.py:101: AssertionError
...

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • Update dependencies in lockfile

Pending Status Checks

These updates await pending status checks. To force their creation now, click the checkbox below.

  • Update dependency importlib-metadata to v7.2.1

Detected dependencies

github-actions
.github/workflows/tests.yml
  • actions/checkout v4
  • actions/checkout v4
pep621
pyproject.toml
  • poetry-core >=1.0.0
pip_requirements
docs/requirements.txt
  • attrs ==23.2.0
  • bravado-core ==6.1.1
  • bravado ==11.0.3
  • certifi ==2024.6.2
  • chardet ==5.2.0
  • click ==8.1.7
  • colorama ==0.4.6
  • decorator ==5.1.1
  • idna ==3.7
  • importlib-metadata ==7.2.0
  • jsonpointer ==3.0.0
  • jsonref ==1.1.0
  • jsonschema ==4.22.0
  • monotonic ==1.6
  • msgpack ==1.0.8
  • pyrsistent ==0.20.0
  • python-dateutil ==2.9.0.post0
  • pytz ==2024.1
  • pyyaml ==6.0.1
  • requests ==2.32.3
  • rfc3987 ==1.3.8
  • simplejson ==3.19.2
  • six ==1.16.0
  • strict-rfc3339 ==0.7
  • swagger-spec-validator ==3.0.3
  • toml ==0.10.2
  • typing-extensions ==4.12.2
  • urllib3 ==2.2.2
  • webcolors ==24.6.0
  • zipp ==3.19.2
poetry
pyproject.toml
  • python ^3.8.0
  • gssapi ^1.5.1
  • bravado ^10.6.0 || ^11
  • requests ^2.20.0
  • requests-gssapi ^1.2.1
  • cryptography >=2.3
  • click ^6.7 || ^7 || ^8
  • tomli *
  • coverage *
  • flake8 *
  • pytest *
  • pytest-cov *
  • pytest-mock *
  • requests-mock *
  • sphinx *
  • sphinxcontrib-httpdomain *
  • bandit *
  • liccheck *
  • black *
  • towncrier ^23.11.0
  • setuptools ^69.1.0 || ^70.0.0
  • myst-parser ^2.0.0 || ^3.0.0

  • Check this box to trigger a request for Renovate to run again on this repository

[packit] Propose downstream failed for release v1.0.7

Packit failed on creating pull-requests in dist-git:

dist-git branch error
f36 Failed to download file from URL https://files.pythonhosted.org/packages/source/f/fasjson-client/fasjson-client-v1.0.7.tar.gz. Reason: 'Not Found'.
main Failed to download file from URL https://files.pythonhosted.org/packages/source/f/fasjson-client/fasjson-client-v1.0.7.tar.gz. Reason: 'Not Found'.

You can retrigger the update by adding a comment (/packit propose-downstream) into this issue.

[RFE] : allowing a .cfg file to preseed default settings like url

Per discussion with @abompard here is a RFE suggestion : having a kind of .cfg file that can be parsed (but optional) by fasjson-client in HOME directory (path to be discussed) to point automatically fasjson-client to a specific url instead of having to specify on each cli call with a parameter.
That would permit to configure automatically different environments (like dev/staging/prod) through that file (and configuration management eventuallly if needed) and so different fasjson URL.
If nothing found and nothing specified through cli parameter, it can just then use the default values

Ideas ? opinions ?

New certificate generation failed during validation - openssl missing

While generating new certificate using centos-cert tool, noticed the following error:

$ centos-cert -u anoopcs

[+] 20210421-13:31 centos-cert -> Validating user [anoopcs] with realm [FEDORAPROJECT.ORG] against https://fasjson.fedoraproject.org
[+] 20210421-13:31 centos-cert -> We can reach [https://fasjson.fedoraproject.org] with realm [[email protected]], so now asking for TLS cert ...
Generating private key...
Generating CSR...
Uploading CSR for signature...
Certificate generated, signed and written to /home/anoopcs/.centos-anoopcs.crt
[+] 20210421-13:31 centos-cert -> Concatenating cert to ~/.centos.cert
[+] 20210421-13:31 centos-cert -> Downloading correct CA cert ..


[+] 20210421-13:31 centos-cert -> Verifying if TLS cert is still valid ...
[+] 20210421-13:31 centos-cert -> Validating TLS cert against ~/.centos-server-ca.cert ...
/usr/bin/centos-cert: line 41: openssl: command not found
[+] 20210421-13:31 centos-cert -> [ERROR] your TLS cert is not signed by correct CA

Following the installation of openssl everything worked fine.

Provide fasjson-client rpm package

For public consumption, a rpm package would be needed.
Ideally, as we have still people on the following releases/versions interacting with all our infra (Fedora/CentOS combined), we'd build and provide it for :

  • Fedora (all current releases)
  • RHEL8/CentOS8
  • RHEL7/CentOS7 (for that one that can be difficult but let's evaluate it at least)

Project Documentation

As an Application Developer, I want a fasjson-client documentation about its usage, api reference, examples and so on.

Acceptance Criteria

  • Project sphinx docs
  • Client documentation for each method
  • Automated documentation where possible
  • Basic usage of kerberos and auth

Definition of Done

A published HTML project documentation (read the docs?) containing both API Reference and usage guides.

Use Towncrier

Use towncrier for the release notes, like Noggin and FASJSON.

bravado open-api spec 3.0

As a developer, I want to be able to use an open-api spec 3.0 format as the spec source for my fasjson client.

We are using bravado, an open-api spec library for python, that does not support the latest open-api spec format.

I think we could:

  • contribute to bravado enabling it support
  • fork it and enable
  • create our own solution

I would prefer to contribute to bravado which is an existing tooling already used by the python community.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.