File tree Expand file tree Collapse file tree 4 files changed +44
-1
lines changed
Expand file tree Collapse file tree 4 files changed +44
-1
lines changed Original file line number Diff line number Diff line change 1+ # Use an official Python runtime as the base image
2+ FROM python:3.9
3+
4+ # Set the working directory in the container
5+ WORKDIR /app
6+
7+ # Copy the contents of your project to the working directory
8+ COPY . .
9+
10+ # Install the required dependencies
11+ RUN pip install -r requirements.txt
12+
13+ # Run setup.py to install your module
14+ RUN python3 setup.py install
15+
16+ # Run your tests to ensure everything works as expected
17+ RUN python3 -m unittest discover
18+
19+ # Set the entrypoint command to run your module
20+ CMD ["python3" , "verify.py" ]
Original file line number Diff line number Diff line change 1+ import os
2+
3+ current_dir = os .path .dirname (os .path .abspath (__file__ ))
4+ version_file = os .path .join (current_dir , '../VERSION.txt' )
5+
6+ with open (version_file , 'r' ) as f :
7+ __version__ = f .read ().strip ()
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ requests-toolbelt==0.9.1
2222six == 1.10.0
2323tqdm == 4.66.3
2424traceback2 == 1.4.0
25- twine == 4.0.2
25+ twine == 5.1.1
2626types-python-dateutil == 2.8.19.20240311
2727types-setuptools == 73.0.0.20240822
2828types-pytz == 2023.3.1.1
Original file line number Diff line number Diff line change 1+ from datemath import datemath , __version__
2+
3+
4+
5+ print (f'datemath version is { __version__ } ' )
6+ with open ('VERSION.txt' , 'r' ) as f :
7+ version = f .read ().strip ()
8+
9+ assert __version__ == version
10+
11+
12+ print (f'Now is: { datemath ("now" )} ' )
13+ print (f'1 hour was ago was: { datemath ("now-1h" )} ' )
14+ print (f'1 week from now is { datemath ("now+1w/w" )} ' )
15+ print (f'1 year from now is { datemath ("+1y" )} ' )
16+
You can’t perform that action at this time.
0 commit comments