Skip to content

Commit

Permalink
Merge pull request #13 from moremoban/dev
Browse files Browse the repository at this point in the history
fix issue 12
  • Loading branch information
chfw authored Oct 18, 2024
2 parents b5d6056 + 92d63a6 commit b463cd0
Show file tree
Hide file tree
Showing 13 changed files with 139 additions and 44 deletions.
50 changes: 45 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
Expand All @@ -52,8 +51,10 @@ htmlcov/
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
Expand All @@ -63,6 +64,7 @@ coverage.xml
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
Expand All @@ -75,6 +77,7 @@ instance/
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
Expand All @@ -85,17 +88,23 @@ profile_default/
ipython_config.py

# pyenv
.python-version
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that dont work, or not
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# celery beat schedule file
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py
Expand Down Expand Up @@ -127,6 +136,12 @@ dmypy.json
# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# VirtualEnv rules
# Virtualenv
# http://iamzed.com/2009/05/07/a-primer-on-virtualenv/
Expand Down Expand Up @@ -159,6 +174,7 @@ pip-selfcheck.json
# Windows rules
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db

Expand Down Expand Up @@ -264,13 +280,15 @@ flycheck_*.el
# Vim rules
# Swap
[._]*.s[a-v][a-z]
!*.svg # comment out if you don't need vector files
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]

# Session
Session.vim
Sessionx.vim

# Temporary
.netrwhist
Expand All @@ -281,7 +299,7 @@ tags
[._]*.un~

# JetBrains rules
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
Expand Down Expand Up @@ -311,9 +329,14 @@ tags
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/
Expand Down Expand Up @@ -363,6 +386,7 @@ fabric.properties

# SFTP configuration file
sftp-config.json
sftp-config-alt*.json

# Package control specific files
Package Control.last-run
Expand Down Expand Up @@ -400,6 +424,10 @@ tmtags
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace

# Local History for Visual Studio Code
.history/

# Xcode rules
# Xcode
Expand All @@ -426,6 +454,9 @@ DerivedData/
*.perspectivev3
!default.perspectivev3

