Skip to content

Commit

Permalink
remove unused Dockerfile and references to it
Browse files Browse the repository at this point in the history
  • Loading branch information
rbavery committed Oct 31, 2024
1 parent 6d32293 commit 7bdfcee
Show file tree
Hide file tree
Showing 9 changed files with 223 additions and 325 deletions.
39 changes: 0 additions & 39 deletions .dockerignore

This file was deleted.

10 changes: 0 additions & 10 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,3 @@ updates:
commit-message:
prefix: ":arrow_up:"
open-pull-requests-limit: 5

- package-ecosystem: "docker"
directory: "/docker"
schedule:
interval: "monthly"
allow:
- dependency-type: "all"
commit-message:
prefix: ":arrow_up:"
open-pull-requests-limit: 5
8 changes: 4 additions & 4 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ jobs:
uses: actions/setup-python@v5.2.0
with:
python-version: "3.10"
- name: Install poetry
run: make poetry-install
- name: Install uv
run: make setup
- name: Publish stac-model to PyPI
run: |
poetry build
poetry publish --username __token__ --password ${{ secrets.PYPI_SECRET }}
uv build
uv publish --username __token__ --password ${{ secrets.PYPI_SECRET }}
6 changes: 3 additions & 3 deletions .github/workflows/stac-model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install poetry
run: make poetry-install
- name: Install uv
run: make setup

- name: Set up cache
uses: actions/cache@v4.0.2
with:
path: .venv
key: venv-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('poetry.lock') }}
key: venv-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('uv.lock') }}
- name: Install dependencies
run: make install-dev

Expand Down
80 changes: 43 additions & 37 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,47 @@

## Project setup

1. If you don't have `Poetry` installed run:
1. If you don't have `uv` installed run:

```bash
make poetry-install
make setup
```

> This installs Poetry as a [standalone application][poetry-install]. <br>
> For more details, see also the [Poetry Documentation][poetry-docs]. <br>
> If you prefer, you can simply install it inside your virtual environment.
> This installs uv as a [standalone application][uv-install]. <br>
> For more details, see also the [UV Documentation][uv-docs]. <br>
2. Initialize project dependencies with poetry and install `pre-commit` hooks:
2. Initialize project dependencies with uv and install `pre-commit` hooks:

```bash
make install-dev
make pre-commit-install
```

**Note** All Makefile commands will use uv to install dependencies into the currently active python environment as determined by `which python`. If you prefer to use an mlm project-scoped, environment that is managed by uv, use uv commands directly and don't use the Makefile.

## PR submission

Before submitting your code please do the following steps:

1. Add any changes you want
2. Add tests for the new changes
3. Edit documentation if you have changed something significant
1. Add any changes you want
2. Add tests for the new changes
3. Edit documentation if you have changed something significant

You're then ready to run and test your contributions.

4. Run linting checks:
4. Run linting checks:

```bash
make lint-all
```

5. Run `tests` (including your new ones) with
5. Run `tests` (including your new ones) with

```bash
make test
```

6. Upload your changes to your fork, then make a PR from there to the main repo:
6. Upload your changes to your fork, then make a PR from there to the main repo:

