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

solve VERSION.txt bug #732

Merged
merged 8 commits into from
Dec 12, 2021
Merged

solve VERSION.txt bug #732

merged 8 commits into from
Dec 12, 2021

Conversation

b4thesunrise
Copy link
Contributor

Description

change .gitignore file
add back version,txt

Motivation and Context

#731

solve the problem of install qlib with pip install .

How Has This Been Tested?

  • Pass the test by running: pytest qlib/tests/test_all_pipeline.py under upper directory of qlib.
  • If you are adding a new feature, test on your own test scripts.

Screenshots of Test Results (if appropriate):

  1. Pipeline test:
  2. Your own tests:

Types of changes

  • Fix bugs
  • Add new feature
  • Update documentation

@zhupr
Copy link
Collaborator

zhupr commented Dec 10, 2021

@b4thesunrise Hi,
When installing from source (python setup.py develop/install) will automatically copy src/VERSION.txt to src/qlib: https://github.com/microsoft/qlib/blob/main/setup.py#L20

@zhupr
Copy link
Collaborator

zhupr commented Dec 11, 2021

@b4thesunrise Hi,
pip install <source> will not execute the copyfile in setup.py.
Can you help to change the "version" of qlib to something like "pip", refer to: https://github.com/pypa/pip/blob/main/setup.py#L28

@b4thesunrise
Copy link
Contributor Author

@b4thesunrise Hi, pip install <source> will not execute the copyfile in setup.py. Can you help to change the "version" of qlib to something like "pip", refer to: https://github.com/pypa/pip/blob/main/setup.py#L28

Hi! I am willing to offer help, so the problem is pip install <source> will cause the error of the lack of version.txt since the copy, so we want to get the version with function like get version in pip instead of use copyfile?

@zhupr
Copy link
Collaborator

zhupr commented Dec 11, 2021

@b4thesunrise Hi, pip install <source> will not execute the copyfile in setup.py. Can you help to change the "version" of qlib to something like "pip", refer to: https://github.com/pypa/pip/blob/main/setup.py#L28

Hi! I am willing to offer help, so the problem is pip install <source> will cause the error of the lack of version.txt since the copy, so we want to get the version with function like get version in pip instead of use copyfile?

Yes, you need to implement a get_version function to get the version from qlib/__init__.py

@b4thesunrise
Copy link
Contributor Author

@b4thesunrise Hi, pip install <source> will not execute the copyfile in setup.py. Can you help to change the "version" of qlib to something like "pip", refer to: https://github.com/pypa/pip/blob/main/setup.py#L28

Hi! I am willing to offer help, so the problem is pip install <source> will cause the error of the lack of version.txt since the copy, so we want to get the version with function like get version in pip instead of use copyfile?

Yes, you need to implement a get_version function to get the version from qlib/__init__.py

got it, will work on it

@b4thesunrise
Copy link
Contributor Author

b4thesunrise commented Dec 11, 2021

have already followed the style of pypi and use black format, please give a review :)
I tried pip install . and run qlib again, the version.txt bug not occured on my machine then.

@you-n-g you-n-g merged commit 125922b into microsoft:main Dec 12, 2021
@you-n-g
Copy link
Collaborator

you-n-g commented Dec 12, 2021

@b4thesunrise It looks great!
Thanks so much for your contribution.
Welcome to become Qlib's contributor!!

@b4thesunrise
Copy link
Contributor Author

@b4thesunrise It looks great! Thanks so much for your contribution. Welcome to become Qlib's contributor!!

Thanks! My pleasure!

@you-n-g you-n-g added the enhancement New feature or request label Jan 12, 2022
qianyun210603 pushed a commit to qianyun210603/qlib that referenced this pull request Mar 23, 2023
* solve VERSION.txt bug

* back to main version

* change setup and init to follow pypi type

* add read function

* solve black format

Co-authored-by: DefangCui <170007807@pku.edu.cn>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants