Skip to content

Commit

Permalink
Merge pull request #690 from mjuric/main
Browse files Browse the repository at this point in the history
Packaging enhancements and fixes
  • Loading branch information
mjuric authored Oct 4, 2023
2 parents 74bc5af + 4d666da commit df169dc
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .git_archival.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
ref-names: $Format:%D$
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@
#
# png image files
# *.png filter=lfs diff=lfs merge=lfs -text
.git_archival.txt export-subst
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,4 @@ checker.txt
ephemeris_output.csv
data/out/

*~
24 changes: 24 additions & 0 deletions demo/quicktest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
#
# A quick test run to check the newly built code works as expected.
#
# It's lightweight and intented to be packaged with the binaries (e.g., in
# conda packages) so it can be automatically run during package builds and
# on the end-user's system (to test the install).
#

set -e

test -d data || { echo "$0 must be run from the top-level source code directory"; exit -1; }

rm -f quicktest-result.csv

bootstrap_sorcha_data_files
sorcha -c ./demo/sorcha_config_demo.ini -p ./demo/sspp_testset_colours.txt -ob ./demo/sspp_testset_orbits.des -pd ./demo/baseline_v2.0_1yr.db -o ./ -t quicktest-result

# check that the output file size is larger than ~10k
# (NOTE: this is just a rough check, we should test against known output here!)
filesize=$(wc -c quicktest-result.csv | awk '{print $1}')
test $filesize -gt 10000

echo "Quick test succesful!"
8 changes: 1 addition & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,12 @@ classifiers = [
]
dynamic = ["version"]
dependencies = [
# "numpy==1.24.3",
"numpy",
"pandas>=2.0",
"scipy",
"astropy",
"matplotlib",
"sbpy",
"tables",
# "difi == 1.2rc3",
"spiceypy",
"healpy",
"assist",
Expand All @@ -41,12 +38,9 @@ dependencies = [

[project.scripts]
sorcha = "sorcha.sorcha:main"
makeConfigOIF = "sorcha.utilities.makeConfigOIF:main"
makeConfigSorcha = "sorcha.utilities.makeConfigPP:main"
makeMultiConfigOIF = "sorcha.utilities.makeMultiConfigOIF:main"
makeSLURMscript = "sorcha.utilities.makeSLURMscript:main"
createResultsSQLDatabase = "sorcha.utilities.createResultsSQLDatabase:main"
createTemporaryDatabases = "sorcha.utilities.createTemporaryDatabases:main"
bootstrap_sorcha_data_files = "sorcha.utilities.retrieve_ephemeris_data_files:main"

[project.urls]
Expand Down Expand Up @@ -98,7 +92,7 @@ benchmark = [
[build-system]
requires = [
"setuptools>=62", # Used to build and package the Python project
"setuptools_scm>=6.2", # Gets release version from git. Makes it available programmatically
"setuptools_scm>=7.0", # Gets release version from git. Makes it available programmatically
]
build-backend = "setuptools.build_meta"

Expand Down

0 comments on commit df169dc

Please sign in to comment.