Skip to content

Commit

Permalink
Move to submodules.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbradle committed Feb 12, 2025
1 parent b7f8de1 commit 6ebfb2c
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 10 deletions.
14 changes: 14 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Tannous"
given-names: "Jaad Antoun"
orcid: "XXX"
- family-names: "Meyer"
given-names: "Bradley Stewart"
orcid: "https://orcid.org/0000-0001-6307-9818"
title: "wnutils"
version: 4.0.0
doi: 10.5281/zenodo.8193378
date-released: 2025-02-14
url: "https://github.com/jaadt7/lvlspy"
18 changes: 16 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
# Script to automate build for PyPI.

rm -fr dist
cd lvlspy/IO
cd lvlspy/IO/xml
rm -fr xsd_pub
git clone https://bitbucket.org/mbradle/liblvls_xsd.git xsd_pub
cd ..
cd ../../..

python -m pip install --upgrade build
python -m build

echo ""
echo "All version numbers must be the same:"
echo ""

grep version lvlspy/__about__.py | grep -v ","
grep version CITATION.cff | grep -v "cff-version"
grep Version doc/source/changelog.rst | grep -v Versioning | head -1

echo ""
echo "Check the release date:"
echo ""
grep date CITATION.cff
echo ""

2 changes: 2 additions & 0 deletions lvlspy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@
from lvlspy.species import *
from lvlspy.level import *
from lvlspy.transition import *
from lvlspy.calculate import *
from lvlspy.io import *
9 changes: 1 addition & 8 deletions lvlspy/io/__init__.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
"""
A subdirectoy of lvlspy to handle input and output
A submodule of lvlspy to handle input and output
"""

import os
from lvlspy.io.xml import *
from lvlspy.io.ensdf import *

xml_catalog = os.path.join(os.path.dirname(__file__), "xsd_pub/catalog")

if "XML_CATALOG_FILES" in os.environ:
os.environ["XML_CATALOG_FILES"] += " " + xml_catalog
else:
os.environ["XML_CATALOG_FILES"] = xml_catalog
6 changes: 6 additions & 0 deletions lvlspy/io/ensdf/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"""
A submodule to handle input and output of data in ENSDF format.
"""

import os
from ._ensdf import *
File renamed without changes.
13 changes: 13 additions & 0 deletions lvlspy/io/xml/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"""
A module to handle input and output of xml.
"""

import os
from ._xml import *

xml_catalog = os.path.join(os.path.dirname(__file__), "xsd_pub/catalog")

if "XML_CATALOG_FILES" in os.environ:
os.environ["XML_CATALOG_FILES"] += " " + xml_catalog
else:
os.environ["XML_CATALOG_FILES"] = xml_catalog
File renamed without changes.

0 comments on commit 6ebfb2c

Please sign in to comment.