Skip to content

Commit 8102f46

Browse files
authored
Merge pull request #28 from StreetEasy/docs/initial_docs
chore:added site_url to mkdocs
2 parents 19e6ad5 + 07d1cf7 commit 8102f46

13 files changed

+433
-40
lines changed

.config/.gitchangelog.rc

+289
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,289 @@
1+
# -*- coding: utf-8; mode: python -*-
2+
##
3+
## Format
4+
##
5+
## ACTION: [AUDIENCE:] COMMIT_MSG [!TAG ...]
6+
##
7+
## Description
8+
##
9+
## ACTION is one of 'chg', 'fix', 'new'
10+
##
11+
## Is WHAT the change is about.
12+
##
13+
## 'chg' is for refactor, small improvement, cosmetic changes...
14+
## 'fix' is for bug fixes
15+
## 'new' is for new features, big improvement
16+
##
17+
## AUDIENCE is optional and one of 'dev', 'usr', 'pkg', 'test', 'doc'
18+
##
19+
## Is WHO is concerned by the change.
20+
##
21+
## 'dev' is for developpers (API changes, refactors...)
22+
## 'usr' is for final users (UI changes)
23+
## 'pkg' is for packagers (packaging changes)
24+
## 'test' is for testers (test only related changes)
25+
## 'doc' is for doc guys (doc only changes)
26+
##
27+
## COMMIT_MSG is ... well ... the commit message itself.
28+
##
29+
## TAGs are additionnal adjective as 'refactor' 'minor' 'cosmetic'
30+
##
31+
## They are preceded with a '!' or a '@' (prefer the former, as the
32+
## latter is wrongly interpreted in github.) Commonly used tags are:
33+
##
34+
## 'refactor' is obviously for refactoring code only
35+
## 'minor' is for a very meaningless change (a typo, adding a comment)
36+
## 'cosmetic' is for cosmetic driven change (re-indentation, 80-col...)
37+
## 'wip' is for partial functionality but complete subfunctionality.
38+
##
39+
## Example:
40+
##
41+
## new: usr: support of bazaar implemented
42+
## chg: re-indentend some lines !cosmetic
43+
## new: dev: updated code to be compatible with last version of killer lib.
44+
## fix: pkg: updated year of licence coverage.
45+
## new: test: added a bunch of test around user usability of feature X.
46+
## fix: typo in spelling my name in comment. !minor
47+
##
48+
## Please note that multi-line commit message are supported, and only the
49+
## first line will be considered as the "summary" of the commit message. So
50+
## tags, and other rules only applies to the summary. The body of the commit
51+
## message will be displayed in the changelog without reformatting.
52+
53+
54+
##
55+
## ``ignore_regexps`` is a line of regexps
56+
##
57+
## Any commit having its full commit message matching any regexp listed here
58+
## will be ignored and won't be reported in the changelog.
59+
##
60+
ignore_regexps = [
61+
r'@minor', r'!minor',
62+
r'@cosmetic', r'!cosmetic',
63+
r'@refactor', r'!refactor',
64+
r'@wip', r'!wip',
65+
r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*[p|P]kg:',
66+
r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*[d|D]ev:',
67+
r'^(.{3,3}\s*:)?\s*[fF]irst commit.?\s*$',
68+
r'^$', ## ignore commits with empty messages
69+
]
70+
71+
72+
## ``section_regexps`` is a list of 2-tuples associating a string label and a
73+
## list of regexp
74+
##
75+
## Commit messages will be classified in sections thanks to this. Section
76+
## titles are the label, and a commit is classified under this section if any
77+
## of the regexps associated is matching.
78+
##
79+
## Please note that ``section_regexps`` will only classify commits and won't
80+
## make any changes to the contents. So you'll probably want to go check
81+
## ``subject_process`` (or ``body_process``) to do some changes to the subject,
82+
## whenever you are tweaking this variable.
83+
##
84+
section_regexps = [
85+
('New', [
86+
r'^[nN]ew\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$',
87+
]),
88+
('Changes', [
89+
r'^[cC]hg\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$',
90+
]),
91+
('Fix', [
92+
r'^[fF]ix\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$',
93+
]),
94+
95+
('Other', None ## Match all lines
96+
),
97+
98+
]
99+
100+
101+
## ``body_process`` is a callable
102+
##
103+
## This callable will be given the original body and result will
104+
## be used in the changelog.
105+
##
106+
## Available constructs are:
107+
##
108+
## - any python callable that take one txt argument and return txt argument.
109+
##
110+
## - ReSub(pattern, replacement): will apply regexp substitution.
111+
##
112+
## - Indent(chars=" "): will indent the text with the prefix
113+
## Please remember that template engines gets also to modify the text and
114+
## will usually indent themselves the text if needed.
115+
##
116+
## - Wrap(regexp=r"\n\n"): re-wrap text in separate paragraph to fill 80-Columns
117+
##
118+
## - noop: do nothing
119+
##
120+
## - ucfirst: ensure the first letter is uppercase.
121+
## (usually used in the ``subject_process`` pipeline)
122+
##
123+
## - final_dot: ensure text finishes with a dot
124+
## (usually used in the ``subject_process`` pipeline)
125+
##
126+
## - strip: remove any spaces before or after the content of the string
127+
##
128+
## - SetIfEmpty(msg="No commit message."): will set the text to
129+
## whatever given ``msg`` if the current text is empty.
130+
##
131+
## Additionally, you can `pipe` the provided filters, for instance:
132+
#body_process = Wrap(regexp=r'\n(?=\w+\s*:)') | Indent(chars=" ")
133+
#body_process = Wrap(regexp=r'\n(?=\w+\s*:)')
134+
#body_process = noop
135+
body_process = ReSub(r'((^|\n)[A-Z]\w+(-\w+)*: .*(\n\s+.*)*)+$', r'') | strip
136+
137+
138+
## ``subject_process`` is a callable
139+
##
140+
## This callable will be given the original subject and result will
141+
## be used in the changelog.
142+
##
143+
## Available constructs are those listed in ``body_process`` doc.
144+
subject_process = (strip |
145+
ReSub(r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n@]*)(@[a-z]+\s+)*$', r'\4') |
146+
SetIfEmpty("No commit message.") | ucfirst | final_dot)
147+
148+
149+
## ``tag_filter_regexp`` is a regexp
150+
##
151+
## Tags that will be used for the changelog must match this regexp.
152+
##
153+
tag_filter_regexp = r'^[0-9]+\.[0-9]+(\.[0-9]+)?$'
154+
155+
156+
## ``unreleased_version_label`` is a string or a callable that outputs a string
157+
##
158+
## This label will be used as the changelog Title of the last set of changes
159+
## between last valid tag and HEAD if any.
160+
unreleased_version_label = "(unreleased)"
161+
162+
163+
## ``output_engine`` is a callable
164+
##
165+
## This will change the output format of the generated changelog file
166+
##
167+
## Available choices are:
168+
##
169+
## - rest_py
170+
##
171+
## Legacy pure python engine, outputs ReSTructured text.
172+
## This is the default.
173+
##
174+
## - mustache(<template_name>)
175+
##
176+
## Template name could be any of the available templates in
177+
## ``templates/mustache/*.tpl``.
178+
## Requires python package ``pystache``.
179+
## Examples:
180+
## - mustache("markdown")
181+
## - mustache("restructuredtext")
182+
##
183+
## - makotemplate(<template_name>)
184+
##
185+
## Template name could be any of the available templates in
186+
## ``templates/mako/*.tpl``.
187+
## Requires python package ``mako``.
188+
## Examples:
189+
## - makotemplate("restructuredtext")
190+
##
191+
output_engine = rest_py
192+
#output_engine = mustache("restructuredtext")
193+
#output_engine = mustache("markdown")
194+
#output_engine = makotemplate("restructuredtext")
195+
196+
197+
## ``include_merge`` is a boolean
198+
##
199+
## This option tells git-log whether to include merge commits in the log.
200+
## The default is to include them.
201+
include_merge = True
202+
203+
204+
## ``log_encoding`` is a string identifier
205+
##
206+
## This option tells gitchangelog what encoding is outputed by ``git log``.
207+
## The default is to be clever about it: it checks ``git config`` for
208+
## ``i18n.logOutputEncoding``, and if not found will default to git's own
209+
## default: ``utf-8``.
210+
#log_encoding = 'utf-8'
211+
212+
213+
## ``publish`` is a callable
214+
##
215+
## Sets what ``gitchangelog`` should do with the output generated by
216+
## the output engine. ``publish`` is a callable taking one argument
217+
## that is an interator on lines from the output engine.
218+
##
219+
## Some helper callable are provided:
220+
##
221+
## Available choices are:
222+
##
223+
## - stdout
224+
##
225+
## Outputs directly to standard output
226+
## (This is the default)
227+
##
228+
## - FileInsertAtFirstRegexMatch(file, pattern, idx=lamda m: m.start())
229+
##
230+
## Creates a callable that will parse given file for the given
231+
## regex pattern and will insert the output in the file.
232+
## ``idx`` is a callable that receive the matching object and
233+
## must return a integer index point where to insert the
234+
## the output in the file. Default is to return the position of
235+
## the start of the matched string.
236+
##
237+
## - FileRegexSubst(file, pattern, replace, flags)
238+
##
239+
## Apply a replace inplace in the given file. Your regex pattern must
240+
## take care of everything and might be more complex. Check the README
241+
## for a complete copy-pastable example.
242+
##
243+
# publish = FileInsertIntoFirstRegexMatch(
244+
# "CHANGELOG.rst",
245+
# r'/(?P<rev>[0-9]+\.[0-9]+(\.[0-9]+)?)\s+\([0-9]+-[0-9]{2}-[0-9]{2}\)\n--+\n/',
246+
# idx=lambda m: m.start(1)
247+
# )
248+
#publish = stdout
249+
250+
251+
## ``revs`` is a list of callable or a list of string
252+
##
253+
## callable will be called to resolve as strings and allow dynamical
254+
## computation of these. The result will be used as revisions for
255+
## gitchangelog (as if directly stated on the command line). This allows
256+
## to filter exaclty which commits will be read by gitchangelog.
257+
##
258+
## To get a full documentation on the format of these strings, please
259+
## refer to the ``git rev-list`` arguments. There are many examples.
260+
##
261+
## Using callables is especially useful, for instance, if you
262+
## are using gitchangelog to generate incrementally your changelog.
263+
##
264+
## Some helpers are provided, you can use them::
265+
##
266+
## - FileFirstRegexMatch(file, pattern): will return a callable that will
267+
## return the first string match for the given pattern in the given file.
268+
## If you use named sub-patterns in your regex pattern, it'll output only
269+
## the string matching the regex pattern named "rev".
270+
##
271+
## - Caret(rev): will return the rev prefixed by a "^", which is a
272+
## way to remove the given revision and all its ancestor.
273+
##
274+
## Please note that if you provide a rev-list on the command line, it'll
275+
## replace this value (which will then be ignored).
276+
##
277+
## If empty, then ``gitchangelog`` will act as it had to generate a full
278+
## changelog.
279+
##
280+
## The default is to use all commits to make the changelog.
281+
#revs = ["^1.0.3", ]
282+
#revs = [
283+
# Caret(
284+
# FileFirstRegexMatch(
285+
# "CHANGELOG.rst",
286+
# r"(?P<rev>[0-9]+\.[0-9]+(\.[0-9]+)?)\s+\([0-9]+-[0-9]{2}-[0-9]{2}\)\n--+\n")),
287+
# "HEAD"
288+
#]
289+
revs = []

