OpenBB icon indicating copy to clipboard operation
OpenBB copied to clipboard

Real estate

Open kulbinderdio opened this issue 2 years ago • 11 comments

Description

New UK real estate functionality

image

Needs SPARQLWrappper installed to run

  • [ ] Summary of the change / bug fix.
  • [ ] Link # issue, if applicable.
  • [ ] Screenshot of the feature or the bug before/after fix, if applicable.
  • [ ] Relevant motivation and context.
  • [ ] List any dependencies that are required for this change.

How has this been tested?

The following commands have been introduced under alternative/realestate sales townsales regionstats and have been tested with and without correct parameters, example correct parameters: sales da110na townsales gravesend 2022-01-01 2022-07-01 regionstats kent 2022-01-01 2022-07-01

  • Please describe the tests that you ran to verify your changes.
  • Provide instructions so we can reproduce.
  • Please also list any relevant details for your test configuration.
  • [ ] Make sure affected commands still run in terminal
  • [ ] Ensure the SDK still works
  • [ ] Check any related reports

Checklist:

Others

  • [ ] I have performed a self-review of my own code.
  • [ ] I have commented my code, particularly in hard-to-understand areas.

kulbinderdio avatar Dec 11 '22 22:12 kulbinderdio

Hey!! Nice to see this PR open :)

Given the size, it will take me a few days to get around to reviewing, but I promise to have some feedback this week!

jmaslek avatar Dec 12 '22 23:12 jmaslek

Hi, apologies if I'm being a bit slow here, but is there something else required from me

kulbinderdio avatar Dec 29 '22 17:12 kulbinderdio

Hey so I cannot actually run this. When I launch the terminal, I get the following:

AttributeError: module 'packaging.version' has no attribute 'LegacyVersion'

Which we resolved a while ago, so you may need to merge your branch with main (I see there are some conflicts that need to be addressed as well).

Additionally, in order to add the new dependency, you should run:

poetry add SPARQLWrapper

This will update pyproject.toml and poetry.lock. Then run:

poetry export -f requirements.txt -E optimization --without-hashes --output requirements.txt

and

poetry export -f requirements.txt --dev -E all --without-hashes --output requirements-full.txt

To generate the correct requirement files.

jmaslek avatar Jan 01 '23 20:01 jmaslek

Sorry about that. I have now run the commands above and also believe pulled the latest changes down and everything works ok

