Skip to content

Commit 5db4c40

Browse files
More changes before making public
1 parent 787e445 commit 5db4c40

27 files changed

+90
-308
lines changed

.gitlab-ci.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,6 @@
1-
# garpy.mkdocstring changes
1+
# mkdocstring-python-xref changes
22

3-
## 1.5.2.1
3+
## 1.6.2
44

5-
- Fix issue with 1.5.2
6-
7-
## 1.5.2
8-
9-
- Use mkdocstrings-python >=1.5.2,<2.0
10-
11-
## 0.8.4
12-
13-
- Restrict mkdocstrings-python to <1.4.0 (pending support for that version)
14-
15-
## 0.8.3
16-
- Support `..` syntax for parent in addition to `^`
17-
- Deprecate use of `.` to be relative to parent when used in functions/methods.
18-
- Based on mkdocstrings-python >=1.1
19-
- Drop support for python 3.7
20-
21-
## 0.8.2
22-
- Based on mkdocstrings-python >=0.8.2,<0.9
23-
- Support `(p)` specifier for enclosing package
24-
25-
## 0.7.1 - Initial release.
26-
27-
* support for relative cross-references
5+
First public release
286

CONTRIBUTING.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
1-
# Contributing to garpy.mkdocstrings
1+
# Contributing to mkdocstrings-python-xref
22

33
## Prerequisites
44

55
* conda must be installed on your machine
6-
* make must be installed in your base conda environment
7-
* [garconda][] must be installed in your base conda environment
6+
* make should be installed in your base conda environment
87

98
## Development install
109

1110
To (re)create a conda development environment for this project run:
1211

1312
```
1413
make createdev
15-
conda activate garpy.mkdocstrings
14+
conda activate mkxref-dev
1615
```
1716

1817
After you have created the environment for the first time, you can configure your IDE
@@ -26,13 +25,10 @@ make updatedev
2625

2726
This is just an optimization. If it does not work (e.g. can happen when switching to an old branch), just use `createdev`.
2827

29-
## Versioning and Release process
28+
## Versioning
3029

