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

add ForemanApi #175

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

add ForemanApi #175

wants to merge 1 commit into from

Conversation

evgeni
Copy link
Member

@evgeni evgeni commented Oct 29, 2024

No description provided.

@evgeni evgeni force-pushed the foreman branch 11 times, most recently from 632806f to 702af13 Compare October 29, 2024 07:51
Copy link

codecov bot commented Oct 29, 2024

Codecov Report

Attention: Patch coverage is 91.81818% with 9 lines in your changes missing coverage. Please review.

Project coverage is 91.03%. Comparing base (871cd13) to head (c8817e6).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
apypie/foreman.py 91.66% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #175      +/-   ##
==========================================
+ Coverage   90.86%   91.03%   +0.17%     
==========================================
  Files           9       10       +1     
  Lines         449      558     +109     
==========================================
+ Hits          408      508     +100     
- Misses         41       50       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@evgeni evgeni force-pushed the foreman branch 2 times, most recently from 09cadae to 68a401d Compare October 29, 2024 08:52
apypie/foreman.py Show resolved Hide resolved
apypie/foreman.py Outdated Show resolved Hide resolved
apypie/foreman.py Outdated Show resolved Hide resolved
apypie/foreman.py Outdated Show resolved Hide resolved
apypie/foreman.py Outdated Show resolved Hide resolved
@evgeni evgeni marked this pull request as ready for review November 5, 2024 10:40
@evgeni evgeni force-pushed the foreman branch 4 times, most recently from 20c4a7d to 410b8c5 Compare November 5, 2024 11:18
Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partial review, but the train just arrived

apypie/foreman.py Show resolved Hide resolved
apypie/foreman.py Show resolved Hide resolved
Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think my comments are mostly stylistic and overall 👍

Have you thought about documentation? I think we need to add it to https://github.com/Apipie/apypie/blob/master/docs/api.rst for it to be picked up.

apypie/foreman.py Outdated Show resolved Hide resolved
apypie/foreman.py Outdated Show resolved Hide resolved


@pytest.fixture
def foremanapi(fixture_dir, requests_mock, tmpdir):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: foreman_api?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope :/

apypie/tests/conftest.py

Lines 44 to 49 in c77abe1

@pytest.fixture
def foreman_api(fixture_dir, requests_mock, tmpdir):
with fixture_dir.join('foreman.json').open() as read_file:
data = json.load(read_file)
requests_mock.get('https://foreman.example.com/apidoc/v2.json', json=data)
return apypie.Api(uri='https://foreman.example.com', api_version=2, apidoc_cache_dir=tmpdir.strpath)



@pytest.fixture
def lunaapi(fixture_dir, requests_mock, tmpdir):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: luna_api?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope :/

apypie/tests/conftest.py

Lines 52 to 57 in c77abe1

@pytest.fixture
def luna_api(fixture_dir, requests_mock, tmpdir):
with fixture_dir.join('luna.json').open() as read_file:
data = json.load(read_file)
requests_mock.get('https://foreman.example.com/apidoc/v2.json', json=data)
return apypie.Api(uri='https://foreman.example.com', api_version=2, apidoc_cache_dir=tmpdir.strpath)

apypie/foreman.py Outdated Show resolved Hide resolved
apypie/foreman.py Outdated Show resolved Hide resolved
@evgeni evgeni force-pushed the foreman branch 2 times, most recently from d4b8108 to a584731 Compare November 7, 2024 19:38
@evgeni
Copy link
Member Author

evgeni commented Nov 7, 2024

applied your suggestions and added to docs (we don't have docs-build in CI, 😱)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants