Skip to content

Commit

Permalink
reformatted files with black. moved package data from the setup.py to…
Browse files Browse the repository at this point in the history
… the MANIFEST.in. Updated readme.
  • Loading branch information
ChiCheng45 committed Jan 12, 2024
1 parent 02d834b commit 969cbd5
Show file tree
Hide file tree
Showing 14 changed files with 32 additions and 51 deletions.
8 changes: 4 additions & 4 deletions MDANSE/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
include LICENSE
include LICENCE
include requirements.txt

recursive-include Extensions/qhull_lib *.h *c *.pxd
recursive-include Extensions/xtc *.h *c *.pxd
recursive-include Src/MDANSE/Chemistry *.json
recursive-include Src/MDANSE/Framework *.json

recursive-include Doc *

include Scripts/*

recursive-include Tests *.py

14 changes: 0 additions & 14 deletions MDANSE/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,6 @@ def find_data(
PACKAGE_INFO = {}
exec(open("Src/MDANSE/__pkginfo__.py", "r").read(), {}, PACKAGE_INFO)

#################################
# Package data section
#################################

# Retrieve all the data related to the MDANSE package.
PACKAGE_DATA = find_package_data(where="Src", package="MDANSE", show_ignored=False)

#################################
# User data section
Expand All @@ -178,12 +172,6 @@ def find_data(
DATA_FILES = []
DATA_FILES.extend(find_data("Doc", exclude=[], prefix="conf_"))

#################################
# Scripts section
#################################

SCRIPTS_PATH = "Scripts"
SCRIPTS = glob.glob(os.path.join(SCRIPTS_PATH, "mdanse*"))

#################################
# Documentation
Expand Down Expand Up @@ -401,11 +389,9 @@ class mdanse_build_api(mdanse_build_doc):
license=PACKAGE_INFO["__license__"],
packages=find_packages("Src"),
package_dir={"": "Src"},
package_data=PACKAGE_DATA,
data_files=DATA_FILES,
platforms=["Unix", "Windows"],
ext_modules=EXTENSIONS,
scripts=SCRIPTS,
cmdclass=CMDCLASS,
# entry_points = {"console_scripts": []}
install_requires=[
Expand Down
11 changes: 4 additions & 7 deletions MDANSE_GUI/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
include LICENSE
include LICENCE
include requirements.txt

recursive-include Src/GUI/Resources/Icons *.png

recursive-include Src/PyQtGUI/Icons *.png
recursive-include Src/MDANSE_GUI/GUI/Resources/Icons *.png
recursive-include Src/MDANSE_GUI/PyQtGUI/Icons *.png
recursive-include Src/MDANSE_GUI/PyQtGUI/MolecularViewer/database *.yml

recursive-include Doc *

include Scripts/*

recursive-include Tests *.py

Empty file.
9 changes: 7 additions & 2 deletions MDANSE_GUI/Src/MDANSE_GUI/Scripts/mdanse_elements_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,19 @@
#
# **************************************************************************


def main():
from MDANSE_GUI.PyQtGUI.ElementsDatabaseEditor import ElementsDatabaseEditor, QApplication
from MDANSE_GUI.PyQtGUI.ElementsDatabaseEditor import (
ElementsDatabaseEditor,
QApplication,
)
import sys

app = QApplication(sys.argv)
root = ElementsDatabaseEditor()
root.show()
app.exec()


if __name__ == '__main__':
if __name__ == "__main__":
main()
1 change: 1 addition & 0 deletions MDANSE_GUI/Src/MDANSE_GUI/Scripts/mdanse_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

def main():
from MDANSE_GUI.PyQtGUI.main import startGUI

startGUI(sys.argv)


Expand Down
4 changes: 3 additions & 1 deletion MDANSE_GUI/Src/MDANSE_GUI/Scripts/mdanse_periodic_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@
#
# **************************************************************************


def main():
from MDANSE_GUI.PyQtGUI.PeriodicTableViewer import PeriodicTableViewer, QApplication
import sys

app = QApplication(sys.argv)
root = PeriodicTableViewer()
root.show()
app.exec()


if __name__ == '__main__':
if __name__ == "__main__":
main()
5 changes: 3 additions & 2 deletions MDANSE_GUI/Src/MDANSE_GUI/Scripts/mdanse_plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@
#
# **************************************************************************


def main():
from MDANSE.GUI.Apps import PlotterApp

app = PlotterApp()
app.MainLoop()


if __name__ == '__main__':
if __name__ == "__main__":
main()
4 changes: 2 additions & 2 deletions MDANSE_GUI/Src/MDANSE_GUI/Scripts/mdanse_ud_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
#
# **************************************************************************


def main():

from MDANSE.GUI.Apps import UserDefinitionViewerApp

app = UserDefinitionViewerApp(None)
app.MainLoop()


if __name__ == '__main__':
if __name__ == "__main__":
main()
5 changes: 4 additions & 1 deletion MDANSE_GUI/Src/MDANSE_GUI/Scripts/mdanse_units_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@
#
# **************************************************************************


def main():
from MDANSE_GUI.PyQtGUI.UnitsEditor import UnitsEditor, QApplication
import sys

app = QApplication(sys.argv)
root = UnitsEditor()
root.show()
app.exec()

if __name__ == '__main__':

if __name__ == "__main__":
main()
2 changes: 1 addition & 1 deletion MDANSE_GUI/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools", "numpy", "pip", "wheel"]
requires = ["setuptools", "numpy", "pip", "wheel", "netCDF4"]
build-backend = "setuptools.build_meta"

[project]
Expand Down
3 changes: 2 additions & 1 deletion MDANSE_GUI/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ MDANSE
vtk
qtpy
PyYAML
PyQt6
PyQt6
netCDF4
15 changes: 0 additions & 15 deletions MDANSE_GUI/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,19 +131,6 @@ def find_data(where=".", exclude=EXCLUDE, exclude_directories=EXCLUDE_DIRECTORIE
PACKAGE_INFO = {}
exec(open('Src/MDANSE_GUI/__pkginfo__.py','r').read(), {}, PACKAGE_INFO)

#################################
# Package data section
#################################

# Retrieve all the data related to the MDANSE package.
PACKAGE_DATA = find_package_data(where='Src', package='MDANSE_GUI', show_ignored=False)

#################################
# Scripts section
#################################

SCRIPTS_PATH = "Scripts"
SCRIPTS = glob.glob(os.path.join(SCRIPTS_PATH,'mdanse*'))

#################################
# Documentation
Expand Down Expand Up @@ -257,9 +244,7 @@ class mdanse_build_api(mdanse_build_doc):
license = PACKAGE_INFO["__license__"],
packages=find_packages("Src"),
package_dir={"": "Src"},
package_data = PACKAGE_DATA,
platforms = ['Unix','Windows'],
scripts = SCRIPTS,
cmdclass = CMDCLASS,
# entry_points = {"console_scripts": []}
install_requires = [pr.requirement for pr in parse_requirements('requirements.txt', session= PipSession())],
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The current version of MDANSE is currently still at the _alpha_ stage. Once the

## Quick start

The untested version of MDANSE can be downloaded from GitHub Actions as a Python wheel. There is one wheel for the main code ('MDANSE'), platform depenedent, and another for the GUI ('MDANSE_GUI'). Once downloaded, they can be installed by typing `pip install MDANSE-*.whl`. The GUI script is named *mdanse_gui*, and will be installed in the `bin/` or `Scripts/` directory of your Python virtual environment. Start it by typing `python PATH/TO/mdanse_gui`.
The untested version of MDANSE can be downloaded from GitHub Actions as a Python wheel. There is one wheel for the main code ('MDANSE'), platform depenedent, and another for the GUI ('MDANSE_GUI'). Once downloaded, they can be installed by typing `pip install MDANSE-*.whl`. The GUI script can be run using the *mdanse_gui* command (*mdanse_gui* on windows).

The typical workflow will look as follows:

Expand Down

0 comments on commit 969cbd5

Please sign in to comment.