8000 Deprecate pkg_resources.declare_namespace by cyschneck · Pull Request #557 · NCAR/geocat-comp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Deprecate pkg_resources.declare_namespace #557

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

Closed
wants to merge 12 commits into from

Conversation

cyschneck
Copy link
Contributor

PR Summary

Closes #547

PR Checklist

General

  • Make an issue if one doesn't already exist
  • Link the issue this PR resolves by adding closes #XXX to the PR description where XXX is the number of the issue.
  • Add a brief summary of changes to docs/release-notes.rst in a relevant section for the next unreleased release. Possible sections include: Documentation, New Features, Bug Fixes, Internal Changes, Breaking Changes/Deprecated
  • Add appropriate labels to this PR
  • Make your changes in a forked repository rather than directly in this repo
  • Open this PR as a draft if it is not ready for review
  • Convert this PR from a draft to a full PR before requesting reviewers
  • Passes precommit. To set up on your local, run pre-commit install from the top level of the repository. To manually run pre-commits, use pre-commit run --all-files and re-add any changed files before committing again and pushing.
  • If needed, squash and merge PR commits into a single commit to clean up commit history

@cyschneck cyschneck self-assigned this Feb 20, 2024
@cyschneck
Copy link
Contributor Author

The current issue appears to be the result of how Sphinx find and imports the geocat.comp package. Both the link-checker and the readthedocs are not currently able to import the module.

The readthedocs builds itself from the configuration file conf.py

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/geocat-comp/conda/557/lib/python3.12/site-packages/sphinx/config.py", line 358, in eval_config_file
    exec(code, namespace)  # NoQA: S102
    ^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/geocat-comp/checkouts/557/docs/conf.py", line 27, in <module>
    import geocat.comp as gc
ModuleNotFoundError: No module named 'geocat.comp'

The path to the geocat package should have been resolved by the adding the package path to conf.py (as sys.path.insert(0, os.path.abspath("../geocat"))) and the package directory as part of the setup.cfg (as package_dir==geocat combined with where=geocat)

But it seems like it still can't find the root directory package to build from

I am not seeing the new path as part of the sys.path in the readthedocs:

sys.path: ['/home/docs/checkouts/readthedocs.org/user_builds/geocat-comp/checkouts/557/geocat', '/home/docs/checkouts/readthedocs.org/user_builds/geocat-comp/checkouts/557/docs', '/home/docs/checkouts/readthedocs.org/user_builds/geocat-comp/conda/557/lib/python312.zip', '/home/docs/checkouts/readthedocs.org/user_builds/geocat-comp/conda/557/lib/python3.12', '/home/docs/checkouts/readthedocs.org/user_builds/geocat-comp/conda/557/lib/python3.12/lib-dynload', '/home/docs/checkouts/readthedocs.org/user_builds/geocat-comp/conda/557/lib/python3.12/site-packages']

@cyschneck cyschneck added bug Something isn't working dependencies Pull requests that update a dependency file labels Feb 26, 2024
@anissa111
Copy link
Member

Following up from our DM conversation, I've moved this over to #563

@anissa111 anissa111 closed this Feb 26, 2024
@cyschneck cyschneck deleted the namespace_547 branch February 29, 2024 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Packaging updates needed for namespace packages
2 participants
0