```bash
git checkout -b your-branch
Expand All @@ -57,47 +58,50 @@ git push -u origin your-branch

> [!WARNING]
> There are multiple types of releases for this repository: <br>
> 1. Release for MLM specification (usually, this should include one for `stac-model` as well to support it)
> 2. Release for `stac-model` only
>
> 1. Release for MLM specification (usually, this should include one for `stac-model` as well to support it)
> 2. Release for `stac-model` only
<!-- lint enable no-undefined-references -->

### Building a new version of MLM specification

- Checkout to the `main` branch by making sure the CI passed all previous tests.
- Bump the version with `bump-my-version bump --verbose <version-level>`.
- Consider using `--dry-run` beforehand to inspect the changes.
- The `<version-level>` should be one of `major`, `minor`, or `patch`. <br>
Alternatively, the version can be set explicitly with `--new-version <version> patch`. <br>
For more details, refer to the [Semantic Versions][semver] standard;
- Make a commit to `GitHub` and push the corresponding auto-generated `v{MAJOR}.{MINOR}.{PATCH}` tag.
- Validate that the CI validated everything once again.
- Create a `GitHub release` with the created tag.
- Checkout to the `main` branch by making sure the CI passed all previous tests.
- Bump the version with `bump-my-version bump --verbose <version-level>`.
- Consider using `--dry-run` beforehand to inspect the changes.
- The `<version-level>` should be one of `major`, `minor`, or `patch`. <br>
Alternatively, the version can be set explicitly with `--new-version <version> patch`. <br>
For more details, refer to the [Semantic Versions][semver] standard;
- Make a commit to `GitHub` and push the corresponding auto-generated `v{MAJOR}.{MINOR}.{PATCH}` tag.
- Validate that the CI validated everything once again.
- Create a `GitHub release` with the created tag.

<!-- lint disable no-undefined-references -->

> [!WARNING]
> - Ensure the "Set as the latest release" option is selected :heavy_check_mark:.
> - Ensure the diff ranges from the previous MLM version, and not an intermediate `stac-model` release.
>
> - Ensure the "Set as the latest release" option is selected :heavy_check_mark:.
> - Ensure the diff ranges from the previous MLM version, and not an intermediate `stac-model` release.
<!-- lint enable no-undefined-references -->

### Building a new version of `stac-model`

- Apply any relevant changes and `CHANGELOG.md` entries in a PR that modifies `stac-model`.
- Bump the version with `poetry version <version>`.
- You can pass the new version explicitly, or a rule such as `major`, `minor`, or `patch`. <br>
For more details, refer to the [Semantic Versions][semver] standard;
- Once CI validation succeeded, merge the corresponding PR branch.
- Checkout to `main` branch that contais the freshly created merge commit.
- Push the tag `stac-model-v{MAJOR}.{MINOR}.{PATCH}`. The CI should auto-publish it to PyPI.
- Create a `GitHub release`
- Apply any relevant changes and `CHANGELOG.md` entries in a PR that modifies `stac-model`.
- Bump the version with `uv run bump-my-version bump <version>`.
- You can pass the new version explicitly, or a rule such as `major`, `minor`, or `patch`. <br>
For more details, refer to the [Semantic Versions][semver] standard;
- Once CI validation succeeded, merge the corresponding PR branch.
- Checkout to `main` branch that contais the freshly created merge commit.
- Push the tag `stac-model-v{MAJOR}.{MINOR}.{PATCH}`. The CI should auto-publish it to PyPI.
- Create a `GitHub release`

<!-- lint disable no-undefined-references -->

> [!WARNING]
> - Ensure the "Set as the latest release" option is deselected :x:.
> - Ensure the diff ranges from the previous release of `stac-model`, not an intermediate MLM release.
>
> - Ensure the "Set as the latest release" option is deselected :x:.
> - Ensure the diff ranges from the previous release of `stac-model`, not an intermediate MLM release.
<!-- lint enable no-undefined-references -->

Expand All @@ -110,6 +114,8 @@ You can also share how the ML Model extension does or does
not serve your needs with us in the GitHub Discussions or raise
Issues for bugs.

[poetry-install]: https://github.com/python-poetry/install.python-poetry.org
[poetry-docs]: https://python-poetry.org/docs/
[uv-install]: https://docs.astral.sh/uv/getting-started/installation/

[uv-docs]: https://docs.astral.sh/uv/

[semver]: https://semver.org/
7 changes: 0 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,6 @@ mypy: setup
.PHONY: check-mypy
check-mypy: mypy

# NOTE:
# purposely running with docker rather than python package due to conflicting dependencies
# see https://github.com/citation-file-format/cffconvert/issues/292
.PHONY: check-citation
check-citation:
docker run --rm -v $(ACTIVEPYTHON)/CITATION.cff:/app/CITATION.cff citationcff/cffconvert --validate

.PHONY: check-safety
check-safety: setup
uv check
Expand Down
Loading

0 comments on commit 7bdfcee

Please sign in to comment.