Skip to content

Commit b463cd0

Browse files
authored
Merge pull request #13 from moremoban/dev
fix issue 12
2 parents b5d6056 + 92d63a6 commit b463cd0

13 files changed

+139
-44
lines changed

.gitignore

+45-5
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ parts/
2525
sdist/
2626
var/
2727
wheels/
28-
pip-wheel-metadata/
2928
share/python-wheels/
3029
*.egg-info/
3130
.installed.cfg
@@ -52,8 +51,10 @@ htmlcov/
5251
nosetests.xml
5352
coverage.xml
5453
*.cover
54+
*.py,cover
5555
.hypothesis/
5656
.pytest_cache/
57+
cover/
5758

5859
# Translations
5960
*.mo
@@ -63,6 +64,7 @@ coverage.xml
6364
*.log
6465
local_settings.py
6566
db.sqlite3
67+
db.sqlite3-journal
6668

6769
# Flask stuff:
6870
instance/
@@ -75,6 +77,7 @@ instance/
7577
docs/_build/
7678

7779
# PyBuilder
80+
.pybuilder/
7881
target/
7982

8083
# Jupyter Notebook
@@ -85,17 +88,23 @@ profile_default/
8588
ipython_config.py
8689

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

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

97-
# celery beat schedule file
102+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
103+
__pypackages__/
104+
105+
# Celery stuff
98106
celerybeat-schedule
107+
celerybeat.pid
99108

100109
# SageMath parsed files
101110
*.sage.py
@@ -127,6 +136,12 @@ dmypy.json
127136
# Pyre type checker
128137
.pyre/
129138

139+
# pytype static type analyzer
140+
.pytype/
141+
142+
# Cython debug symbols
143+
cython_debug/
144+
130145
# VirtualEnv rules
131146
# Virtualenv
132147
# http://iamzed.com/2009/05/07/a-primer-on-virtualenv/
@@ -159,6 +174,7 @@ pip-selfcheck.json
159174
# Windows rules
160175
# Windows thumbnail cache files
161176
Thumbs.db
177+
Thumbs.db:encryptable
162178
ehthumbs.db
163179
ehthumbs_vista.db
164180

@@ -264,13 +280,15 @@ flycheck_*.el
264280
# Vim rules
265281
# Swap
266282
[._]*.s[a-v][a-z]
283+
!*.svg # comment out if you don't need vector files
267284
[._]*.sw[a-p]
268285
[._]s[a-rt-v][a-z]
269286
[._]ss[a-gi-z]
270287
[._]sw[a-p]
271288

272289
# Session
273290
Session.vim
291+
Sessionx.vim
274292

275293
# Temporary
276294
.netrwhist
@@ -281,7 +299,7 @@ tags
281299
[._]*.un~
282300

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

287305
# User-specific stuff
@@ -311,9 +329,14 @@ tags
311329
# When using Gradle or Maven with auto-import, you should exclude module files,
312330
# since they will be recreated, and may cause churn. Uncomment if using
313331
# auto-import.
332+
# .idea/artifacts
333+
# .idea/compiler.xml
334+
# .idea/jarRepositories.xml
314335
# .idea/modules.xml
315336
# .idea/*.iml
316337
# .idea/modules
338+
# *.iml
339+
# *.ipr
317340

318341
# CMake
319342
cmake-build-*/
@@ -363,6 +386,7 @@ fabric.properties
363386

364387
# SFTP configuration file
365388
sftp-config.json
389+
sftp-config-alt*.json
366390

367391
# Package control specific files
368392
Package Control.last-run
@@ -400,6 +424,10 @@ tmtags
400424
!.vscode/tasks.json
401425
!.vscode/launch.json
402426
!.vscode/extensions.json
427+
*.code-workspace
428+
429+
# Local History for Visual Studio Code
430+
.history/
403431

404432
# Xcode rules
405433
# Xcode
@@ -426,6 +454,9 @@ DerivedData/
426454
*.perspectivev3
427455
!default.perspectivev3
428456

