pep8speaks: Hello @Bhavam! Thanks for opening this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:

* In the file [`src/einsteinpy/geodesic.py`](https://github.com/einsteinpy/einsteinpy/blob/514576453f59eac704d8c54109797e5e0908664d/src/einsteinpy/geodesic.py):

> [Line 36:23](https://github.com/einsteinpy/einsteinpy/blob/514576453f59eac704d8c54109797e5e0908664d/src/einsteinpy/geodesic.py#L36): [E203](https://duckduckgo.com/?q=pep8%20E203) whitespace before ':'
> [Line 36:48](https://github.com/einsteinpy/einsteinpy/blob/514576453f59eac704d8c54109797e5e0908664d/src/einsteinpy/geodesic.py#L36): [E203](https://duckduckgo.com/?q=pep8%20E203) whitespace before ':'
> [Line 36:65](https://github.com/einsteinpy/einsteinpy/blob/514576453f59eac704d8c54109797e5e0908664d/src/einsteinpy/geodesic.py#L36): [E203](https://duckduckgo.com/?q=pep8%20E203) whitespace before ','
> [Line 36:89](https://github.com/einsteinpy/einsteinpy/blob/514576453f59eac704d8c54109797e5e0908664d/src/einsteinpy/geodesic.py#L36): [E203](https://duckduckgo.com/?q=pep8%20E203) whitespace before ','
> [Line 36:121](https://github.com/einsteinpy/einsteinpy/blob/514576453f59eac704d8c54109797e5e0908664d/src/einsteinpy/geodesic.py#L36): [E501](https://duckduckgo.com/?q=pep8%20E501) line too long (123 > 120 characters)
> [Line 39:44](https://github.com/einsteinpy/einsteinpy/blob/514576453f59eac704d8c54109797e5e0908664d/src/einsteinpy/geodesic.py#L39): [E203](https://duckduckgo.com/?q=pep8%20E203) whitespace before ','
> [Line 39:85](https://github.com/einsteinpy/einsteinpy/blob/514576453f59eac704d8c54109797e5e0908664d/src/einsteinpy/geodesic.py#L39): [E203](https://duckduckgo.com/?q=pep8%20E203) whitespace before ','
> [Line 39:119](https://github.com/einsteinpy/einsteinpy/blob/514576453f59eac704d8c54109797e5e0908664d/src/einsteinpy/geodesic.py#L39): [E203](https://duckduckgo.com/?q=pep8%20E203) whitespace before ','
> [Line 39:121](https://github.com/einsteinpy/einsteinpy/blob/514576453f59eac704d8c54109797e5e0908664d/src/einsteinpy/geodesic.py#L39): [E501](https://duckduckgo.com/?q=pep8%20E501) line too long (163 > 120 characters)


shreyasbapat: Hi @Bhavam You need to fix the code quality.

Run `tox -e reformat` 

while in the repo.
shreyasbapat: Also, can you define a example geodesic and show how the representation looks like? Pick anyone from the example notebook
Bhavam: Yes sure ill do that and get back to you.
shreyasbapat: Good. Now I believe, the representations won't pop up. So, please try to run it once.
codecov[bot]: # [Codecov](https://codecov.io/gh/einsteinpy/einsteinpy/pull/383?src=pr&el=h1) Report
> Merging [#383](https://codecov.io/gh/einsteinpy/einsteinpy/pull/383?src=pr&el=desc) into [master](https://codecov.io/gh/einsteinpy/einsteinpy/commit/4df5a19e51da5aabff19c50e231d6f8b83e3d5a7?src=pr&el=desc) will **decrease** coverage by `0.09%`.
> The diff coverage is `50%`.

[![Impacted file tree graph](https://codecov.io/gh/einsteinpy/einsteinpy/pull/383/graphs/tree.svg?width=650&token=H3oDVYA11f&height=150&src=pr)](https://codecov.io/gh/einsteinpy/einsteinpy/pull/383?src=pr&el=tree)

```diff
@@            Coverage Diff            @@
##           master     #383     +/-   ##
=========================================
- Coverage   94.13%   94.04%   -0.1%     
=========================================
  Files          52       52             
  Lines        1843     1847      +4     
=========================================
+ Hits         1735     1737      +2     
- Misses        108      110      +2
```


| [Impacted Files](https://codecov.io/gh/einsteinpy/einsteinpy/pull/383?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/einsteinpy/geodesic.py](https://codecov.io/gh/einsteinpy/einsteinpy/pull/383/diff?src=pr&el=tree#diff-c3JjL2VpbnN0ZWlucHkvZ2VvZGVzaWMucHk=) | `85.71% <50%> (-14.29%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/einsteinpy/einsteinpy/pull/383?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/einsteinpy/einsteinpy/pull/383?src=pr&el=footer). Last update [4df5a19...363c4f1](https://codecov.io/gh/einsteinpy/einsteinpy/pull/383?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

shreyasbapat: And later you will have to write up a unit test that tests this change to take care of the failing coverage check.
Bhavam: Sure and ill follow up with the example geodesic representation also.
Bhavam: > And later you will have to write up a unit test that tests this change to take care of the failing coverage check.

Do I insert the unit tests in the testing module or somewhere else
ritzvik: > > And later you will have to write up a unit test that tests this change to take care of the failing coverage check.
> 
> Do I insert the unit tests in the testing module or somewhere else

Kindly put in new tests in `tests/test_geodesic.py`
Also, run `tox -e reformat` to lint the code and pass quality checks :)
shreyasbapat: I guess all you have to do is,
Squash this in one commit.

And rebase.

If you need any help in that front, ping me and I'll be happy to help.
diff --git a/src/einsteinpy/geodesic.py b/src/einsteinpy/geodesic.py
index 31b0700..7537371 100644
--- a/src/einsteinpy/geodesic.py
+++ b/src/einsteinpy/geodesic.py
@@ -32,6 +32,22 @@ class Geodesic:
             return_cartesian=True,
         )[1]
 
+    def __repr__(self):
+        return "body name= ({0}) , metric=({1}) , parent name=({2}) , parent mass=({3})".format(
+            self.body.name,
+            self.metric.name,
+            self.body.parent.name,
+            self.body.parent.mass,
+        )
+
+    def __str__(self):
+        return "body name= ({0}) , metric=({1}) , parent name=({2}) , parent mass=({3})".format(
+            self.body.name,
+            self.metric.name,
+            self.body.parent.name,
+            self.body.parent.mass,
+        )
+
     @property
     def trajectory(self):
         return self._trajectory
diff --git a/src/einsteinpy/metric/kerr.py b/src/einsteinpy/metric/kerr.py
index c5230b3..b2a3467 100644
--- a/src/einsteinpy/metric/kerr.py
+++ b/src/einsteinpy/metric/kerr.py
@@ -20,6 +20,7 @@ class Kerr:
     @u.quantity_input(time=u.s, M=u.kg)
     def __init__(self, bl_coords, M, time):
         self.input_coords = bl_coords
+        self.name = "Kerr"
         self.M = M
         self.a = self.input_coords.a.to(u.m)
         self.time = time
diff --git a/src/einsteinpy/metric/kerrnewman.py b/src/einsteinpy/metric/kerrnewman.py
index 5a6f9e2..0c8cde9 100644
--- a/src/einsteinpy/metric/kerrnewman.py
+++ b/src/einsteinpy/metric/kerrnewman.py
@@ -22,6 +22,7 @@ class KerrNewman:
     @u.quantity_input(time=u.s, M=u.kg, Q=u.C)
     def __init__(self, bl_coords, q, M, Q, time):
         self.input_coords = bl_coords
+        self.name = "KerrNewman"
         self.M = M
         self.a = self.input_coords.a.to(u.m)
         self.Q = Q
diff --git a/src/einsteinpy/metric/schwarzschild.py b/src/einsteinpy/metric/schwarzschild.py
index b446b28..a49e126 100644
--- a/src/einsteinpy/metric/schwarzschild.py
+++ b/src/einsteinpy/metric/schwarzschild.py
@@ -19,6 +19,7 @@ class Schwarzschild:
 
     @u.quantity_input(time=u.s, M=u.kg)
     def __init__(self, sph_coords, M, time):
+        self.name = "Schwarzschild"
         self.M = M
         self.input_coords = sph_coords
         self.time = time

Add __repr__ and __str__ for Geodesic Class
🐞 **Problem**

The Geodesic class is missing these methods. More can be discusses in comments.

🎯 **Goal**

<!--- Why is this change important to you? How would you use it? -->
<!--- How can it benefit other users? -->

💡 **Possible solutions**

<!--- Not obligatory, but suggest an idea for implementing addition or change -->

📋  **Steps to solve the problem**

 * Comment below about what you've started working on.
 * Add, commit, push your changes
 * Submit a pull request and add this in comments - `Addresses #<put issue number here>`
 * Ask for a review in comments section of pull request
 * Celebrate your contribution to this project 🎉

diff --git a/src/einsteinpy/tests/test_geodesics.py b/src/einsteinpy/tests/test_geodesics.py
index 7050e40..97b93c6 100644
--- a/src/einsteinpy/tests/test_geodesics.py
+++ b/src/einsteinpy/tests/test_geodesics.py
@@ -37,3 +37,21 @@ def test_Geodesics_has_trajectory(dummy_data):
     body, t, _, end_lambda, stepsize = dummy_data
     geo = Geodesic(body, time=t, end_lambda=end_lambda, step_size=stepsize)
     assert isinstance(geo.trajectory, np.ndarray)
+
+
+def test_Geodesics_str_returns_members(dummy_data):
+    body, t, _, end_lambda, stepsize = dummy_data
+    geo = Geodesic(body, time=t, end_lambda=end_lambda, step_size=stepsize)
+    assert (
+        geo.__str__()
+        == "body name= (obj) , metric=(Schwarzschild) , parent name=(attractor) , parent mass=(6e+24 kg)"
+    )
+
+
+def test_Geodesics_repr_returns_members(dummy_data):
+    body, t, _, end_lambda, stepsize = dummy_data
+    geo = Geodesic(body, time=t, end_lambda=end_lambda, step_size=stepsize)
+    assert (
+        geo.__repr__()
+        == "body name= (obj) , metric=(Schwarzschild) , parent name=(attractor) , parent mass=(6e+24 kg)"
+    )

pip install -e .[dev]
parse_log_pytest
pytest
pytest-cov ipywidgets pytest
3.7
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
alabaster==0.7.13
astropy==4.3.1
attrs @ file:///croot/attrs_1668696182826/work
Babel==2.14.0
backcall==0.2.0
beautifulsoup4==4.13.3
black==23.3.0
bleach==6.0.0
cachetools==5.5.2
certifi @ file:///croot/certifi_1671487769961/work/certifi
chardet==5.2.0
charset-normalizer==3.4.1
click==8.1.8
colorama==0.4.6
comm==0.1.4
coverage==7.2.7
cycler==0.11.0
debugpy==1.7.0
decorator==5.1.1
defusedxml==0.7.1
distlib==0.3.9
docutils==0.19
-e git+https://github.com/einsteinpy/einsteinpy.git@ad3a490b332185d19042c8a34f9ccedca37171fe#egg=einsteinpy
entrypoints==0.4
execnet==2.0.2
fastjsonschema==2.21.1
filelock==3.12.2
flit_core @ file:///opt/conda/conda-bld/flit-core_1644941570762/work/source/flit_core
fonttools==4.38.0
idna==3.10
imagesize==1.4.1
importlib-metadata==6.7.0
importlib-resources==5.12.0
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
ipykernel==6.16.2
ipython==7.34.0
ipywidgets==8.1.5
isort==5.11.5
jedi==0.19.2
Jinja2==3.1.6
jsonschema==4.17.3
jupyter-sphinx==0.4.0
jupyter_client==7.4.9
jupyter_core==4.12.0
jupyterlab-pygments==0.2.2
jupyterlab_widgets==3.0.13
kiwisolver==1.4.5
llvmlite==0.39.1
MarkupSafe==2.1.5
matplotlib==3.5.3
matplotlib-inline==0.1.6
mistune==3.0.2
mpmath==1.3.0
mypy-extensions==1.0.0
nbclient==0.7.4
nbconvert==7.6.0
nbformat==5.8.0
nbsphinx==0.9.7
nest-asyncio==1.6.0
numba==0.56.4
numpy==1.21.6
packaging==24.0
pandocfilters==1.5.1
parso==0.8.4
pathspec==0.11.2
pexpect==4.9.0
pickleshare==0.7.5
Pillow==9.5.0
pkgutil_resolve_name==1.3.10
platformdirs==4.0.0
plotly==5.18.0
pluggy==1.2.0
prompt_toolkit==3.0.48
psutil==7.0.0
ptyprocess==0.7.0
py @ file:///opt/conda/conda-bld/py_1644396412707/work
pycodestyle==2.10.0
pyerfa==2.0.0.3
Pygments==2.17.2
pyparsing==3.1.4
pyproject-api==1.5.3
pyrsistent==0.19.3
pytest==7.1.2
pytest-cov==2.5.1
pytest-xdist==3.5.0
python-dateutil==2.9.0.post0
pytz==2025.2
pyzmq==26.2.1
requests==2.31.0
scipy==1.7.3
six==1.17.0
snowballstemmer==2.2.0
soupsieve==2.4.1
Sphinx==5.3.0
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
sympy==1.10.1
tenacity==8.2.3
tinycss2==1.2.1
tomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work
tornado==6.2
tox==4.8.0
traitlets==5.9.0
typed-ast==1.5.5
typing_extensions==4.7.1
urllib3==2.0.7
virtualenv==20.26.6
wcwidth==0.2.13
webencodings==0.5.1
widgetsnbextension==4.0.13
zipp @ file:///croot/zipp_1672387121353/work

name: einsteinpy
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - attrs=22.1.0=py37h06a4308_0
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2022.12.7=py37h06a4308_0
  - flit-core=3.6.0=pyhd3eb1b0_0
  - importlib_metadata=4.11.3=hd3eb1b0_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=22.3.1=py37h06a4308_0
  - py=1.11.0=pyhd3eb1b0_0
  - pytest=7.1.2=py37h06a4308_0
  - python=3.7.16=h7a1cb2a_0
  - readline=8.2=h5eee18b_0
  - setuptools=65.6.3=py37h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tomli=2.0.1=py37h06a4308_0
  - wheel=0.38.4=py37h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zipp=3.11.0=py37h06a4308_0
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - alabaster==0.7.13
      - astropy==4.3.1
      - babel==2.14.0
      - backcall==0.2.0
      - beautifulsoup4==4.13.3
      - black==23.3.0
      - bleach==6.0.0
      - cachetools==5.5.2
      - chardet==5.2.0
      - charset-normalizer==3.4.1
      - click==8.1.8
      - colorama==0.4.6
      - comm==0.1.4
      - coverage==7.2.7
      - cycler==0.11.0
      - debugpy==1.7.0
      - decorator==5.1.1
      - defusedxml==0.7.1
      - distlib==0.3.9
      - docutils==0.19
      - einsteinpy==0.3.dev0
      - entrypoints==0.4
      - execnet==2.0.2
      - fastjsonschema==2.21.1
      - filelock==3.12.2
      - fonttools==4.38.0
      - idna==3.10
      - imagesize==1.4.1
      - importlib-metadata==6.7.0
      - importlib-resources==5.12.0
      - ipykernel==6.16.2
      - ipython==7.34.0
      - ipywidgets==8.1.5
      - isort==5.11.5
      - jedi==0.19.2
      - jinja2==3.1.6
      - jsonschema==4.17.3
      - jupyter-client==7.4.9
      - jupyter-core==4.12.0
      - jupyter-sphinx==0.4.0
      - jupyterlab-pygments==0.2.2
      - jupyterlab-widgets==3.0.13
      - kiwisolver==1.4.5
      - llvmlite==0.39.1
      - markupsafe==2.1.5
      - matplotlib==3.5.3
      - matplotlib-inline==0.1.6
      - mistune==3.0.2
      - mpmath==1.3.0
      - mypy-extensions==1.0.0
      - nbclient==0.7.4
      - nbconvert==7.6.0
      - nbformat==5.8.0
      - nbsphinx==0.9.7
      - nest-asyncio==1.6.0
      - numba==0.56.4
      - numpy==1.21.6
      - packaging==24.0
      - pandocfilters==1.5.1
      - parso==0.8.4
      - pathspec==0.11.2
      - pexpect==4.9.0
      - pickleshare==0.7.5
      - pillow==9.5.0
      - pkgutil-resolve-name==1.3.10
      - platformdirs==4.0.0
      - plotly==5.18.0
      - pluggy==1.2.0
      - prompt-toolkit==3.0.48
      - psutil==7.0.0
      - ptyprocess==0.7.0
      - pycodestyle==2.10.0
      - pyerfa==2.0.0.3
      - pygments==2.17.2
      - pyparsing==3.1.4
      - pyproject-api==1.5.3
      - pyrsistent==0.19.3
      - pytest-cov==2.5.1
      - pytest-xdist==3.5.0
      - python-dateutil==2.9.0.post0
      - pytz==2025.2
      - pyzmq==26.2.1
      - requests==2.31.0
      - scipy==1.7.3
      - six==1.17.0
      - snowballstemmer==2.2.0
      - soupsieve==2.4.1
      - sphinx==5.3.0
      - sphinxcontrib-applehelp==1.0.2
      - sphinxcontrib-devhelp==1.0.2
      - sphinxcontrib-htmlhelp==2.0.0
      - sphinxcontrib-jsmath==1.0.1
      - sphinxcontrib-qthelp==1.0.3
      - sphinxcontrib-serializinghtml==1.1.5
      - sympy==1.10.1
      - tenacity==8.2.3
      - tinycss2==1.2.1
      - tornado==6.2
      - tox==4.8.0
      - traitlets==5.9.0
      - typed-ast==1.5.5
      - typing-extensions==4.7.1
      - urllib3==2.0.7
      - virtualenv==20.26.6
      - wcwidth==0.2.13
      - webencodings==0.5.1
      - widgetsnbextension==4.0.13
prefix: /opt/conda/envs/einsteinpy

src/einsteinpy/tests/test_geodesics.py::test_Geodesics_str_returns_members src/einsteinpy/tests/test_geodesics.py::test_Geodesics_repr_returns_members
src/einsteinpy/tests/test_geodesics.py::test_Geodesics_conserves_the_attractor src/einsteinpy/tests/test_geodesics.py::test_Geodesics_has_trajectory
src/einsteinpy/metric/kerr.py src/einsteinpy/metric/kerrnewman.py src/einsteinpy/metric/schwarzschild.py src/einsteinpy/geodesic.py
src/einsteinpy/metric/kerr.py src/einsteinpy/metric/kerrnewman.py src/einsteinpy/metric/schwarzschild.py src/einsteinpy/geodesic.py