Skip to content

Commit

Permalink
feat: packaged module
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxime Vergez committed Dec 5, 2022
1 parent 5be3c84 commit 0b5a3b8
Show file tree
Hide file tree
Showing 40 changed files with 73 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ config/conf_gn_module.toml
config/monitoring/*
!config/monitoring/generic
frontend/assets/*.jpg

*.egg-info

# Node
.npm
Expand Down
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include VERSION
include README.md
include requirements.in
2 changes: 2 additions & 0 deletions backend/gn_module_monitoring/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
MODULE_CODE = "MONITORINGS"
MODULE_PICTO = "fa-puzzle-piece"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

# chemin ver le repertoire de la config
MONITORING_CONFIG_PATH = os.path.dirname(os.path.abspath(
__file__)) + '/../../config/monitoring'
__file__)) + '/../../../config/monitoring'


def get_monitoring_module(module_code):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file removed backend/monitoring/__init__.py
Empty file.
Empty file removed backend/utils/__init__.py
Empty file.
6 changes: 0 additions & 6 deletions manifest.toml

This file was deleted.

17 changes: 17 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[tool.pytest.ini_options]
minversion = "6.0"
testpaths = [
"backend",
]

[tool.coverage.run]
source = [
"gn_module_monitoring",
]
omit = [
"*/tests/*",
"*/migrations/*",
]

[tool.black]
line-length = 99
File renamed without changes.
49 changes: 49 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import setuptools
from pathlib import Path


root_dir = Path(__file__).absolute().parent
with (root_dir / 'VERSION').open() as f:
version = f.read()
with (root_dir / 'README.rst').open() as f:
long_description = f.read()
with (root_dir / 'requirements.in').open() as f:
requirements = f.read().splitlines()


setuptools.setup(
name='gn_module_monitoring',
version=version,
description="GeoNature",
long_description=long_description,
long_description_content_type='text/markdown',
maintainer='Parcs nationaux des Écrins et des Cévennes',
maintainer_email='[email protected]',
url='https://github.com/PnX-SI/gn_module_monitoring',
packages=setuptools.find_packages('backend'),
package_dir={'': 'backend'},
package_data={'gn_module_monitoring.migrations': ['data/*.sql']},
install_requires=requirements,
tests_require=[],
zip_safe=False,
entry_points={
'gn_module': [
'code = gn_module_monitoring:MODULE_CODE',
'picto = gn_module_monitoring:MODULE_PICTO',
'blueprint = gn_module_monitoring.blueprint:blueprint',
'config_schema = gn_module_monitoring.conf_schema_toml:GnModuleSchemaConf',
#'migrations = gn_module_monitoring:migrations',
],
},
classifiers=['Development Status :: 1 - Planning',
'Intended Audience :: Developers',
'Natural Language :: English',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'License :: OSI Approved :: GNU Affero General Public License v3'
'Operating System :: OS Independent'],
)

0 comments on commit 0b5a3b8

Please sign in to comment.