Skip to content

Commit cceb6e3

Browse files
authored
Merge pull request #13 from arnab39/dev
0.1.0
2 parents 98c8875 + a1fca2b commit cceb6e3

File tree

11 files changed

+55
-35
lines changed

11 files changed

+55
-35
lines changed

.readthedocs.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ formats:
1919
build:
2020
os: ubuntu-22.04
2121
tools:
22-
python: "3.11"
22+
python: "3.10"
23+
jobs:
24+
post_build:
25+
- python docs/postprocess.py --path "$READTHEDOCS_OUTPUT/html"
2326

2427
python:
2528
install:

AUTHORS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22

33
* Arnab Mondal [[email protected]](mailto:[email protected])
44
* [Siba Smarak Panigrahi](https://sibasmarak.github.io/) [[email protected]](mailto:[email protected])
5+
* [Danielle Benesch](https://github.com/danibene) [[email protected]](mailto:[email protected])
6+
* [Jikael Gagnon](https://github.com/jikaelgagnon) [[email protected]](mailto:[email protected])
7+
* [Sékou-Oumar Kaba](https://oumarkaba.github.io)[mailto:[email protected]]

CHANGELOG.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
11
# Changelog
22

3-
## Version 0.1 (development)
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
### Added
11+
12+
### Fixed
13+
14+
### Changed
15+
16+
### Removed
17+
18+
## [0.1.0] - 2024-03-14
19+
20+
### Added
21+
- Initial version of project on GitHub.

CONTRIBUTING.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -294,10 +294,5 @@ on [PyPI], the following steps can be used to release a new version for
294294
[tox]: https://tox.readthedocs.io/en/stable/
295295
[virtual environment]: https://realpython.com/python-virtual-environments-a-primer/
296296
[virtualenv]: https://virtualenv.pypa.io/en/stable/
297-
298-
299-
```{todo} Please review and change the following definitions:
300-
```
301-
302297
[repository]: https://github.com/arnab39/equiadapt
303298
[issue tracker]: https://github.com/arnab39/equiadapt/issues

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<p align="center">
22
<br>
3-
<img src="utils/equiadapt_logo.png" width="400"/>
3+
<img src="https://raw.githubusercontent.com/arnab39/equiadapt/main/utils/logo.png" width="400"/>
44
<br>
55
<p>
66

@@ -11,9 +11,9 @@
1111

1212

1313
# Equivariant adaptation with canonicalization
14-
![Equivariant adaptation of any prediction network](/utils/equiadapt_cat.jpeg "Equivariant adaptation of any prediction network")
14+
![Equivariant adaptation of any prediction network](https://raw.githubusercontent.com/arnab39/equiadapt/main/utils/equiadapt_cat.jpeg "Equivariant adaptation of any prediction network")
1515

16-
![Equivariant adaptation of Segment-Anything Network](/utils/equiadapt_sam.gif "Equivariant adaptation of any prediction network")
16+
![Equivariant adaptation of Segment-Anything Network](https://raw.githubusercontent.com/arnab39/equiadapt/main/utils/equiadapt_sam.gif "Equivariant adaptation of any prediction network")
1717

1818
EquiAdapt is a [PyTorch](https://pytorch.org) package that provides a flexible and efficient way to make *any* neural network architecture (including large foundation models) equivariant, instead of redesigning and training from scratch. This is done by learning to canonicalize transformed inputs, before feeding them to the prediction model.
1919

docs/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,15 @@ endif
2020
help:
2121
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
2222

23+
postprocess:
24+
@echo "Running postprocessing script..."
25+
python ./postprocess.py
26+
2327
clean:
2428
rm -rf $(BUILDDIR)/* $(AUTODOCDIR)
2529

2630
# Catch-all target: route all unknown targets to Sphinx using the new
2731
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
2832
%: Makefile
2933
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
34+
@$(MAKE) postprocess

docs/index.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,6 @@
22

33
Library that provides metrics to asses representation quality
44

5-
6-
## Note
7-
8-
> This is the main page of your project's [Sphinx] documentation. It is
9-
> formatted in [Markdown]. Add additional pages by creating md-files in
10-
> `docs` or rst-files (formatted in [reStructuredText]) and adding links to
11-
> them in the `Contents` section below.
12-
>
13-
> Please check [Sphinx] and [MyST] for more information
14-
> about how to document your project and how to configure your preferences.
15-
16-
175
## Contents
186

197
```{toctree}

docs/postprocess.py

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1+
import argparse # Import the argparse module
12
import re
23
from pathlib import Path
34
from typing import Match, Union
45

56
from bs4 import BeautifulSoup, Tag
67

7-
# Install from https://github.com/carpedm20/emoji/
8-
# with pip install emoji
98
try:
109
from emoji import emojize
1110
except ImportError:
@@ -35,25 +34,34 @@ def process_html_file(html_file: Union[str, Path]) -> None:
3534
with open(html_file, "r", encoding="utf-8") as file:
3635
content = file.read()
3736

38-
# Convert emojis in the entire HTML content
3937
content = emojize_all(content)
40-
4138
soup = BeautifulSoup(content, "html.parser")
42-
43-
# Update all <img> tags with src starting with "utils/"
4439
update_image_paths(soup)
4540

46-
# Write the changes back to the HTML file
4741
with open(html_file, "w", encoding="utf-8") as file:
4842
file.write(str(soup))
4943

5044

5145
if __name__ == "__main__":
52-
# Specify the pattern to match the HTML files you want to postprocess
53-
__location__: Path = Path(__file__).parent
54-
html_files: list[Path] = list((__location__ / "_build" / "html").glob("*.html"))
46+
parser = argparse.ArgumentParser(description="Process HTML files.")
47+
parser.add_argument(
48+
"--path",
49+
type=str,
50+
help="Path to the directory containing HTML files to process.",
51+
)
52+
53+
args = parser.parse_args()
54+
55+
if args.path:
56+
base_path = Path(args.path)
57+
else:
58+
__location__: Path = Path(__file__).parent
59+
base_path = __location__ / "_build" / "html"
60+
61+
html_files: list[Path] = list(base_path.glob("*.html"))
5562

5663
for html_file in html_files:
64+
print(f"Processing {html_file}...")
5765
process_html_file(html_file)
5866

5967
print("HTML postprocessing completed.")

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ packages = find_namespace:
3434
include_package_data = True
3535

3636
# Require a min/specific Python version (comma-separated conditions)
37-
python_requires = >=3.7
37+
python_requires = >=3.7, <3.11
3838

3939
# Add here dependencies of your project (line-separated), e.g. requests>=2.2,<3.0.
4040
# Version specifiers like >=2.2,<3.0 avoid problems due to API changes in

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ commands =
5656

5757

5858
[testenv:{docs,doctests,linkcheck}]
59+
allowlist_externals = make
5960
description =
6061
docs: Invoke sphinx-build to build the docs
6162
doctests: Invoke sphinx-build to run doctests
@@ -72,8 +73,7 @@ deps =
7273
-r {toxinidir}/docs/requirements.txt
7374
# ^ requirements.txt shared with Read The Docs
7475
commands =
75-
sphinx-build --color -b {env:BUILD} -d "{env:BUILDDIR}/doctrees" "{env:DOCSDIR}" "{env:BUILDDIR}/{env:BUILD}" {posargs}
76-
python docs/postprocess.py
76+
make -C {toxinidir}/docs html
7777

7878
[testenv:publish]
7979
description =

0 commit comments

Comments
 (0)