457+
## Gcc Patch
458+
/*.gcno
459+
429460
# Eclipse rules
430461
.metadata
431462
bin/
@@ -477,12 +508,17 @@ local.properties
477508

478509
# Annotation Processing
479510
.apt_generated/
511+
.apt_generated_test/
480512

481513
# Scala IDE specific (Scala & Java development for Eclipse)
482514
.cache-main
483515
.scala_dependencies
484516
.worksheet
485517

518+
# Uncomment this line if you wish to ignore the project description file.
519+
# Typically, this file would be tracked if it contains build/dependency configurations:
520+
#.project
521+
486522
# TortoiseGit rules
487523
# Project-level settings
488524
/.tgitconfig
@@ -504,3 +540,7 @@ cscope.files
504540
cscope.out
505541
cscope.in.out
506542
cscope.po.out
543+
544+
545+
# remove moban hash dictionary
546+
.moban.hashes

.moban.d/CUSTOM_README.rst.jj2

+6
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ does not help commit and push the changes for you.
5252

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

55+
Primary use case
56+
--------------------------------------------------------------------------------
57+
58+
{% include "gitfs2_example.rst.jj2" %}
59+
60+
5561
License
5662
--------------------------------------------------------------------------------
5763

.moban.d/gitfs2_example.rst.jj2

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
You can do the following with moban:
2+
3+
.. code-block:: bash
4+
5+
$ moban -t 'git://github.com/moremoban/pypi-mobans.git!/templates/_version.py.jj2' \
6+
-c 'git://github.com/moremoban/pypi-mobans.git!/config/data.yml' \
7+
-o _version.py
8+
Info: Found repo in /Users/jaska/Library/Caches/gitfs2/repos/pypi-mobans
9+
Templating git://github.com/moremoban/pypi-mobans.git!/templates/_version.py.jj2 to _version.py
10+
Templated 1 file.
11+
$ cat _version.py
12+
__version__ = "0.1.1rc3"
13+
__author__ = "C.W."
14+

.travis.yml

+3-15
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ notifications:
66
python:
77
- &pypy2 pypy2.7-6.0
88
- &pypy3 pypy3.5-6.0
9-
- 3.8-dev
9+
- 3.8
1010
- 3.7
1111
- 3.6
1212
- 3.5
@@ -16,25 +16,13 @@ stages:
1616
- lint
1717
- test
1818

19-
.disable_global: &disable_global
20-
addons: false
21-
cache: false
22-
env: {}
23-
python: false
24-
before_install: false
25-
install: false
26-
before_script: false
27-
script: false
28-
after_success: false
29-
after_failure: false
30-
before_deploy: false
31-
deploy: false
3219

3320
.lint: &lint
34-
<<: *disable_global
3521
git:
3622
submodules: false
3723
python: 3.6
24+
env:
25+
- MINREQ=0
3826
stage: lint
3927
script: make install_test lint format git-diff-check
4028

CHANGELOG.rst

+8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
Change log
22
================================================================================
33

4+
0.0.4 - 10.11.2024
5+
--------------------------------------------------------------------------------
6+
7+
**Added**
8+
9+
#. `#12 <https://github.com/moremoban/gitfs2/issues/12>`_:fix github protocol
10+
timeout problem
11+
412
0.0.3 - 11.12.2019
513
--------------------------------------------------------------------------------
614

README.rst

+30-4
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,20 @@ gitfs2
77

88
.. image:: https://codecov.io/github/moremoban/gitfs2/coverage.png
99
:target: https://codecov.io/github/moremoban/gitfs2
10-
1110
.. image:: https://badge.fury.io/py/gitfs2.svg
1211
:target: https://pypi.org/project/gitfs2
1312

1413
.. image:: https://pepy.tech/badge/gitfs2/month
15-
:target: https://pepy.tech/project/gitfs2/month
14+
:target: https://pepy.tech/project/gitfs2
15+
16+
.. image:: https://img.shields.io/github/stars/moremoban/gitfs2.svg?style=social&maxAge=3600&label=Star
17+
:target: https://github.com/moremoban/gitfs2/stargazers
18+
19+
.. 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
20+
:target: https://moban.readthedocs.io/en/latest/#at-scale-continous-templating-for-open-source-projects
1621

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

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

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

74+
Primary use case
75+
--------------------------------------------------------------------------------
76+
77+
You can do the following with moban:
78+
79+
.. code-block:: bash
80+
81+
$ moban -t 'git://github.com/moremoban/pypi-mobans.git!/templates/_version.py.jj2' \
82+
-c 'git://github.com/moremoban/pypi-mobans.git!/config/data.yml' \
83+
-o _version.py
84+
Info: Found repo in /Users/jaska/Library/Caches/gitfs2/repos/pypi-mobans
85+
Templating git://github.com/moremoban/pypi-mobans.git!/templates/_version.py.jj2 to _version.py
86+
Templated 1 file.
87+
$ cat _version.py
88+
__version__ = "0.1.1rc3"
89+
__author__ = "C.W."
90+
91+
92+
6793
License
6894
--------------------------------------------------------------------------------
6995

changelog.yml

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
name: gitfs2
22
organisation: moremoban
33
releases:
4+
- changes:
5+
- action: Added
6+
details:
7+
- "`#12`:fix github protocol timeout problem"
8+
version: 0.0.4
9+
date: 10.11.2024
410
- changes:
511
- action: Added
612
details:

gitfs2.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ organisation: "moremoban"
33
author: "C.W."
44
55
company: "moban dev team"
6-
version: "0.0.3"
7-
current_version: "0.0.3"
8-
release: "0.0.3"
6+
version: "0.0.4"
7+
current_version: "0.0.4"
8+
release: "0.0.4"
99
copyright_year: 2019
1010
license: MIT
1111
dependencies:

gitfs2/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
__version__ = "0.0.3"
1+
__version__ = "0.0.4"
22
__author__ = "C.W."

gitfs2/repo.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class GitRequire(object):
1616
def __init__(
1717
self, git_url=None, branch=None, submodule="False", reference=None
1818
):
19-
self.git_url = git_url
19+
self.git_url = git_url.replace("git://", "ssh://git@")
2020
self.submodule = convert_submodule(submodule)
2121
self.branch = branch
2222
self.reference = reference

lint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
pip install flake8
2-
flake8 . --exclude=.moban.d,docs,setup.py --builtins=unicode,xrange,long
2+
flake8 --exclude=.moban.d,docs,setup.py --builtins=unicode,xrange,long . && python setup.py checkdocs

0 commit comments

Comments
 (0)