Git Product home page Git Product logo

hatch-fancy-pypi-readme's People

Contributors

aarnphm avatar dependabot[bot] avatar hynek avatar ofek avatar pre-commit-ci[bot] avatar zsol avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

hatch-fancy-pypi-readme's Issues

FR: Add support for pattern substitutions

I'm seeing things like this frequently:

# Replace relative paths to images with absolute paths
long_description = re.sub("website/homepage/", "https://raw.githubusercontent.com/gradio-app/gradio/main/website/homepage/", long_description)
long_description = re.sub(r"demo/([\S]*.gif)", r"https://raw.githubusercontent.com/gradio-app/gradio/main/demo/\g<1>", long_description)

maybe:

[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]
find = "website/homepage/"
replace = "https://raw.githubusercontent.com/gradio-app/gradio/main/website/homepage/"

[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]
find = 'demo/([\S]*.gif)'
replace = 'https://raw.githubusercontent.com/gradio-app/gradio/main/demo/\g<1>'

Can't print emojis on Windows

Currently I had to disable the CLI health check in the dev env GitHub Action because it explodes when trying to print our readme:

2022-08-05T16:48:16.5981518Z Traceback (most recent call last):
2022-08-05T16:48:16.5989130Z   File "C:\hostedtoolcache\windows\Python\3.10.5\x64\lib\runpy.py", line 196, in _run_module_as_main
2022-08-05T16:48:16.6072945Z     return _run_code(code, main_globals, None,
2022-08-05T16:48:16.6074114Z   File "C:\hostedtoolcache\windows\Python\3.10.5\x64\lib\runpy.py", line 86, in _run_code
2022-08-05T16:48:16.6074856Z     exec(code, run_globals)
2022-08-05T16:48:16.6075933Z   File "D:\a\hatch-fancy-pypi-readme\hatch-fancy-pypi-readme\src\hatch_fancy_pypi_readme\__main__.py", line 55, in <module>
2022-08-05T16:48:16.6076587Z     main()
2022-08-05T16:48:16.6077360Z   File "D:\a\hatch-fancy-pypi-readme\hatch-fancy-pypi-readme\src\hatch_fancy_pypi_readme\__main__.py", line 51, in main
2022-08-05T16:48:16.6077826Z     cli_run(cfg, out)
2022-08-05T16:48:16.6078517Z   File "D:\a\hatch-fancy-pypi-readme\hatch-fancy-pypi-readme\src\hatch_fancy_pypi_readme\_cli.py", line 50, in cli_run
2022-08-05T16:48:16.6079051Z     print(build_text(config.fragments), file=out)  # pragma: no cover
2022-08-05T16:48:16.6079572Z   File "C:\hostedtoolcache\windows\Python\3.10.5\x64\lib\encodings\cp1252.py", line 19, in encode
2022-08-05T16:48:16.6168727Z     return codecs.charmap_encode(input,self.errors,encoding_table)[0]
2022-08-05T16:48:16.6169952Z UnicodeEncodeError: 'charmap' codec can't encode character '\u2728' in position 45: character maps to <undefined>
2022-08-05T16:48:16.8289601Z ##[error]Process completed with exit code 1.

I have no clue if this is fixable at all?

@ofek you mentioned you use Windows? ๐Ÿ˜‡

Cyclic dependency between hatch-fancy-pypi-readme

We can't package the new version of hatch-fancy-pypi-readme on Gentoo because it has a cyclic dependency between jsonschema and hatch-fancy-pypi-readme. Since jsonschema requires hatch-fancy-pypi-readme to build, it needs to be installed first. However, it doesn't work if it's installed prior to jsonschema and therefore it breaks the build of jsonschema:

Traceback (most recent call last):
  File "/usr/lib/python-exec/pypy3/gpep517", line 4, in <module>
    sys.exit(main())
  File "/usr/lib/pypy3.9/site-packages/gpep517/__main__.py", line 322, in main
    return func(args)
  File "/usr/lib/pypy3.9/site-packages/gpep517/__main__.py", line 122, in build_wheel
    print(build_wheel_impl(args, args.wheel_dir), file=out)
  File "/usr/lib/pypy3.9/site-packages/gpep517/__main__.py", line 105, in build_wheel_impl
    wheel_name = backend.build_wheel(str(wheel_dir), args.config_json)
  File "/usr/lib/pypy3.9/site-packages/hatchling/build.py", line 59, in build_wheel
    return os.path.basename(next(builder.build(wheel_directory, ['standard'])))
  File "/usr/lib/pypy3.9/site-packages/hatchling/builders/plugin/interface.py", line 80, in build
    self.metadata.validate_fields()
  File "/usr/lib/pypy3.9/site-packages/hatchling/metadata/core.py", line 191, in validate_fields
    _ = self.version
  File "/usr/lib/pypy3.9/site-packages/hatchling/metadata/core.py", line 85, in version
    self._set_version()
  File "/usr/lib/pypy3.9/site-packages/hatchling/metadata/core.py", line 173, in _set_version
    version = self.hatch.version.cached
  File "/usr/lib/pypy3.9/site-packages/hatchling/metadata/core.py", line 1256, in cached
    raise type(e)(f'Error getting the version from source `{self.source.PLUGIN_NAME}`: {e}') from None
ModuleNotFoundError: Error getting the version from source `vcs`: No module named 'jsonschema'

Is it intended to install AUTHORS.md as license file?

I am packaging this module in Fedora. During its rpm packaging, fedora-review tool found that this module is installing AUTHORS.md file as /usr/lib/python3.11/site-packages/hatch_fancy_pypi_readme-22.3.0.dist-info/licenses/AUTHORS.md

But this is not a license file. Can this be corrected?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.