Skip to content

Commit

Permalink
chore: drop requirements-dev (#208)
Browse files Browse the repository at this point in the history
* chore: add optional dev deps to pyproject

* chore: update gitpod for dev

* chore: update ci with dev deps

* fix: switch to pyproject installation for publishing ci

* fix: drop old file name

* style: run black
  • Loading branch information
SauravMaheshkar authored Mar 20, 2023
1 parent 7474c9b commit 5f9f566
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ jobs:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
python -m build
twine upload dist/*
4 changes: 1 addition & 3 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ jobs:
run: |
conda install --yes numpy mkl-service
conda install --yes pytorch==${{ matrix.pytorch-version }} cpuonly -c pytorch
conda install --yes --file requirements-dev.txt
conda install --yes conda-build
conda develop .
pip install -e ."[dev]"
- name: Run info
shell: bash -l {0}
run: |
Expand Down
2 changes: 1 addition & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ tasks:
micromamba create -yn env pip -c conda-forge
micromamba activate env
micromamba install -y torch scipy numpy -c conda-forge
pip install -r requirements-dev.txt
command: |
micromamba activate env
pip install -e .
pip install -e ."[dev]"
vscode:
extensions:
- eamodio.gitlens
Expand Down
4 changes: 2 additions & 2 deletions geoopt/manifolds/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ def check_vector_on_tangent(
ok_point=False,
explain=False,
atol=1e-5,
rtol=1e-5
rtol=1e-5,
) -> Union[Tuple[bool, Optional[str]], bool]:
"""
Check if :math:`u` is lying on the tangent space to x.
Expand Down Expand Up @@ -915,7 +915,7 @@ def origin(
*size: Union[int, Tuple[int]],
dtype=None,
device=None,
seed: Optional[int] = 42
seed: Optional[int] = 42,
) -> torch.Tensor:
"""
Create some reasonable point on the manifold in a deterministic way.
Expand Down
2 changes: 1 addition & 1 deletion geoopt/manifolds/scaled.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def inner(
v: torch.Tensor = None,
*,
keepdim=False,
**kwargs
**kwargs,
) -> torch.Tensor:
return self.base.inner(x, u, v, keepdim=keepdim, **kwargs)

Expand Down
1 change: 0 additions & 1 deletion geoopt/manifolds/siegel/vvd_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ def compute_metric(self, v: torch.Tensor, keepdim=True) -> torch.Tensor:


class SiegelMetricFactory:

metrics_map = {
SiegelMetricType.RIEMANNIAN: RiemannianMetric,
SiegelMetricType.FINSLER_ONE: FinslerOneMetric,
Expand Down
2 changes: 1 addition & 1 deletion geoopt/manifolds/symmetric_positive_definite.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,6 @@ def origin(
*size: Union[int, Tuple[int]],
dtype=None,
device=None,
seed: Optional[int] = 42
seed: Optional[int] = 42,
) -> torch.Tensor:
return torch.diag_embed(torch.ones(*size[:-1], dtype=dtype, device=device))
15 changes: 15 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,21 @@ homepage = "https://github.com/geoopt/geoopt"
repository = "https://github.com/geoopt/geoopt"
documentation = "https://geoopt.readthedocs.io/en/latest/"

[project.optional-dependencies]
dev = [
"pytest",
"pytest-cov",
"pytest-html",
"black",
"coveralls",
"twine",
"wheel",
"sphinx",
"seaborn",
"pydocstyle>=6.3.0",
"pylint"
]

[tool.pydocstyle]
convention = "numpy"
add-ignore = [
Expand Down
11 changes: 0 additions & 11 deletions requirements-dev.txt

This file was deleted.

2 changes: 1 addition & 1 deletion tests/test_lorentz_math.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def test_geodesic_segement_unit_property(a, b, k):
# TODO: analyze corner cases for geodesic
dist_ab_t0mt1[1:],
true_distance_travelled[1:],
**tolerance[k.dtype]
**tolerance[k.dtype],
)


Expand Down

0 comments on commit 5f9f566

Please sign in to comment.