Skip to content

Finalize packaging mvs#608

Merged
Bachibouzouk merged 16 commits intodevfrom
fix/packaging-mvs
Nov 10, 2020
Merged

Finalize packaging mvs#608
Bachibouzouk merged 16 commits intodevfrom
fix/packaging-mvs

Conversation

@Bachibouzouk
Copy link
Copy Markdown
Collaborator

@Bachibouzouk Bachibouzouk commented Oct 14, 2020

Addresses #588, fix #614

Changes proposed in this pull request:

  • Add entrypoints for mvs_tool and mvs_report in setup.py (this can be simply typed directly in terminal)
  • Create function utils.copy_inputs_template to copy input_template from package data_files
  • Create MANIFEST.in file
  • Add entrypoint for mvs_create_input_template in setup.py
  • Create script prepare_package.py to add data to package and build dist folder
  • Rename PACKAGE_PATH to PACKAGE_DATA_PATH
  • Update release protocol within Contributing.md
  • Remove variable TEMPLATE_INPUT_PATH and field data_files from setup.py

Test locally

  • in a new environment run pip install multi-vector-simulator==0.5.0rc13, then make sure you are not in the mvs repo and run mvs_tool, it should create a folder MVS_output
  • Delete the folder MVS_output
  • You can then run pip install multi-vector-simulator==0.5.0rc13[report] and run mvs_tool -pdf, this should create a folder MVS_output with a subfolder report in which the .pdf report is located (styling of the report is partly fixed in Fix formatting and rendering issues in the autoreport #643)

The following steps were realized, as well (if applies):

  • Use in-line comments to explain your code
  • Write docstrings to your code (example docstring)
  • For new functionalities: Explain in readthedocs
  • Write test(s) for your new patch of code (pytests, assertion debug messages)
  • Update the CHANGELOG.md
  • Apply black (black . --exclude docs/)
  • Check if benchmark tests pass locally (EXECUTE_TESTS_ON=master pytest)

For more information on how to contribute check the CONTRIBUTING.md.

@Bachibouzouk
Copy link
Copy Markdown
Collaborator Author

Bachibouzouk commented Oct 14, 2020

#607 needs to be merged first

@Bachibouzouk Bachibouzouk marked this pull request as draft October 14, 2020 20:48
@Bachibouzouk Bachibouzouk force-pushed the fix/packaging-mvs branch 2 times, most recently from b22c84d to 8d9d985 Compare October 28, 2020 10:19
@smartie2076
Copy link
Copy Markdown
Collaborator

#607 is merged, is this ready to review then? There are some failing tests.

@Bachibouzouk
Copy link
Copy Markdown
Collaborator Author

#607 is merged, is this ready to review then? There are some failing tests.

Not yet, I have to update with latest dev, the only change we might keep is the MANIFEST.in file because to fix failing tests in #607, I already make some of the changes proposed in this PR. I will change it to a non-draft PR and tag you as a reviewer then :)

@Bachibouzouk
Copy link
Copy Markdown
Collaborator Author

Remaining problem is data_files option of setup.py seems to only work when installing via python setup.py install, when doing pip install multi-vector-simulator the folders are not accessible.

In the wheel file "multi_vector_simulator-0.5.0rc7-py3-none-any.whl" downloaded from pypi.org those folders are there though (in "multi_vector_simulator-0.5.0rc7.data"... I am not sure why they are not accessible locally after pip install?

They are also there in the "multi-vector-simulator-0.5.0rc7.tar.gz" on pypi

@Bachibouzouk Bachibouzouk marked this pull request as ready for review November 9, 2020 21:40
Copy link
Copy Markdown
Collaborator

@smartie2076 smartie2076 left a comment

Choose a reason for hiding this comment

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

Is the feature to create an input template folder documented for the user in the RTD? Or is this not used for the end-user but something automated to be used for compiling the package data?

I have not tested this locally. Should I?

@Bachibouzouk
Copy link
Copy Markdown
Collaborator Author

Is the feature to create an input template folder documented for the user in the RTD

I can add something in the RTD for that (there is one thing which needs to be done to update the package_data folder before we upload to pypi which is documented in CONTRIBUTING, and there is something for the end user to create a copy of the input template in the local path which is not yet documented)

@Bachibouzouk Bachibouzouk force-pushed the fix/packaging-mvs branch 2 times, most recently from 321a541 to e59d8d2 Compare November 10, 2020 18:34
The default folder should also be missing for the message to
display
Fix #614
@Bachibouzouk Bachibouzouk merged commit 04e01a2 into dev Nov 10, 2020
@Bachibouzouk Bachibouzouk deleted the fix/packaging-mvs branch November 10, 2020 20:16
@smartie2076 smartie2076 mentioned this pull request Nov 11, 2020
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.

Warn user executing the mvs_tool command without input folder

2 participants