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 sphinx conf to auto generate python api doc #286

Merged
merged 7 commits into from
Sep 20, 2023
Merged

Conversation

Nicole00
Copy link
Contributor

run docs/build.sh to auto generate the nebula-python api doc.
the doc looks like:
image

@wey-gu
Copy link
Contributor

wey-gu commented Sep 19, 2023

This is a great milestone.

We could then:

wey-gu
wey-gu previously approved these changes Sep 19, 2023
docs/source/conf.py Show resolved Hide resolved
wey-gu
wey-gu previously approved these changes Sep 19, 2023
docs/build.sh Outdated Show resolved Hide resolved
wey-gu
wey-gu previously approved these changes Sep 19, 2023
Copy link
Contributor

@wey-gu wey-gu left a comment

Choose a reason for hiding this comment

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

GREAT JOB!

@wey-gu
Copy link
Contributor

wey-gu commented Sep 20, 2023

Seems resp.space_name() == '' is expected in current master/nightly-build of NebulaGraph core?

    def test_2_reconnect(self):
        try:
            session = self.pool.get_session('root', 'nebula')
            time.sleep(2)
    
            # wait for the session space info to be updated to meta service
            session.execute(
                'CREATE SPACE IF NOT EXISTS test_session(vid_type=FIXED_STRING(8)); USE test_session;'
            )
            time.sleep(10)
            for i in range(0, 5):
                if i == 3:
                    os.system('docker stop tests_graphd0_1')
                    os.system('docker stop tests_graphd1_1')
                    time.sleep(3)
                resp = session.execute('SHOW SESSIONS')
                assert resp.is_succeeded(), resp.error_msg()
                assert resp.space_name() == 'test_session' #<---------------------
                time.sleep(2)
            session.release()
            new_session = self.pool.get_session('root', 'nebula')
            new_session.execute('SHOW SPACES')
        except Exception as e:
>           assert False, e
E           AssertionError: AssertionError("assert '' == 'test_session' #-----------
E               - test_session") 
E           assert False

If that's the case, let's remove this assert from UT.

@Nicole00
Copy link
Contributor Author

Nicole00 commented Sep 20, 2023

Seems resp.space_name() == '' is expected in current master/nightly-build of NebulaGraph core?

    def test_2_reconnect(self):
        try:
            session = self.pool.get_session('root', 'nebula')
            time.sleep(2)
    
            # wait for the session space info to be updated to meta service
            session.execute(
                'CREATE SPACE IF NOT EXISTS test_session(vid_type=FIXED_STRING(8)); USE test_session;'
            )
            time.sleep(10)
            for i in range(0, 5):
                if i == 3:
                    os.system('docker stop tests_graphd0_1')
                    os.system('docker stop tests_graphd1_1')
                    time.sleep(3)
                resp = session.execute('SHOW SESSIONS')
                assert resp.is_succeeded(), resp.error_msg()
                assert resp.space_name() == 'test_session' #<---------------------
                time.sleep(2)
            session.release()
            new_session = self.pool.get_session('root', 'nebula')
            new_session.execute('SHOW SPACES')
        except Exception as e:
>           assert False, e
E           AssertionError: AssertionError("assert '' == 'test_session' #-----------
E               - test_session") 
E           assert False

If that's the case, let's remove this assert from UT.

Seems resp.space_name() == '' is expected in current master/nightly-build of NebulaGraph core?

    def test_2_reconnect(self):
        try:
            session = self.pool.get_session('root', 'nebula')
            time.sleep(2)
    
            # wait for the session space info to be updated to meta service
            session.execute(
                'CREATE SPACE IF NOT EXISTS test_session(vid_type=FIXED_STRING(8)); USE test_session;'
            )
            time.sleep(10)
            for i in range(0, 5):
                if i == 3:
                    os.system('docker stop tests_graphd0_1')
                    os.system('docker stop tests_graphd1_1')
                    time.sleep(3)
                resp = session.execute('SHOW SESSIONS')
                assert resp.is_succeeded(), resp.error_msg()
                assert resp.space_name() == 'test_session' #<---------------------
                time.sleep(2)
            session.release()
            new_session = self.pool.get_session('root', 'nebula')
            new_session.execute('SHOW SPACES')
        except Exception as e:
>           assert False, e
E           AssertionError: AssertionError("assert '' == 'test_session' #-----------
E               - test_session") 
E           assert False

If that's the case, let's remove this assert from UT.

there's a test for multi-thread, it uses 50 threads to create space, causing the space is not enough for storaged. just fixed it. thanks @HarrisChu

@codecov-commenter
Copy link

Codecov Report

Patch and project coverage have no change.

Comparison is base (1fe9a44) 77.51% compared to head (2fc9471) 77.51%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #286   +/-   ##
=======================================
  Coverage   77.51%   77.51%           
=======================================
  Files          18       18           
  Lines        2411     2411           
=======================================
  Hits         1869     1869           
  Misses        542      542           

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

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.

5 participants