I get the following message when I. run the code ╰────────────────────────────────────────────────────────────────────────────────────── OpenBB Terminal v2.1.0 (https://openbb.co) ─╯ You are using the latest stable version

kulbinderdio avatar Jan 03 '23 21:01 kulbinderdio

No idea why the tests above are failing. when run locally I get

pytest ======================================================== test session starts ======================================================== platform darwin -- Python 3.11.0, pytest-7.2.0, pluggy-1.0.0 rootdir: /Users/kulbinderdio/dev/obb_real_estate/OpenBBTerminal, configfile: pytest.ini plugins: mock-3.10.0, recording-0.12.1 collected 4 items

test_landRegistry_model.py .... [100%]

====================================================

kulbinderdio avatar Jan 06 '23 11:01 kulbinderdio

No idea why the tests above are failing. when run locally I get

pytest ======================================================== test session starts ======================================================== platform darwin -- Python 3.11.0, pytest-7.2.0, pluggy-1.0.0 rootdir: /Users/kulbinderdio/dev/obb_real_estate/OpenBBTerminal, configfile: pytest.ini plugins: mock-3.10.0, recording-0.12.1 collected 4 items

test_landRegistry_model.py .... [100%]

====================================================

Can you resolve the conflicts again and merge with main and I can take a look?

jmaslek avatar Jan 06 '23 15:01 jmaslek

Apologies, there was a menu check test for Alternative menu that I hadn't updated. I have updated and all tests from under alternative now run cleanly. I have committed these changes back on to my branch (the one this pull request was created from).

kulbinderdio avatar Jan 08 '23 20:01 kulbinderdio

Hi, I have a git related problem. After further investigation it seems another new menu item (for HackerNews) has been added under the alternative menu, which is causing conflicts. I started to resolve the alt_controller in the pull request before I realised this was not the best way. The best way was to get the latest code and merge on to my fork. The problem with this is I don't have the option to pull latest changes, please see screenshot below.

image

I need help on how to get the latest changes to my project so I can resolve and then commit the resolved changes. Hope that all makes sense. Still learning a lot around how git works

thanks

kulbinderdio avatar Jan 08 '23 21:01 kulbinderdio

I went through and resolved 3 of the conflicting files, but when I come to this page again they all show as not resolved. I'm not able to resolve the poetry.lock file as I don't understand it. I'm hoping this is the process to follow and I'm not expected to do these on my branch (I can't see anywhere where I could do this on my branch anyway).

kulbinderdio avatar Jan 09 '23 09:01 kulbinderdio

Hi, to get my branch in sync I rolled back all my changes and then recoded them all. I have run the tests and they work, I have tested the new functionality by hand and also updated the poetry package requirements. Don't think I've missed anything out

kulbinderdio avatar Jan 09 '23 16:01 kulbinderdio

Just noticed this has been closed out. Is that something you have done or is as a result of me rolling back all my changes on my branch? Do I need to create a new pull request?

kulbinderdio avatar Jan 09 '23 16:01 kulbinderdio

Failed due to ModuleNotFoundError: No module named 'SPARQLWrapper' But I added this to the requirements files.

kulbinderdio avatar Jan 09 '23 18:01 kulbinderdio

At a loss with this error

Unable to find installation candidates for ccxt (1.95.43)

My branch is up to date and I haven't added this package

kulbinderdio avatar Jan 10 '23 20:01 kulbinderdio

At a loss with this error

Unable to find installation candidates for ccxt (1.95.43)

My branch is up to date and I haven't added this package

Something strange happened with CCXT and their versions. I updated that in a PR here.

As of today, we are defaulting merges into develop instead of main, so I went ahead and made that change here. You may need to rename your branch to pass the branch checks

jmaslek avatar Jan 10 '23 22:01 jmaslek

Is this what I need to change, main to develop?

image

cheers

kulbinderdio avatar Jan 10 '23 22:01 kulbinderdio

There are a huge number of changes in poetry.lock, no idea what changes need to be kept as this was auto generated. My fork also seems to be up to date so not sure how to resolve this. cheers

kulbinderdio avatar Jan 10 '23 22:01 kulbinderdio

Is this what I need to change, main to develop?

image

cheers

So the branch you are working on is called real_estate. So you want to find that branch and then rename it to feature/real_estate

jmaslek avatar Jan 10 '23 22:01 jmaslek

I've renamed my branch which has closed out this pull request and I'm not able to reopen it. Where do I go from here?

kulbinderdio avatar Jan 10 '23 22:01 kulbinderdio

you can open a new PR from that branch

jmaslek avatar Jan 10 '23 22:01 jmaslek

Do I need to reapply my code again or is github clever enough to know?

kulbinderdio avatar Jan 10 '23 22:01 kulbinderdio

if you just renamed then that branch is the same as it was

jmaslek avatar Jan 10 '23 22:01 jmaslek

thanks. I'll have to look at it tomorrow now and create a new PR. cheers

kulbinderdio avatar Jan 10 '23 22:01 kulbinderdio

thanks. I'll have to look at it tomorrow now and create a new PR. cheers

Look forward to it! Also regarding your poetry conflicts, I would recommend just copying the contents of both the poetry.lock and the pyproject.toml file (from https://raw.githubusercontent.com/OpenBB-finance/OpenBBTerminal/develop/poetry.lock , https://raw.githubusercontent.com/OpenBB-finance/OpenBBTerminal/develop/pyproject.toml).

And then just re-add your new package with poetry add <YOUR PACKAGE>

jmaslek avatar Jan 10 '23 22:01 jmaslek