Skip to content

Commit

Permalink
Merge pull request #13 from nsidc/invoke-tasks
Browse files Browse the repository at this point in the history
Invoke tasks
  • Loading branch information
trey-stafford authored Oct 23, 2023
2 parents a2d35ff + 4f9e3ac commit a49c48f
Show file tree
Hide file tree
Showing 8 changed files with 719 additions and 575 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ jobs:
- name: "Run pre-commit tests"
run: "pre-commit run --all-files"

# Run static type-checking
- name: "Run mypy"
run: "mypy"

# Unit tests
- name: "Run unit tests"
run: "python -m pytest"
# Run static type-checking and unit tests
- name: "Run CI tests not requiring data."
run: "PYTHONPATH=./ invoke test.ci"
74 changes: 1 addition & 73 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,79 +40,7 @@ TODO

## Development/contributing

### Adding dependencies

To add new dependencies to this project, update the `environment.yml` file with
the new dependency. Then update your conda environment:

```
$ mamba env update
```

Once the conda environment has been updated, lock the environment using `conda-lock`:

```
$ conda-lock
```

Commit the changes for the `environment.yml` and the `conda-lock.yml` files.


### Running tests/CI

#### Linting / formatting
This project uses [pre-commit](https://pre-commit.com/) to run pre-commit hooks
that check and format this project's code for stylistic consistency (using
`ruff` and `black`) .

The pre-commit configuration for this project can be found in
`.pre-commit-config.yaml`. Configuration for specific tools (e.g., `mypy`) is
given in the included `pyproject.toml`.

For more information about using `pre-commit`, please sese the [Scientific
Python Library Development Guide's section on
pre-commit](https://learn.scientific-python.org/development/guides/gha-basic/#pre-commit).

To install pre-commit to run checks for each commit you make:

```
$ pre-commit install
```

To manually run the pre-commit hooks without a commit:

```
$ pre-commit run --all-files
```

#### Running unit tests

Use `pytest` to run unit tests:

```
$ python -m pytest
```

#### Type-checking

Use `mypy` to run static typechecking

```
$ mypy
```

### Creating a new version

Use `bumpversion` (see
[bump-my-version](https://github.com/callowayproject/bump-my-version)) to bump
the specified part of the version:

```
$ bumpversion bump {major|minor|patch}
```

`bumpversion` configuration can be found in the `pyproject.toml`.

See [doc/development.md](doc/development.md) for more information.

## Level of Support

Expand Down
Loading

0 comments on commit a49c48f

Please sign in to comment.