Skip to content

Commit

Permalink
Update pip package config
Browse files Browse the repository at this point in the history
  • Loading branch information
leavauchier committed Apr 18, 2024
1 parent 8c01bdf commit 631bd3d
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ exclude =
.git
__pycache__
logs/*
.vscode/*
.vscode/*
15 changes: 8 additions & 7 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,24 @@
import os
import sys

import yaml
import tomli
from hydra import compose, initialize
from omegaconf import OmegaConf

rel_root_path = "./../../"
abs_root_path = os.path.abspath(rel_root_path)
sys.path.insert(0, abs_root_path)

from myria3d._version import __version__ # noqa: E402

# -- Project information -----------------------------------------------------
with open(os.path.join(abs_root_path, "package_metadata.yaml"), "r") as f:
pm = yaml.safe_load(f)
with open(os.path.join(abs_root_path, "pyproject.toml"), "rb") as f:
data = tomli.load(f)

release = pm["__version__"]
project = pm["__name__"]
author = pm["__author__"]
copyright = pm["__copyright__"]
release = __version__
project = data["project"]["name"]
author = ", ".join([a["name"] for a in data["project"]["authors"]])
copyright = data["metadata"]["copyright"]

# -- YAML main to print the config into ---------------------------------------------------
# We need to concatenate configs into a single file using hydra
Expand Down
5 changes: 5 additions & 0 deletions myria3d/_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
__version__ = "3.8.2"


if __name__ == "__main__":
print(__version__)
6 changes: 0 additions & 6 deletions package_metadata.yaml

This file was deleted.

35 changes: 34 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
[project]
name = "myria3d"
dynamic = ["version"]
description = "Deep Learning for the Semantic Segmentation of Aerial Lidar Point Clouds"
readme = "README.md"
authors = [
{ name = "Charles GAYDON", email = "[email protected]" }
]
maintainers = [
{name = "Charles GAYDON", email = "[email protected]"},
{name = "Michel DAAB"},
{name = "Léa VAUCHIER", email = "[email protected]"}
]
license = {file = "LICENSE"}
dependencies = [] # assume an environment as described in environment.yml

[metadata]
project_template = "https://github.com/ashleve/lightning-hydra-template"
copyright = "2022, Institut National de l'Information Géographique et Forestière"

[project.urls]
Documentation = "https://ignf.github.io/myria3d/"
Repository = "https://github.com/IGNF/myria3d"
Issues = "https://github.com/IGNF/myria3d/issues"
Changelog = "https://github.com/IGNF/myria3d/blob/main/CHANGELOG.md"

[tool.setuptools.dynamic]
version = {attr = "myria3d._version.__version__"}

[tool.setuptools]
packages = [ "myria3d" ]

[tool.black]
line-length = 99
target-version = ['py39']
Expand Down Expand Up @@ -28,8 +60,9 @@ filterwarnings = [
"ignore::DeprecationWarning",
"ignore::UserWarning"
]

markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"slow: marks tests as slow (deselect with '-m \"not slow\"')"
]

[tool.coverage.run]
Expand Down
17 changes: 0 additions & 17 deletions setup.py

This file was deleted.

0 comments on commit 631bd3d

Please sign in to comment.