## Gcc Patch
/*.gcno

# Eclipse rules
.metadata
bin/
Expand Down Expand Up @@ -477,12 +508,17 @@ local.properties

# Annotation Processing
.apt_generated/
.apt_generated_test/

# Scala IDE specific (Scala & Java development for Eclipse)
.cache-main
.scala_dependencies
.worksheet

# Uncomment this line if you wish to ignore the project description file.
# Typically, this file would be tracked if it contains build/dependency configurations:
#.project

# TortoiseGit rules
# Project-level settings
/.tgitconfig
Expand All @@ -504,3 +540,7 @@ cscope.files
cscope.out
cscope.in.out
cscope.po.out


# remove moban hash dictionary
.moban.hashes
6 changes: 6 additions & 0 deletions .moban.d/CUSTOM_README.rst.jj2
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ does not help commit and push the changes for you.

Plus, the intention is never to write to a repository.

Primary use case
--------------------------------------------------------------------------------

{% include "gitfs2_example.rst.jj2" %}


License
--------------------------------------------------------------------------------

Expand Down
14 changes: 14 additions & 0 deletions .moban.d/gitfs2_example.rst.jj2
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
You can do the following with moban:

.. code-block:: bash

$ moban -t 'git://github.com/moremoban/pypi-mobans.git!/templates/_version.py.jj2' \
-c 'git://github.com/moremoban/pypi-mobans.git!/config/data.yml' \
-o _version.py
Info: Found repo in /Users/jaska/Library/Caches/gitfs2/repos/pypi-mobans
Templating git://github.com/moremoban/pypi-mobans.git!/templates/_version.py.jj2 to _version.py
Templated 1 file.
$ cat _version.py
__version__ = "0.1.1rc3"
__author__ = "C.W."

18 changes: 3 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ notifications:
python:
- &pypy2 pypy2.7-6.0
- &pypy3 pypy3.5-6.0
- 3.8-dev
- 3.8
- 3.7
- 3.6
- 3.5
Expand All @@ -16,25 +16,13 @@ stages:
- lint
- test

.disable_global: &disable_global
addons: false
cache: false
env: {}
python: false
before_install: false
install: false
before_script: false
script: false
after_success: false
after_failure: false
before_deploy: false
deploy: false

.lint: &lint
<<: *disable_global
git:
submodules: false
python: 3.6
env:
- MINREQ=0
stage: lint
script: make install_test lint format git-diff-check

Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Change log
================================================================================

0.0.4 - 10.11.2024
--------------------------------------------------------------------------------

**Added**

#. `#12 <https://github.com/moremoban/gitfs2/issues/12>`_:fix github protocol
timeout problem

0.0.3 - 11.12.2019
--------------------------------------------------------------------------------

Expand Down
34 changes: 30 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,20 @@ gitfs2

.. image:: https://codecov.io/github/moremoban/gitfs2/coverage.png
:target: https://codecov.io/github/moremoban/gitfs2

.. image:: https://badge.fury.io/py/gitfs2.svg
:target: https://pypi.org/project/gitfs2

.. image:: https://pepy.tech/badge/gitfs2/month
:target: https://pepy.tech/project/gitfs2/month
:target: https://pepy.tech/project/gitfs2

.. image:: https://img.shields.io/github/stars/moremoban/gitfs2.svg?style=social&maxAge=3600&label=Star
:target: https://github.com/moremoban/gitfs2/stargazers

.. image:: https://img.shields.io/static/v1?label=continuous%20templating&message=%E6%A8%A1%E7%89%88%E6%9B%B4%E6%96%B0&color=blue&style=flat-square
:target: https://moban.readthedocs.io/en/latest/#at-scale-continous-templating-for-open-source-projects

.. image:: https://img.shields.io/static/v1?label=coding%20style&message=black&color=black&style=flat-square
:target: https://github.com/psf/black

.. image:: https://dev.azure.com/moremoban/gitfs2/_apis/build/status/moremoban.gitfs2?branchName=master
:target: https://dev.azure.com/moremoban/gitfs2/_build/latest?definitionId=2&branchName=master
Expand All @@ -34,7 +41,7 @@ Get a file inside a python package
>>> import fs
>>> git_fs = fs.open_fs("git://github.com/moremobans/pypi-mobans.git!/templates")
>>> git_fs.readtext("_version.py.jj2")
'__version__ = "0.0.3"\n__author__ = "C.W."\n'
'__version__ = "0.0.4"\n__author__ = "C.W."\n'
Get from a different branch
Expand All @@ -45,7 +52,7 @@ Get from a different branch
>>> import fs
>>> git_fs = fs.open_fs("git://github.com/moremobans/pypi-mobans.git?branch=master!/templates")
>>> git_fs.read("_version.py.jj2")
'__version__ = "0.0.3"\n__author__ = "C.W."\n'
'__version__ = "0.0.4"\n__author__ = "C.W."\n'
Checkout submodules recursively
Expand All @@ -64,6 +71,25 @@ does not help commit and push the changes for you.

Plus, the intention is never to write to a repository.

Primary use case
--------------------------------------------------------------------------------

You can do the following with moban:

.. code-block:: bash
$ moban -t 'git://github.com/moremoban/pypi-mobans.git!/templates/_version.py.jj2' \
-c 'git://github.com/moremoban/pypi-mobans.git!/config/data.yml' \
-o _version.py
Info: Found repo in /Users/jaska/Library/Caches/gitfs2/repos/pypi-mobans
Templating git://github.com/moremoban/pypi-mobans.git!/templates/_version.py.jj2 to _version.py
Templated 1 file.
$ cat _version.py
__version__ = "0.1.1rc3"
__author__ = "C.W."
License
--------------------------------------------------------------------------------

Expand Down
6 changes: 6 additions & 0 deletions changelog.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: gitfs2
organisation: moremoban
releases:
- changes:
- action: Added
details:
- "`#12`:fix github protocol timeout problem"
version: 0.0.4
date: 10.11.2024
- changes:
- action: Added
details:
Expand Down
6 changes: 3 additions & 3 deletions gitfs2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ organisation: "moremoban"
author: "C.W."
contact: "[email protected]"
company: "moban dev team"
version: "0.0.3"
current_version: "0.0.3"
release: "0.0.3"
version: "0.0.4"
current_version: "0.0.4"
release: "0.0.4"
copyright_year: 2019
license: MIT
dependencies:
Expand Down
2 changes: 1 addition & 1 deletion gitfs2/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = "0.0.3"
__version__ = "0.0.4"
__author__ = "C.W."
2 changes: 1 addition & 1 deletion gitfs2/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class GitRequire(object):
def __init__(
self, git_url=None, branch=None, submodule="False", reference=None
):
self.git_url = git_url
self.git_url = git_url.replace("git://", "ssh://git@")
self.submodule = convert_submodule(submodule)
self.branch = branch
self.reference = reference
Expand Down
2 changes: 1 addition & 1 deletion lint.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pip install flake8
flake8 . --exclude=.moban.d,docs,setup.py --builtins=unicode,xrange,long
flake8 --exclude=.moban.d,docs,setup.py --builtins=unicode,xrange,long . && python setup.py checkdocs
Loading

0 comments on commit b463cd0

Please sign in to comment.