Coder Social home page Coder Social logo

wemake-services / jinja2-git Goto Github PK

View Code? Open in Web Editor NEW
15.0 15.0 3.0 425 KB

Jinja2 extension to handle git-specific things

Home Page: https://pypi.org/project/jinja2-git/

License: MIT License

Python 100.00%
cookiecutter git jinja2 jinja2-extension jinja2-templates jinja2-templating-engine

jinja2-git's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar mikhail-akimov avatar sobolevn avatar zoidyzoidzoid avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

jinja2-git's Issues

Support `python3.7`

There's a new python version that we currently do not officially support.

What need to be done:

  1. We need to remove these classifiers: https://github.com/sobolevn/jinja2-git/blob/master/pyproject.toml#L30-L34
  2. We need to add new python version here: https://github.com/sobolevn/jinja2-git/blob/master/pyproject.toml#L38, example: https://github.com/wemake-services/wemake-python-styleguide/blob/master/pyproject.toml#L40
  3. We need to add python3.7 inside travis builds, example: https://github.com/wemake-services/wemake-python-styleguide/blob/master/.travis.yml#L3-L9

add functionality to parse the latest git tag

I need a similar functionality to the one you provide for the git hash just for the latest git tag, i.e., the output of:
git describe --tags --abbrev=0

Would you be willing to include this into your package (could make a PR), or should I create my own package?

Add `{% gitcommit short=True %}` option

Currently this library only allows users to get the full commit hash.

I would see some possible usages of the short commit hash as well.
So, I would like to propose the following syntax for it: {% gitcommit short=True %}.

What needs to be done?

  1. we need to find out how to pass parameters to the jinja2 tags
  2. we need to add a new parameter to the _commit_hash method
  3. we need to write tests for this feature
  4. we need to write docs for this feature as well https://github.com/sobolevn/jinja2-git#usage

This was originally a # TODO comment: https://github.com/sobolevn/jinja2-git/blob/23172f3a7f26b6f551f70a8c6aaa818a79918e4f/jinja2_git.py#L22

Fix travis CI builds

After #3 was merged we have broken our CI.

Problem

Travis builds fail: https://travis-ci.org/sobolevn/jinja2-git/jobs/432398548
Traceback:

0.33s$ tox
ERROR: No setup.py file found. The expected location is:
  /home/travis/build/sobolevn/jinja2-git/setup.py
You can
  1. Create one:
     https://packaging.python.org/tutorials/distributing-packages/#setup-py
  2. Configure tox to avoid running sdist:
     https://tox.readthedocs.io/en/latest/example/general.html#avoiding-expensive-sdist
The command "tox" exited with 1.

Solution

We have to switch how our CI works. Currently it uses tox + setup.py which is gone.
But, we now need to use poetry instead.

Resources that might help you @mikhail-akimov :

  1. poetry + tox travis example: https://github.com/sdispater/pendulum/blob/master/tox.ini
  2. poetry travis example without tox: https://github.com/wemake-services/wemake-python-styleguide/blob/master/.travis.yml

Please, feel free to ask any questions you have.

Convert `README.rst` to `README.md`

@mikhail-akimov Currently we use rst as the legacy format that was supported via old PyPI.
But, new PyPI release also supports md. Just like poetry.

So, what we need to do is manually convert README.rst into README.md.
Could you please help me with that?

git repository

It would be nice to be able to pass the git repository to subprocess.check_output(params, cwd=repo), otherwise this returns an error message when the git repository is not in the same directory.

New release for jinja 3.x?

Can you make a new release, please? The last one is May 2020, but several important changes, including Jinja 3.x support (#120) have been merged since then.

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.