-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from Arcadia-Science/feat/major-revamp
[Feature] Reorganize and reimplement the package
- Loading branch information
Showing
177 changed files
with
9,113 additions
and
4,506 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# API token for the PyPI prod server. | ||
POETRY_PYPI_TOKEN_PYPI= | ||
|
||
# API token for the PyPI test server. | ||
POETRY_PYPI_TOKEN_PYPI_TEST= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: lint-and-test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- feat/* | ||
pull_request: | ||
branches: | ||
- main | ||
- feat/* | ||
|
||
jobs: | ||
lint-and-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.9" | ||
|
||
- name: Cache Poetry install | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.local | ||
key: poetry-1.8.3-0 | ||
|
||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
version: 1.8.3 | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
|
||
- name: Cache Poetry dependencies | ||
id: cache-poetry-deps | ||
uses: actions/cache@v2 | ||
with: | ||
path: .venv | ||
key: pydeps-${{ hashFiles('**/poetry.lock') }} | ||
|
||
- run: poetry install --no-interaction --no-root | ||
if: steps.cache-poetry-deps.outputs.cache-hit != 'true' | ||
|
||
- name: Run Ruff | ||
run: poetry run ruff check --output-format=github . | ||
|
||
- name: Run Ruff formatter | ||
run: poetry run ruff format --check . | ||
|
||
- name: Run tests | ||
run: poetry run pytest |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,54 @@ | ||
include .env | ||
|
||
DOCS_DIR := ./docs | ||
JUPYTER_NOTEBOOKS := $(shell find $(DOCS_DIR) -type f -name '*.ipynb') | ||
|
||
.PHONY: execute-all-notebooks | ||
execute-all-notebooks: | ||
@for file in $(JUPYTER_NOTEBOOKS); do \ | ||
echo "Executing notebook $$file"; \ | ||
jupyter execute --inplace $$file; \ | ||
done | ||
|
||
.PHONY: lint | ||
lint: | ||
ruff check --exit-zero . | ||
ruff format --check . | ||
pyright --project pyproject.toml . | ||
|
||
.PHONY: format | ||
format: | ||
ruff --fix . | ||
ruff check --fix . | ||
ruff format . | ||
|
||
.PHONY: pre-commit | ||
pre-commit: | ||
pre-commit run --all-files | ||
|
||
.PHONY: test | ||
test: | ||
pytest -v . | ||
|
||
.PHONY: clean | ||
clean: | ||
rm -rf dist | ||
|
||
.PHONY: build | ||
build: clean | ||
poetry build | ||
|
||
# Note: `poetry` does not appear to read the `POETRY_PYPI_TOKEN_<NAME>` environment variable, | ||
# so we need to pass it explicitly in the `publish` command. | ||
.PHONY: test-publish | ||
test-publish: build | ||
poetry publish \ | ||
--repository pypi_test \ | ||
--username __token__ \ | ||
--password ${POETRY_PYPI_TOKEN_PYPI_TEST} | ||
|
||
.PHONY: publish | ||
publish: build | ||
poetry publish \ | ||
--repository pypi \ | ||
--username __token__ \ | ||
--password ${POETRY_PYPI_TOKEN_PYPI} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.