31-
This project follows the [basic garpy.* versioning and release process](https://gitlab.analog.com/boston-garage/garpy/-/blob/master/developer-docs/basic-release-process.md).
30+
The versions will generally track the version of [mkdocstrings_python][] on which it depends.
3231

33-
At least initially, the versions will track the version of [mkdocstrings_python][] on which it depends.
34-
35-
[garconda]: http://boston-garage.pages.gitlab.analog.com/garconda/
3632
[mkdocstrings_python]: https://github.com/mkdocstrings/python
3733

3834

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2021-2022 Analog Devices, Inc.
189+
Copyright 2022-2023 Analog Devices, Inc.
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

Makefile

Lines changed: 23 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
CONDA := conda
2-
GARCONDA := garconda --min-version 0.3.4
32
ECHO := echo
43
RM := rm
54
RMDIR := $(RM) -rf
@@ -24,12 +23,9 @@ COVERAGE_HTML := $(abspath htmlcov)
2423
-include custom.mk
2524

2625
# General env/build/deploy args
27-
SRC := src
28-
29-
PACKAGE := garpy.mkdocstrings
30-
PACKAGE_VERSION_PATH := $(SRC)/mkdocstrings_handlers/garpy_python/VERSION
31-
PACKAGE_COMMAND := $(CAT) $(PACKAGE_VERSION_PATH)
32-
PACKAGE_VER := $(shell $(PACKAGE_COMMAND))
26+
PACKAGE := mkdocstrings-python-xref
27+
PACKAGE_VERSION_PATH := src/mkdocstrings_handlers/python_xref/VERSION
28+
VERSION := $(strip $(file < $(PACKAGE_VERSION_PATH)))
3329

3430
SRC_FILES := $(wildcard src/mkdocstrings_handlers/garpy_python/*.py) $(PYTHON_VERSION_PATH)
3531

@@ -45,18 +41,7 @@ CONDA_UPLOAD_CHANNEL := garage-conda-local$(UPLOAD_TEST)
4541
PYPI_UPLOAD_CHANNEL := adi-pypi-local$(UPLOAD_TEST)
4642

4743
# Env names
48-
DEV_ENV := garpy.mkdocstrings
49-
50-
# Creation args
51-
CREATE_DEV_ARGS := --file runtime-env.yml --file test-env.yml --file doc-env.yml
52-
GARCONDA_CREATE_ARGS := $(CREATE_DEV_ARGS)
53-
DEV_CREATE := $(GARCONDA) create-dev -n $(DEV_ENV) $(GARCONDA_CREATE_ARGS) --python-version 3.8
54-
CI_CREATE := $(DEV_CREATE)
55-
56-
# Verify upload args
57-
VERIFY_UPLOAD := $(GARCONDA) verify-upload --expect-version $(PACKAGE_VER) --request-version $(PACKAGE_VER) $(PACKAGE)
58-
VERIFY_UPLOAD_CONDA := $(VERIFY_UPLOAD) --conda-channel $(CONDA_UPLOAD_CHANNEL)
59-
VERIFY_UPLOAD_WHEEL := $(VERIFY_UPLOAD) --pypi-channel $(PYPI_UPLOAD_CHANNEL)
44+
DEV_ENV := mkxref-dev
6045

6146
# Whether to run targets in current env or explicitly in $(DEV_ENV)
6247
CURR_ENV_BASENAME := $(shell basename $(CONDA_PREFIX))
@@ -104,9 +89,9 @@ help:
10489
@$(ECHO) "mypy - Run mypy in '$(DEV_ENV)' environment."
10590
@$(ECHO)
10691
@$(ECHO) "$(SECTION_COLOR)--- build ---$(COLORLESS)"
107-
@$(ECHO) "build - Build wheel and conda package."
92+
@$(ECHO) "build - Build wheel"
10893
@$(ECHO) "build-wheel - Build wheel."
109-
@$(ECHO) "build-conda - Build conda package."
94+
@$(ECHO) "build-conda - Build conda package (requires whl2conda)"
11095
@$(ECHO)
11196
@$(ECHO) "$(SECTION_COLOR)--- upload ---$(COLORLESS)"
11297
@$(ECHO) "upload - Upload conda package and wheel to artifactory"
@@ -131,18 +116,22 @@ help:
131116
@$(ECHO) "$(TOP_COLOR)====================$(COLORLESS)"
132117
@$(ECHO)
133118

119+
dev-install:
120+
$(CONDA_RUN) pip install -e . --no-deps --no-build-isolation
121+
134122
create-dev:
135-
$(DEV_CREATE)
123+
$(CONDA) env create -f environment.yml
124+
$(MAKE) dev-install
136125

137126
createdev: create-dev
138127

139128
update-dev:
140-
$(DEV_CREATE) --update
129+
$(CONDA) env update -f environment.yml
130+
$(MAKE) dev-install
141131

142132
updatedev: update-dev
143133

144-
create-ci-env:
145-
$(CI_CREATE)
134+
create-ci-env: create-dev
146135

147136
clean-dev:
148137
-$(CONDA) env remove -n $(DEV_ENV)
@@ -152,18 +141,6 @@ pytest:
152141

153142
test: lint pytest
154143

155-
# We generate the tox dependency files from the official versions.
156-
tox-env.yml: runtime-env.yml test-env.yml
157-
$(GARCONDA) env merge --out $@ $^
158-
159-
tox-requirements.txt: runtime-env.yml test-env.yml
160-
$(GARCONDA) env merge --for-pip --out $@ $^
161-
162-
tox-dependencies: tox-env.yml tox-requirements.txt
163-
164-
tox: tox-dependencies
165-
$(CONDA_RUN) tox $(TOX_ARGS)
166-
167144
test-all: test tox
168145

169146
.coverage:
@@ -183,35 +160,20 @@ mypy:
183160

184161
lint: pylint mypy
185162

186-
build-wheel:
187-
$(CONDA_RUN) pip wheel . --no-deps --no-build-isolation -w dist
188-
189-
conda-meta-data.json: runtime-env.yml pyproject.toml
190-
$(CONDA_RUN) hatchling-garconda metadata --overwrite --out $@
191-
192-
build-conda: conda-meta-data.json
193-
$(GARCONDA) build $(abspath .)
194-
195-
build-conda-no-test: conda-meta-data.json
196-
$(GARCONDA) build $(abspath .) --no-test
163+
WHEEL_FILE := dist/$(subst -,_,$(PACKAGE))-$(VERSION)-py3-none-any.whl
164+
CONDA_FILE := dist/$(PACKAGE)-$(VERSION)-py_0.conda
197165

198-
build: build-wheel build-conda
199-
200-
upload-wheel:
201-
$(GARCONDA) upload-pypi -u $(USERNAME) dist/* -c $(PYPI_UPLOAD_CHANNEL)
202-
203-
upload-conda:
204-
$(GARCONDA) upload '$(PACKAGE)-$(PACKAGE_VER)-*' -u $(USERNAME) -y -c $(CONDA_UPLOAD_CHANNEL) $(UPLOAD_OVERWRITE)
166+
$(WHEEL_FILE):
167+
$(CONDA_RUN) pip wheel . --no-deps --no-build-isolation -w dist
205168

206-
upload: upload-wheel upload-conda
169+
build-wheel: $(WHEEL_FILE)
207170

208-
verify-upload-wheel:
209-
$(CONDA_RUN) $(VERIFY_UPLOAD_WHEEL)
171+
$(CONDA_FILE): $(WHEEL_FILE)
172+
$(CONDA_RUN) whl2conda build $(WHEEL_FILE)
210173

211-
verify-upload-conda:
212-
$(CONDA_RUN) $(VERIFY_UPLOAD_CONDA)
174+
build-conda: $(CONDA_FILE)
213175

214-
verify-upload: verify-upload-wheel verify-upload-conda
176+
build: build-wheel
215177

216178
site/index.html: $(MKDOC_FILES) $(SRC_FILES)
217179
$(CONDA_RUN) mkdocs build -f $(MKDOC_CONFIG)

README.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
1-
This project extends the standard python handler for mkdocstrings to support additional
2-
features.
1+
Python handler for [mkdocstrings] supporting relative cross-references.
32

4-
Currently this includes:
53

6-
* compact relative cross-references
74

8-
See [user documentation][user-doc] for usage details.
9-
10-
See [developer docs][developer-doc] for development setup and information.
11-
12-
[developer-doc]: CONTRIBUTING.md
13-
[user-doc]: http://boston-garage.pages.gitlab.analog.com/garpy.mkdocstrings/
5+
[mkdocstrings]: https://github.com/mkdocstrings/mkdocstrings
6+
[mkdocstrings_python]: https://github.com/mkdocstrings/python

conda.recipe/meta.yaml

Lines changed: 0 additions & 48 deletions
This file was deleted.

doc-env.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/config.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Configuration is the same as with [mkdocstrings-python][] except
2-
that the handler name should be `garpy_python` instead of `python`. Because
2+
that the handler name should be `python_xref` instead of `python`. Because
33
this handler extends the standard [mkdocstrings-python][] handler, the same options are
44
available.
55

@@ -14,9 +14,9 @@ Additional options are added by this extension. Currently, there is only one:
1414
plugins:
1515
- search
1616
- mkdocstrings:
17-
default_handler: garpy_python
17+
default_handler: python_xref
1818
handlers:
19-
garpy_python:
19+
python_xref:
2020
import:
2121
- https://docs.python.org/3/objects.inv
2222
options:

docs/install.md

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,8 @@
1-
### Using conda
2-
3-
```
4-
conda install \
5-
-c conda-forge \
6-
-c https://artifactory.analog.com/artifactory/garage-conda-local \
7-
garpy.mkdocstrings
8-
```
9-
10-
Or if you have configured the garage-conda-local custom channel:
11-
12-
```
13-
conda install -c conda-forge -c garage-conda-local garpy.config
14-
```
15-
16-
or include entry in the appropriate conda environment YAML file for your project.
17-
181
### Using pip
192

203
```
21-
pip install \
22-
--extra-index-url https://artifactory.analog.com/artifactory/adi-pypi-local \
23-
garpy.mkdocstrings
4+
pip install mkdocstrings-python-xref
245
```
256

26-
or include entry in the appropriate pip requirements.txt file for your project.
277

288

0 commit comments

Comments
 (0)