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

Rename version file to Python #368

Merged
merged 1 commit into from
Mar 4, 2022
Merged

Rename version file to Python #368

merged 1 commit into from
Mar 4, 2022

Conversation

rafmudaf
Copy link
Collaborator

@rafmudaf rafmudaf commented Mar 4, 2022

Feature or improvement description
Currently, we store the version in a file at floris/VERSION. Since this is not a Python file, we have to explicitly include it as a data file in setup.py. However, this doesn't work with the pip packaging as the archive on PyPI does not include the VERSION file. To be clear, FLORIS is installable via pip because the build happens on GitHub Actions, but PyPI also includes an archive of the source that skips the VERSION file and this archive is used by conda-forge. Therefore, the conda-forge build fails since this a required file.

Rather than jumping through more hoops, it's much simpler to treat this file as source code and convert it to a Python file. This may also allow for automated versioning with git info in the future since it could be dynamically generated.

Related issue, if one exists
See the failing conda-forge build

Impacted areas of the software
conda-forge build

This simplifies all of the installation infrastructure. There were a lot of hoops to jump through to include a non-python file in a distribution. We get the same functionality and simplify our lives this way.
@rafmudaf rafmudaf added bug Something isn't working v3 Label to denote focus on v3 labels Mar 4, 2022
@rafmudaf rafmudaf requested a review from bayc March 4, 2022 22:58
@rafmudaf rafmudaf self-assigned this Mar 4, 2022
@rafmudaf rafmudaf merged commit 49a1c5a into NREL:main Mar 4, 2022
@rafmudaf rafmudaf deleted the version_file branch March 4, 2022 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v3 Label to denote focus on v3
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants