Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,26 @@ htmlcov/
.coverage
.coverage.*
.cache
.pytest_cache/
nosetests.xml
coverage.xml
*,cover

# IDEs/editors
.idea/
.vscode/

# Common local virtualenvs
.venv/

# Static analysis / formatter caches
.mypy_cache/
.ruff_cache/

# Local agent/tool state (don’t commit)
.codex/
.agents/

# Translations
*.mo
*.pot
Expand Down
2 changes: 0 additions & 2 deletions MANIFEST.in

This file was deleted.

7 changes: 2 additions & 5 deletions readme.md → README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# 🌊 Thetis

[![Weekly Tests (release)](https://github.com/thetisproject/thetis/actions/workflows/weekly-release.yml/badge.svg?branch=release)](https://github.com/thetisproject/thetis/actions/workflows/weekly-release.yml)
[![Weekly Tests (main)](https://github.com/thetisproject/thetis/actions/workflows/weekly-main.yml/badge.svg?branch=main)](https://github.com/thetisproject/thetis/actions/workflows/weekly-main.yml)
![Python Version](https://img.shields.io/badge/python-3.10%2B-blue)

Expand Down Expand Up @@ -47,16 +48,13 @@ pip install -e .
> The latest development branch of Thetis (main) will require the corresponding main branch of Firedrake. See the
> website for more details.

### Release branch weekly status
[![Weekly Tests (release)](https://github.com/thetisproject/thetis/actions/workflows/weekly-release.yml/badge.svg?branch=release)](https://github.com/thetisproject/thetis/actions/workflows/weekly-release.yml)

---

## Getting Started

To get up and running with Thetis once it has been installed, we recommend checking out the [basic tutorials and
documentation](https://thetisproject.org/documentation.html#tutorials). Further examples can then be found in the
repository at [`examples`](./examples). See [`examples/README.md`](./examples/readme.md) for
repository at [`examples`](./examples). See [`examples/README.md`](./examples/README.md) for
detailed descriptions of each example script.


Expand All @@ -83,4 +81,3 @@ If Thetis is helpful in your research, please cite:
## License

Thetis is available under the MIT License. See the [LICENSE](./LICENSE) file for details.

1 change: 1 addition & 0 deletions _thetis_build_backend.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from setuptools.build_meta import * # noqa: F401,F403
50 changes: 50 additions & 0 deletions _thetis_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
from subprocess import CalledProcessError, check_output


def _current_month_version():
try:
head_date = check_output(
["git", "show", "-s", "--format=%cI", "HEAD"],
text=True,
).strip()
year, month = (int(part) for part in head_date[:7].split("-"))
except (CalledProcessError, OSError, ValueError):
year, month = 0, 0

since = f"{year:04d}-{month:02d}-01T00:00:00+00:00"
try:
count = check_output(
["git", "rev-list", "--count", f"--since={since}", "HEAD"],
text=True,
).strip()
except (CalledProcessError, OSError):
count = "0"
return f"{year}.{month}.dev{count}"


def _next_release_update(version):
tag = str(version.tag)
if ".post" in tag:
base, post = tag.rsplit(".post", 1)
return f"{base}.post{int(post) + 1}"

parts = tag.split(".")
if len(parts) >= 2:
return f"{parts[0]}.{parts[1]}.post0"
raise ValueError(f"Unsupported Thetis release tag {tag}")


def thetis_version_scheme(version):
if version.exact:
return str(version.tag)

branch = version.branch or ""
if (
branch == "release"
or branch.endswith("/release")
or branch.startswith("release-")
or branch.startswith("release/")
):
return version.format_next_version(_next_release_update)

return _current_month_version()
2 changes: 1 addition & 1 deletion demos/readme.md → demos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ Each tutorial is also available here, so you can run or modify them locally if y

## 📎 Further Examples

Once you've got to grips with the demos, check out the [Thetis examples repository](../examples/readme.md).
Once you've got to grips with the demos, check out the [Thetis examples repository](../examples/README.md).
3 changes: 2 additions & 1 deletion docs/source/_themes/thetis/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
<div class="menu">
<ul>
<li class="page_item"><a href="{{ pathto('documentation.html', 1) }}" title="Thetis documentation">Documentation</a></li>
<li class="page_item"><a href="{{ pathto('download.html', 1) }}" title="Install Thetis">Download</a></li>
<li class="page_item"><a href="{{ pathto('developer_notes.html', 1) }}" title="Developer notes">Developer Notes</a></li>
<li class="page_item"><a href="{{ pathto('download.html', 1) }}" title="Install Thetis">Install</a></li>
<li class="page_item"><a href="{{ pathto('%s.%s' % ('team', 'html'), 1) }}" title="Development team">Team</a></li>
<li class="page_item"><a href="{{ pathto('publications.html', 1) }}" title="Publications">Publications</a></li>
<li class="page_item"><a href="{{ pathto('funding.html', 1) }}" title="Our financial supporters">Funding</a></li>
Expand Down
4 changes: 2 additions & 2 deletions docs/source/contact.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
You can get in touch with the Thetis development team in a number of
ways, for help, feature requests, bugs, or just to say hello.

Github
GitHub
======

The best place to submit bug reports or feature requests is on the
`github project page <https://github.com/thetisproject/thetis>`__.
`GitHub project page <https://github.com/thetisproject/thetis>`__.

Slack
=====
Expand Down
Loading