.config/mkdocs/mkdocs.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
site_name: DfSchema Documentation
2+
site_url: https://StreetEasy.github.io/dfs/
23

34
theme:
45
name: "material"
@@ -18,4 +19,5 @@ nav:
1819
- Command Line Interface: cli.md
1920
- tutorials.md
2021
- benchmarks.md
21-
- Roadmap and Changelog: rm_and_changelog.md
22+
- Changelog: changelog.md
23+
- Roadmap: roadmap.md

.github/workflows/buid-docs.yml

-24
This file was deleted.

.github/workflows/pre-release.yml

+19-1
Original file line numberDiff line numberDiff line change
@@ -105,4 +105,22 @@ jobs:
105105
- run: poetry config pypi-token.testpypi ${{ secrets.TEST_PYPI_TOKEN }}
106106

107107
- name: Publish package
108-
run: poetry publish --no-interaction --dry-run -r testpypi -vvv
108+
run: poetry publish --no-interaction --dry-run -r testpypi -vvv
109+
110+
build_docs:
111+
name: Build and deploy docs
112+
runs-on: ubuntu-latest
113+
needs: test_and_build
114+
115+
steps:
116+
- name: Checkout main
117+
uses: actions/checkout@v2
118+
119+
- name: Deploy docs
120+
uses: mhausenblas/mkdocs-deploy-gh-pages@master
121+
# Or use mhausenblas/mkdocs-deploy-gh-pages@nomaterial to build without the mkdocs-material theme
122+
env:
123+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
124+
CONFIG_FILE: .config/mkdocs/mkdocs.yml
125+
REQUIREMENTS: .config/mkdocs/requirements.txt
126+
# EXTRA_PACKAGES: build-base

.github/workflows/release.yml

+20-2
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ jobs:
104104
- name: Install dependencies
105105
run: |
106106
poetry install
107-
107+
108108
- name: Build sdist
109109
run: poetry build -f sdist
110110

@@ -115,4 +115,22 @@ jobs:
115115
- run: poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
116116

117117
- name: Publish package
118-
run: poetry publish --no-interaction -vvv
118+
run: poetry publish --no-interaction -vvv
119+
120+
build_docs:
121+
name: Build and deploy docs
122+
runs-on: ubuntu-latest
123+
needs: test_and_build
124+
125+
steps:
126+
- name: Checkout main
127+
uses: actions/checkout@v2
128+
129+
- name: Deploy docs
130+
uses: mhausenblas/mkdocs-deploy-gh-pages@master
131+
# Or use mhausenblas/mkdocs-deploy-gh-pages@nomaterial to build without the mkdocs-material theme
132+
env:
133+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
134+
CONFIG_FILE: .config/mkdocs/mkdocs.yml
135+
REQUIREMENTS: .config/mkdocs/requirements.txt
136+
# EXTRA_PACKAGES: build-base

0 commit comments

Comments
 (0)