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

Adding settings.ini to PyPI source #24

Merged
merged 2 commits into from Feb 28, 2022

Conversation

sugatoray
Copy link
Contributor

@sugatoray sugatoray commented Feb 23, 2022

The setup.py file reads in the config values from settings.ini. So, absence of settings.ini file in the source distribution (*.tar.gz file), leads to failure in installation of statsforecast.

  • Currently (v0.3.0) the PyPI source does not include the settings.ini file. This PR fixes that.
    image
  • Changes to README.md file:
    • Fixed some of the formatting errors.
    • Fixed some broken URLs.

      The relative URLs do not render properly on PyPI. Converted them from relative to absolute URLs.
      image


Closes #24

@sugatoray
Copy link
Contributor Author

cc: @FedericoGarza

@sugatoray sugatoray changed the title Add settings.ini to PyPI source Adding settings.ini to PyPI source Feb 23, 2022
@jmoralez
Copy link
Member

Thank you for your contribution! We use nbdev to develop the library, so to update the README.md file you have to modify the nbs/index.ipynb notebook and use relative links to fix the broken ones. Then run the notebook, save it and run nbdev_build_docs --fname nbs/index.ipynb from the terminal to update the README.md file. Let us know if you need any help.

@sugatoray
Copy link
Contributor Author

Thank you for your contribution! We use nbdev to develop the library, so to update the README.md file you have to modify the nbs/index.ipynb notebook and use relative links to fix the broken ones. Then run the notebook, save it and run nbdev_build_docs --fname nbs/index.ipynb from the terminal to update the README.md file. Let us know if you need any help.

@jmoralez Thank you. Will do it as you explained.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@sugatoray
Copy link
Contributor Author

@jmoralez Done.

@sugatoray
Copy link
Contributor Author

sugatoray commented Feb 24, 2022

This PR aside, I am actually working on adding statsforecast to conda-forge channel. Although you have a conda installer, it does not help when some other package that depends on this library wants itself on conda-forge channel.

The conda-forge ecosystem is built to contain all necessary packages in the channel itself. Since, it is one of the largest channels on conda, it makes sense to add PyPI packages to conda-forge.

Once the conda-forge PR is merged you will be able to install it with:

conda install -c conda-forge statsforecast

cc: @jmoralez @FedericoGarza

docs/index.html Outdated Show resolved Hide resolved
nbs/index.ipynb Outdated
Comment on lines 57 to 58
"[Getting started](https://github.com/Nixtla/statsforecast/tree/main/#-getting-started-) •\n",
"[Installation](https://github.com/Nixtla/statsforecast/tree/main/#-installation)\n",
Copy link
Member

Choose a reason for hiding this comment

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

Setting these as relative will allow them to work even on your branch so we can test them and (hopefully) in the docs as well.

Suggested change
"[Getting started](https://github.com/Nixtla/statsforecast/tree/main/#-getting-started-) •\n",
"[Installation](https://github.com/Nixtla/statsforecast/tree/main/#-installation)\n",
"[Getting started](#-getting-started-) •\n",
"[Installation](#-installation)\n",

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But this is the source of the broken link on PyPI. Unless you somehow make them absolute links, I am not sure that problem goes away.

Copy link
Member

Choose a reason for hiding this comment

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

Ah I thought you meant they were broken in the github README. I agree with using the full links so they work on github, the webpage and PyPI. Can you please also change the section that says You can reproduce the results to use the github link as well?

README.md Outdated
@@ -121,7 +121,7 @@ pip install -e .

## 🧬 How to use

```python
```
Copy link
Member

Choose a reason for hiding this comment

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

Can you please re-render this and make sure that the python suffix stays there? Otherwise the syntax highlighting gets lost.

Copy link
Contributor Author

@sugatoray sugatoray Feb 24, 2022

Choose a reason for hiding this comment

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

So, the nbdev rendering does not keep the python language specifier (L/S)? Do I have to manually ensure that the python L/S is still there (after the rendering)?

Copy link
Member

Choose a reason for hiding this comment

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

Did you save the executed notebook and ran the build_docs? The only reason I can think of that it would do this is if there's no metadata specifying the language in the notebook.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah! No, I did not execute the notebook. I just made the changes in the markdown and saved the file. And then ran the command you had mentioned.

Copy link
Member

Choose a reason for hiding this comment

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

Following #28 I think we may change the way we generate the README so if you want to fix the links as well we appreciate it but if this becomes too burdensome the changes in the manifest are already a huge help. Thank you!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had a similar problem for one of my repositories. The hack that I implemented allowed me to keep relative links in readme file, but while publishing to PyPI, since it runs setup.py, the target set of links were updated with absolute path. This might give you an idea.

I am skipping updating the notebook/readme for now (reverted already). Please let me know if the rest is fine now.

- include/exclude files in source-distribution
Copy link
Member

@jmoralez jmoralez left a comment

Choose a reason for hiding this comment

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

Thank you very much!

@sugatoray
Copy link
Contributor Author

sugatoray commented Feb 27, 2022

@jmoralez If you just change the links from markdown format [![_description](_badge)](_target) to equivalent html, I think that should fix this. I am one of the contributors of seqlike. You might find the README.md of seqlike repo useful to fix this issue.

<a href="_TARGET_URL">
    <img src="_BADGE_URL" alt="_DESCRIPTION" />
</a>

image

@mergenthaler
Copy link
Member

@all-contributors please add @sugatoray for code

@allcontributors
Copy link
Contributor

@mergenthaler

I've put up a pull request to add @sugatoray! 🎉

@mergenthaler
Copy link
Member

@all-contributors please add @sugatoray for code

@allcontributors
Copy link
Contributor

@mergenthaler

@sugatoray already contributed before to code

@mergenthaler
Copy link
Member

@all-contributors please add @sugatoray for code

@allcontributors
Copy link
Contributor

@mergenthaler

I've put up a pull request to add @sugatoray! 🎉

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.

None yet

4 participants